NKCreateStaticMapping (Windows Embedded CE 6.0)

1/5/2010

This function creates a static virtual memory address that maps to a physical address. This function can be called from the OAL but not from the user code.

Syntax

LPVOID NKCreateStaticMapping(
  DWORD dwPhysBase,
  DWORD dwSize
);

Parameters

  • dwPhysBase
    [in] Starting physical address to map.

    The address passed in must be shifted to the right by eight bit positions.

  • 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 that is returned represents an uncached memory region.

Remarks

NKCreateStaticMapping allows the OAL to map a physical address to a static virtual memory address, which can then be used in an ISR. An ISR can only access a static mapped virtual address. In previous releases, a static mapping could only be created at boot time and not created dynamically.

After the static mapping is created, it is active until the device reboots, or until NKDeleteStaticMapping is called.

NKCreateStaticMapping can also be called from the OAL to create a static mapping.

To use NKCreateStaticMapping, set WINCEOEM = 1.

Requirements

Header pkfuncs.h
Library Nkstub.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Optional OAL Functions

Concepts

Configuring System Memory

Other Resources

CreateStaticMapping