SVR5
devmem_ppid(D3)
devmem_ppid --
get physical page ID for physical offsets within device memory
Synopsis
#include <sys/types.h>
#include <sys/ddi.h>
ppid_t devmem_ppid(rm_key_t key, uint_t n, size_t offset);
Description
devmem_ppid( )
returns the physical page ID that corresponds to
the physical address indicated by the arguments.
Arguments
key-
resource manager key for this device.
n-
Memory chunk number.
offset-
Offset within the memory chunk.
Return values
If the arguments point to a valid physical page,
the corresponding physical page ID is returned.
Otherwise, NOPAGE is returned.
Usage
devmem_ppid( )
is used to obtain a physical page ID
for a page of device memory
that can be used as the return value of the driver's
mmap(D2)
entry point routine.
A physical page ID is a machine-specific token
that uniquely identifies a page of physical memory
in the system (either system memory or device memory).
No assumptions should be made about
the format of a physical page ID.
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
context.
Hardware applicability
All
Version applicability
ddi:
8, 8mp
Differences between versions
In DDI versions prior to version 8, use the
phystoppid(D3)
function to get the physical page ID.
References
mmap(D2),
devmem_mapin(D3),
devmem_mapout(D3),
drv_mmap(D3)
``Large memory support (DDI 8)'' 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