MmMapIoSpace (Windows CE 5.0)

Send Feedback

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,ULONGNumberOfBytes,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 Values

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

OS Versions: Windows CE 2.10 and later.
Header: CEDDK.h.
Link Library: CEDDK.lib.

See Also

HalTranslateBusAddress

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.