SVR5
devmem_size(D3)
devmem_size --
obtain the size of a device memory block
Synopsis
#include <sys/types.h>
#include <sys/ddi.h>
size_t devmem_size(rm_key_t key, uint_t n);
Description
devmem_size( )
determines the size of a device memory block.
This can be used to determine
the legal range of offsets to pass to the
devmem_mapin(D3)
and
devmem_mapout(D3)
functions.
Arguments
key-
resource manager key for the device,
as passed to the CFG_ADD subfunction of the
config(D2)
entry point routine.
n-
memory block number
Return values
devmem_size( )
returns the size, in bytes,
of the specified memory block.
Usage
devmem_size( )
is typically called from the driver's
config(D2)
entry point routine
before calling the
devmem_mapin(D3)
function to get a pointer
to device memory for memory-mapped I/O.
Context and synchronization
User or blockable
context.
Hardware applicability
All
Version applicability
ddi:
8, 8mp
References
devmem_mapin(D3),
devmem_ppid(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