obtain virtual address mapping for physical offsets within device memory
void *devmem_mapin(rm_key_t key, uint_t n, size_t offset, size_t nbytes);
allocates a virtual address mapping
for a given range of device memory addresses.
On systems with memory caches, acesses to the device memory
through this virtual address will bypass the cache, if possible.
does not limit device memory access
to the first 4GB.
resource manager key for the device,
as passed to the CFG_ADD subfunction of the
entry point routine.
memory block number
offset within the memory block
number of bytes to map,
as returned by the
returns a virtual address that can be used
to access nbytes bytes corresponding to
the device memory represented by
key, n, and offset.
Returns NULL if the specified memory block is not found.
is typically called from a driver's
entry-point routine to get a pointer to device memory
for memory-mapped I/O.
The driver should first call the
function to obtain the correct size.
A memory-mapped device has one or more
contiguous chunks of memory or registers
that can be mapped into the host CPU's memory address space.
The memory chunk number, n,
selects one of these chunks, numbered from zero.
offset is a byte offset
from the beginning of this chunk.
Context and synchronization
User or blockable
Differences between versions
For DDI versions before version 8,
function to obtain virtual address mapping
for physical addresses.
The operating system does not currently support
acess of memory above 4GB
because current hardware does not support
device memory blocks above 4GB.
allows access to device memory
wherever the kernel supports device memory
so no recoding should be required
when systems have device memory blocks
in the higher memory ranges.
``Large memory support (DDI 8)'' in HDK Technical Reference
``Memory access'' in HDK Technical Reference
``Memory-mapped I/O'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005