0 out of 2 rated this helpful - Rate this topic

MmMapIoSpace

Other versions of this page are also available for the following:
Windows Mobile Not SupportedWindows Embedded CE Supported
8/28/2008

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 
);
PhysicalAddress

[in] Starting physical address of the I/O range to map.

NumberOfBytes

[in] Number of bytes to map.

CacheEnable

[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.

Headerceddk.h
LibraryCEDDK.lib
Windows Embedded CEWindows CE 2.10 and later
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ