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.

Syntax

PVOID MmMapIoSpace( 
  PHYSICAL_ADDRESS PhysicalAddress, 
  ULONG NumberOfBytes, 
  BOOLEAN CacheEnable 
);

Parameters

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

Return Value

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.

Remarks

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.

Requirements

Header ceddk.h
Library CEDDK.lib
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

HalTranslateBusAddress