v_mapphys(D3X)v_mapphys(D3X)NAMEv_mapphys - map physical addresses into user address space
SYNOPSIS
#include "sys/types.h"
#include "ksys/ddmap.h"
v_mapphys(vhandl_ *vt, void *addr, size_t len);
DESCRIPTIONv_mapphys maps len bytes of the physical hardware addressed by addr into
a user's address space. The actual user virtual address space to which
addr is mapped is determined by vt, the "virtual handle" passed to the
device driver map routine when the user issues a mmap(2) system call.
If addr refers to memory and addr is either a kseg0 address or a cached
kseg2 address, addr is mapped as a cached address (that is, all loads and
stores will access or fill the data cache); otherwise, all references are
uncached.
RETURN VALUES
In the event of an error, v_mapphys returns an errno value; otherwise, it
returns 0. The errors include:
[ENOMEM]
Not enough memory was available to allocate page tables for the
address space, or the user requested a specific mapping that
collides with an address space that cannot be unmapped.
SEE ALSOv_getaddr(D3X), v_gethandle(D3X), v_getlen(D3X)
Page 1