This preview shows page 1. Sign up to view the full content.
Unformatted text preview: by an operating system through the CPUID instruction. Specifically, the operating system executes the CPUID instruction with the value 1 in the EAX register and then determines support for the feature by inspecting bit 17 of the EDX register return value (see Addendum—Intel Architecture Software Developer’s Manual, Volume1: Basic Architecture). If the PSE-36 feature is supported, an operating system is permitted to utilize the feature, as well as use certain formerly reserved bits. To use the 36-bit PSE feature, the PSE flag must be enabled by the operating system (bit 4 of CR4). Note that a separate control bit in CR 4 does not exist to regulate the use of 36-bit MByte pages, because this feature becomes the example for 4-MByte pages on processors that support it. Table 3-8 shows the page size and physical address size obtained from various settings of the page-control flags for the P6-family processors that support the 36-bit PSE feature. Shaded in gray is the change to this table resulting from the 36-bit PSE feature. 3-36 PROTECTED-MODE MEMORY MANAGEMENT Table 3-4. Paging Modes and Physical Address Size
PG Flag (in CR0) 0 1 1 1 1 1 PAE Flag (in CR4) X 0 0 0 1 1 PSE Flag (in CR4) X 0 1 1 X X PS Flag (in the PDE) X X 0 1 0 1 Page Size — 4 KB 4 KB 4 KB 4 KB 2 KB Physical Address Size Paging Disabled 32 bits 32 bits 36 bits 36 bits 36 bits To use the 36-bit PSE feature, the PAE feature must be cleared (as indicated in Table 3-4). However, the 36-bit PSE in no way affects the PAE feature. Existing operating systems and softwware that use the PAE will continue to have compatible functionality and features with P6family processors that support 36-bit PSE. Specifically, the Page-Directory Entry (PDE) format when PAE is enabled for 2-MByte or 4-MByte pages is exactly as depicted in Figure 3-21 of the Intel Architecture Software Developer’s Manual, Volume3: System Programming Guide. No matter which 36-bit addressing feature is used (PAE or 36-bit PSE), the linear address space of the processor remains at 32 bits. Applications must partition the address space of their work loads across multiple operating system process to take advantage of the additonal physical memory provided in the system. The 36-bit PSE feature estends the PDE format of the Intel Architecture for 4-MByte pages and 32-bit addresses by utilizing bits 16-13 (formerly reserved bits that were required to be zero) to extend the physical address without requiring an 8-byte page-directory entry. Therefore, with the 36-bit PSE feature, a page directory can contain up to 1024 entries, each pointing to a 4MByte page that can exist anywhere in the 36-bit physical address space of the processor. Figure 3-22 shows the difference between PDE formats for 4-MByte pages on P6-family processors that support the 36-bit PSE feature compared to P6-family processors that do not support the 36-bit PSE feature (i.e., 32-bit addressing). Figure 3-22 also shows the linear address mapping to 4-MByte pages when the 36-bit PSE is enabled. The base physical address of the 4-MByte page is contained in the PDE. PA-2 (bits 1316) is used to provide the upper four bits (bits 32-35) of the 36-bit physical address. PA-1 (bits 22-31) continues to provide the next ten bits (bits 22-31) of the physical address for the 4-MByte page. The offset into the page is provided by the lower 22 bits of the linear address. This scheme eliminates the second level of indirection caused by the use of 4-KByte page tables. 3-37 PROTECTED-MODE MEMORY MANAGEMENT Page Directory Entry format for processors that support 36-bit addressing for 4-MByte pages 31 PA - 1 22 21 17 16 PA - 2 13 12 PAT 11 8 7 PS=1 6 0 Reserved Page Directory Entry format for processors that support 32-bit addressing for 4-MByte pages 31 22 Base Page Address 21 Reserved 12 11 8 7 PS=1 6 0 Figure 3-22. PDE Format Differences between 36-bit and 32-bit addressing
Notes: 1. PA-2 = Bits 35-32 of thebase physical address for the 4-MByte page (correspond to bits 16-13) 2. PA-2 = Bits 31-22 of thebase physical address for the 4-MByte page 3. PAT = Bit 12 used as the Most Significant Bit of the index into Page Attribute Table (PAT); see Section 10.2. 4. PS = Bit 7 is the Page Size Bit—indicates 4-MByte page (must be set to 1) 5. Reserved = Bits 21-17 are reserved for future expansion 6. No change in format or meaning of bits 11-8 and 6-0; refer to Figure 3-15 for details. The PSE-36 feature is transparent to existing operating systems that utilize 4-MByte pages, because unused bits in PA-2 are currently enforced as zero by Intel processors. The feature requires 4-MByte pages aligned on a 4-MByte boundary and 4 MBytes of physically contiguous memory. Therefore, the ten bits of PA-1 are sufficient to specify the base physical address of any 4-MByte page below 4 GBytes. An operating system can easily support addresses greater than 4 GBytes simply by providing the upper 4 bits of the physical address in PA-2 when creating a PDE for a 4-MByte page. Figure 3-23 shows the linear...
View Full Document
- Spring '10