CreateStaticMapping
Other versions of this page are also available for the following:
8/28/2008
This function creates a static virtual memory address that maps to a physical address. This function is callable from the user code, but not the OEM adaptation layer (OAL). This function is callable from kernel-mode drivers and user-mode drivers.
Syntax
LPVOID CreateStaticMapping(
DWORD dwPhysBase,
DWORD dwSize
);
Parameters
- dwPhysBase
[in] Starting physical address to map. The address passed in must be right-shifted by 8.
- dwSize
[in] Number of bytes to map, starting from dwPhysBase.
Return Value
If the memory can be mapped, a valid static virtual memory pointer is returned. The virtual memory address returned is for an uncached memory region.
Remarks
CreateStaticMapping enables an application to map any physical address to a static virtual memory address that can then be used in an interrupt service routine (ISR). An ISR can access only a static mapped virtual address. In previous releases, a static mapping could be created only at boot time, and not dynamically.
Once the static mapping is created, it is active until the device reboots or DeleteStaticMapping is called.
The same functionality can be obtained from the OAL by calling the OAL version of the function, NKCreateStaticMapping.
Requirements
Header | pkfuncs.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
Concepts
Kernel Mode APIs
Virtual Memory Layout: Windows CE 5.0 vs. Windows Embedded CE 6.0
Other Resources
Developing a Device Driver
User Mode Driver Framework
Memory Addressing
NKCreateStaticMapping
OEMAddressTable