MyOS Kernel
|
The format of a page table/directiry entry is as following:
Bits 31-11 is the physical frame number the entry points to.
Bits 11-9 are availible for use by the OS.
Bit 8 is ignored.
Bit 7 is the page size in page directories, and must be 0 in page tables. If set to 1 in a page directory, it indicates 4MB pages.
Bit 6 is the dirty bit in page tables, and must be 0 in page directories. In page tabes, it is set to 1 by the CPU when the page is written to.
Bit 5 will be set to 1 by the CPU when the page is accessed.
Bit 4 indicates whether the page has it's cache disabled.
Bit 3 indictates whether write-through caching (when it is 1), or write-back caching, (when it is 0) is enabled.
Bit 2 indictaes whether user mode code can access the page.
Bit 1 indicates whether the page is writable.
Bit 0 indicates whether the entry is present. If it is 0, the CU ignores the other 31 bits of the entry.
Privlege bits in the entries are ANDed together, so the most restrictive privlege between the page directory and the page table wins.