Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Descriptors and Descriptor Tables Paging Virtual, Linear, and Physical Addresses Running a Program on the Target Compiling and Linking with On Time RTOS-32 |
PagingPaging allows regions of memory to be mapped to different locations in the physical address space. In addition, the memory access rights can be controlled, much as they can for segments. However, since the flat memory model uses only one segment, page level protection is better suited here. The paging mechanism uses pages (4096 bytes) of memory as the smallest mapable unit. Each page can have one of the following access rights: none, system read only, system read/write, user read only, or user read/write. System access means that only software running at CPL 0 can access the memory. Write access checking is not performed at CPL 0. This is important to note, since it implies that memory cannot be protected if applications run at CPL 0. The following table shows the effective page access privileges enforced by the CPU at run time for code executing at CPL 0 or 3:
Each column represents a particular access privilege value for a page set in the page table. The rows show which privilege actually applies at a particular CPL. Any violation will trigger exception 14 (page fault) at run-time. Unlike segmentation, paging is optional and must be enabled at boot time to become effective. RTTarget-32 supports running either with or without paging. Paging is enabled by including a Locate PageTable command in the application's configuration file. Virtual, Linear, and Physical Addresses
|