Other versions of this page are also available for the following:
This function maps a physical address space to a nonpaged, process-dependent address space. It provides a virtual address, which is directly mapped, to the device.
PVOID MmMapIoSpace( PHYSICAL_ADDRESS PhysicalAddress, ULONG NumberOfBytes, BOOLEAN CacheEnable );
[in] Starting physical address of the I/O range to map.
[in] Number of bytes to map.
[in] Flag to indicate whether the physical address range can map as cached memory. For device registers, this value is usually FALSE.
Returns the base virtual address that maps the base physical address for the range. If space for mapping the range is insufficient, this function returns NULL.
Device drivers call this function during initialization to get a logical address for their device memory if a call to HalTranslateBusAddress indicates that the device memory range for the bus can map to a system memory address. For example, drivers of programmed I/O devices that allocate long-term I/O buffers can call this function to make such a buffer accessible or to make device memory accessible.
You can use the TransBusAddrToVirtual function instead of calling HalTranslateBusAddress and MmMapIoSpace. The TransBusAddrToVirtual function performs the necessary steps to convert a bus address or I/O port address into a virtual address.
|Windows Embedded CE||Windows CE 2.10 and later|