Compartilhar via


OEMRamTable (Compact 2013)

10/16/2014

This structure defines the additional RAM available for any hardware platform.

Syntax

typedef struct {
    DWORD ShiftedRamBase;
    DWORD RamSize;
    DWORD RamAttributes;
} RAMTableEntry, *PRAMTableEntry;
typedef const RAMTableEntry *PCRAMTableEntry;
typedef struct {
    DWORD dwVersion;
    DWORD dwNumEntries;
     PCRAMTableEntry pRamEntries;
} RamTable, *PRamTable;

Members

Member

Description

ShiftedRamBase

The physical address that begins the memory range, right-shifted 8 bits and page-aligned.

RamSize

Maximum size of the memory range, in bytes. The size must be a multiple of the platform's native page size. If the size value exceeds the amount of memory available, the kernel automatically detects and uses the memory available.

RamAttributes

Attributes of the memory range, which can be combined through bitwise OR. The following table lists the possible values:

Attribute nameDescription
CE_RAM_CPU_LOCALRAM is local to the CPU. The same physical address is mapped to different RAM. This type of RAM is typically used for only the kernel.
CE_RAM_FASTHigh-performance RAM. This type of RAM might be used when a particular VirtualAlloc flag is specified, or it might be treated as regular RAM.
CE_RAM_CAN_TURN_OFFRAM that can be turned off to save power.

dwVersion

Version of the RAM table; should be set to MAKELONG (CE_MINOR_VER, CE_MAJOR_VER).

dwNumEntries

Number of entries in this table.

pRamEntries

Pointer to the first entry in this table.

Remarks

Any RAM beyond the 512 MB that is defined in OEMAddressTable must be defined in OEMRamTable. You are not required to use OEMRamTable with platforms that use 512 MB of RAM or less, but we recommend that you use it to be compatible with CPUs that do not allow conflicting memory attributes (such as cached and uncached) to be applied to the same physical address.

The physical addresses listed in OEMRamTable must not overlap with the addresses listed in OEMAddressTable and OEMDeviceTable.

The table can contain multiple entries if RAM exists in noncontiguous physical addresses. The memory ranges must not overlap.

The memory that you define in this table is dynamically mapped when an application calls VirtualAlloc to commit pages. Calling the NKPhysToVirt function for physical addresses in this region always returns NULL, because the memory is not statically mapped.

The sum of the RamSize in this table is limited to the amount of memory that can be addressed in Windows Embedded Compact 2013 (4 GB), minus the RAM and RAMIMAGE memory specified in Config.bib rounded up to the nearest 256 MB. The maximum value of dwNumEntries is equal to the maximum number of memory sections (16) minus the number of RAM memory sections defined for static mapping in the Config.bib file (1 or 2). The number of memory sections can be calculated by dividing the size of the RAM in Config.bib by 256 MB.

When you use OEMRamTable, the OAL cannot use OEMEnumExtensionDRAM or OEMGetExtensionDRAM to report extra memory to the kernel.

See Also

Reference

OAL Memory Mapping Structures
OEMAddressTable
OEMDeviceTable
OAL Structures
OEMGetOEMRamTable