#include <sys/sunddi.h> int ddi_map_regs(dev_info_t *dip, u_int rnumber, caddr_t *kaddrp,p off_t offset, off_t len); void ddi_unmap_regs(dev_info_t *dip, u_int rnumber, caddr_t *kaddrp,p off_t offset, off_t len);
Solaris DDI specific (Solaris DDI).
ddi_map_regs() maps in the register set given by rnumber. The register number determines which register set will be mapped if more than one exists. The base kernel virtual address of the mapped register set is returned in kaddrp. offset specifies an offset into the register space to start from and len indicates the size of the area to be mapped. If len is non-zero, it overrides the length given in the register set description. See the discussion of the reg property in sbus.4 and vme.4 for more information on register set descriptions. If len and offset are 0, the entire space is mapped.
undoes mappings set up by
This is provided for drivers preparing to detach themselves from the system,
allowing them to release allocated mappings. Mappings must be released
in the same way they were mapped (a call to
must correspond to a previous call to
Releasing portions of previous mappings is not allowed.
determines which register
set will be unmapped if more than one exists.
kaddrp, offset and len
specify the area to be
is a pointer to the address returned from
offset and len
should match what
was called with.
These functions can be called from user or interrupt context.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97