Manual page for ddi_segmap(9F)
ddi_segmap, ddi_segmap_setup - Set up a user mapping using seg_dev
int ddi_segmap(dev_t dev, off_t offset,
struct as *asp,
caddr_t *addrp, off_t len,
u_int flags, cred_t *credp);
int ddi_segmap_setup(dev_t dev,
struct as *asp,
u_int maxprot, u_int flags,
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.
Some combinations of possible settings are:
Read access is desired.
Write access is desired.
Execute access is desired.
User-level access is desired (the mapping is
being done as a result of a
All access is desired.
Maximum protection flag possible for attempted mapping (the
bit may be masked out if the user opened the
special file read-only). If
(maxprot & prot) != prot
then there is an access violation.
Flags indicating type of mapping.
Possible values are (other bits may be set):
Changes are private.
Changes should be shared.
The user specified an address in
rather than letting the system
pick and address.
user credential structure.
Pointer to a
structure which contains the device access attributes to apply to this
set up user mappings to device space.
When setting up the mapping, the
routines call the
entry point to validate the range to be mapped. When a user
process accesses the mapping, the drivers
entry point is again called to retrieve the page frame number that needs to
be loaded. The mapping translations for that page are then loaded on behalf of
the driver by the DDI framework.
is typically used as the
entry in the
structure for those devices that do not choose to provide their own
However, some drivers may have their own
entry point to do some initial processing on the parameters
and then call
to establish the default memory mapping.
is used in the drivers
entry point to set up the mapping and assign device access attributes to
that mapping. See
for details what device access attributes are available.
cannot be used directly in the
structure and requires a driver to have a
on failure. In particular, they return
if the range to be mapped is invalid.
can be called from user or kernel context only.
If driver notification of user accesses to
the mappings is required, the driver should use
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97