IOPreparationTable Options
This
options
field of the
IOPreparationTable
structure contains flags that have the following meanings:
-
kIOMultipleRanges
specifies that the
rangeInfo
field is to be interpreted as
MultipleAddressRange, enabling a scatter-gather memory specification.
-
kIOLogicalRanges
specifies that the base fields of the
AddressRange
structures are logical addresses. If this option is omitted, the addresses are treated as physical addresses. Current versions of the Mac OS do not support specifying physical buffers, so the driver must always specify this option.
-
kIOMinimalLogicalMapping
specifies that the
LogicalMappingTable
structure is to be filled in with just the first and last mappings of each range, arranged in pairs. Minimal logical mappings are discussed in
DMA Alignment Requirements.
-
kIOShareMappingTables
specifies that the system can use the driver's mapping tables instead of maintaining its own copies of the tables. Sharing mapping tables is discussed in
Reducing Memory Usage.
-
kIOIsInput
specifies that data will be moved into main memory.
-
kIOIsOutput
specifies that data will be moved out of main memory.
-
kIOCoherentDataPath
indicates that the data path that will be used to access memory during the I/O operation is fully coherent with the main processor's data caches, making data cache manipulations unnecessary. Memory coherency with the instruction cache is not implied, however, so the appropriate instruction cache manipulations are performed regardless. This option is useful when the overall hardware architecture is not coherent, but the driver knows that the transfer will occur on a particular hardware path that is coherent. (
PrepareMemoryForIO
operates according to the overall architecture and has no implicit way of knowing about individual data paths.) When in doubt, omit this option. Incorrectly omitting it merely slows operation, whereas incorrectly specifying this option can result in erroneous behavior and crashes.
-
kIOClientIsUserMode
indicates that
PrepareMemoryForIO
is being called on behalf of a nonprivileged client. If this option is specified, the memory ranges are checked for user-mode accessibility. If this option is omitted, the memory ranges are checked for privileged-level accessibility. Drivers can obtain the client's execution mode through the device's family programming interface (FPI). This option is not implemented in current versions of Mac OS. For compatibility with future Mac OS releases, drivers should omit it from the options. The FPI will perform the buffer access level checks on behalf of the driver.
© 1999 Apple Computer, Inc. (Last Updated 26 March 99)