Manual page for ddi_mapdev(9F)
ddi_mapdev - create driver-controlled mapping of device
int ddi_mapdev(dev_t dev,
off_t offset, struct as *asp,
u_int prot, u_int maxprot,
struct ddi_mapdev_ctl *ctl,
Solaris DDI specific (Solaris DDI).
The device whose memory is to be mapped.
The offset within device memory at which the mapping begins.
An opaque pointer to the user address space into
which the device memory should be mapped.
Pointer to the starting address within the user address space
to which the device memory should be mapped.
Length (in bytes) of the memory to be mapped.
A bit field that specifies the protections.
Maximum protection flag possible for attempted mapping.
Flags indicating type of mapping.
Pointer to the user credentials structure.
A pointer to a
The structure contains pointers to device driver-supplied
functions that manage events on the device mapping.
An opaque pointer to a device mapping handle.
A handle to the new device mapping is
generated and placed into the
location pointed to by
If the call fails, the value of
Driver private mapping data. This value is passed into each mapping
call back routine.
sets up user mappings to device space.
The driver is notified of user events on the mappings via the entry points
The user events that the driver is notified of are:
User has accessed an address in the mapping that has no translations.
User has duplicated the mapping. Mappings are duplicated when the process
User has called
on the mapping or is exiting.
for details on these entry points.
The range to be mapped, defined by
must be valid.
are provided by the
entry point and should not be modified. See
for a description of these arguments.
entry point is not called to verify the range to be mapped.
With the handle,
device drivers can use
to inform the system of whether or not they are interested in
being notified when the user process accesses the mapping.
By default, user accesses to newly created mappings will generate
a call to the
The driver is always notified of duplications and unmaps.
The device may also use the handle to assign certain
characteristics to the mapping.
The device driver can use these interfaces to implement a device context and
control user accesses to the device space.
is typically called from the
returns zero on success and non-zero on failure. The return value from
should be used as the return value for the drivers
This routine can be called from user or kernel context only.
Only mappings of type
should be used with
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97