Future releases of Solaris will provide these functions for binary and source compatibility. However, for increased functionality, use devmap_load(9F) or devmap_unload(9F)
instead. See devmap_load(9F) and devmap_unload(9F) for details.
The ddi_mapdev_intercept() and ddi_mapdev_nointercept() functions control whether or not user accesses to device mappings created by ddi_mapdev(9F) in the specified range will generate calls to the mapdev_access(9E) entry point. ddi_mapdev_intercept() tells the system to intercept the user access and notify
the driver to invalidate the mapping translations. ddi_mapdev_nointercept() tells the system to not intercept the user access and allow it to proceed by validating the mapping translations.
For both routines, the range to be affected is defined by the offset and len arguments. Requests affect the entire page containing the offset and all pages up to and including the page containing the last byte as indicated by offset + len.
Supplying a value of 0 for the len argument affects all addresses from the offset to the end of the mapping. Supplying a value of 0 for the offset argument and a value of 0 for len argument affect all addresses in the mapping.
To manage a device context, a device driver would call ddi_mapdev_intercept() on the context about to be switched out, switch contexts, and then call ddi_mapdev_nointercept() on the context switched in.
|