Книга: Microsoft Windows Embedded CE 6.0 Exam Preparation Kit

OEM Address Table

OEM Address Table

The kernel performs specialized tasks, such as initializing virtual memory, and cannot rely on a boot loader for this because the kernel must be entirely self-contained. Otherwise, the operating system would depend on the presence of a boot loader and it would not be possible to bootstrap the run-time image directly. Yet, to establish virtual-to-physical address mappings through the Memory Management Unit (MMU), the kernel must know the memory layout of the underlying hardware platform. To obtain this information, the kernel uses an important table called OEMAddressTable (or g_oalAddressTable) that defines static virtual memory regions. The OAL includes a declaration of OEMAddressTable as a read-only section and one of the first actions taken by the kernel is to read this section, set up corresponding virtual memory mapping tables, and then transition to the virtual address where the kernel can execute code. The kernel can determine the physical address of the OEMAddressTable in linear memory based on the address information available in the run-time image.

You must indicate any differences in the memory configuration of a new hardware platform by modifying the OEMAddressTable. The following sample code illustrates how to declare the OEMAddressTable section.

;--------------------------------------------------------------
public _OEMAddressTable
 _OEMAddressTable:
 ; OEMAddressTable defines the mapping between Physical and Virtual Address
 ; o MUST be in a READONLY Section
 ; o First Entry MUST be RAM, mapping from 0x80000000 -> 0x00000000
 ; o each entry is of the format ( VA, PA, cbSize )
 ; o cbSize must be multiple of 4M
 ; o last entry must be (0, 0, 0)
 ; o must have at least one non-zero entry
 ; RAM 0x80000000 -> 0x00000000, size 64M
 dd 80000000h, 0, 04000000h
 ; FLASH and other memory, if any
 ; dd FlashVA, FlashPA, FlashSize
 ; Last entry, all zeros
 dd 0 0 0

Оглавление книги


Генерация: 0.051. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз