Compartir a través de


OEMDeviceTable (Compact 2013)

10/16/2014

This structure defines virtual-to-physical address mappings for devices on the x86 and ARM platforms.

Syntax

struct _DeviceTableEntry {
    DWORD VirtualAddress;
    DWORD ShiftedPhysicalAddress;
    DWORD Size;
    DWORD Attributes;
}
typedef struct _DeviceTableEntry DeviceTableEntry, *PDeviceTableEntry;
typedef const DeviceTableEntry  *PCDeviceTableEntry;
PCDeviceTableEntry g_pOEMDeviceTable;

Members

Member

Description

VirtualAddress

The virtual address to be statically mapped; must be page-aligned.

ShiftedPhysicalAddress

The target physical address for the mapping, right-shifted 8 bits.

Size

Amount of memory to be mapped, in MB; must be a multiple of the platform's native page size.

Attributes

Settings for the specified address range, such as whether the memory is cached or uncached. These settings are CPU architecture-dependent; see the reference manual for your CPU architecture for specific details.

Setting this value to 0 (zero) configures the memory range to allow read/write access by the kernel, no access from user space, and caches the memory.

Remarks

For each entry in this table, a mapping is created to a device with the exact cache attributes (cached or uncached) specified in the entry. This differs from the format in earlier versions in which both a cached and uncached version were created.

OEMDeviceTable is not required (except on CPUs with ARMv7 architecture where it is required for mapping uncached devices), unless you want to provide additional kernel virtual address space.

All uncached address mappings must be listed in OEMDeviceTable.

Note

Address cache bits must not be directly manipulated in the OAL when you use OEMDeviceTable.

You can use any name for the table; two names that developers commonly use are OEMDeviceTable and g_pOEMDeviceTable. The last entry of this table must be 0 (zero) to indicate the end of the table.

To use OEMDeviceTable, the first entry in the OEMAddressTable must point to OEMDeviceTable, using the following syntax:

CE_NEW_MAPPING_TABLE, <OEMDeviceTable>, 0

<OEMDeviceTable> must be a pointer to OEMDeviceTable.

Example

The TI 4470 BSP contains code that shows how to use OEMDeviceTable for an ARM device. See the file addrtab_cfg.inc in the folder %_WINCEROOT%\platform\TI_SDP44XX\SRC\INC.

See Also

Reference

OAL Memory Mapping Structures
OEMAddressTable
OAL Structures