Physical Address Extension

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In computing, Physical Address Extension (PAE) is a feature of x86 and x86-64 processors that enable the use of more than 4 gigabytes[1] of physical memory to be used in 32-bit systems, given appropriate operating system support. PAE is provided by Intel Pentium Pro and above CPUs (including all later Pentium-series processors except the 400 MHz bus versions of the Pentium M), as well as by some compatible processors such as the Athlon and later models from AMD.

The x86 processor hardware is augmented with additional address lines used to select the additional memory, so physical address size is increased from 32 bits to 36 bits. This increases maximum physical memory size from 4 GB to 64 GB. The 32-bit size of the virtual address is not changed, so regular application software continues to use instructions with 32-bit addresses and (in a flat memory model) is limited to 4 gigabytes of virtual address space. The operating system uses page tables to map this 4 GB address space into the 64 GB of RAM, and the map is usually different for each process. In this way, the extra memory is useful even though no single regular application can access it all simultaneously.

For application software which needs access to more than 4 GB of RAM, some special mechanism may be provided by the operating system in addition to the regular PAE support. On Microsoft Windows this mechanism is called Address Windowing Extensions, while on Unix-like systems a variety of techniques are used, such as using mmap() to map regions of a file into and out of the address space as needed.

Contents

[edit] Page table structures

In traditional 32-bit protected mode, x86 processors use a two-level page translation scheme, where the control register CR3 points to a single 4 KB long page directory, which is divided into 1024 × 4 byte entries that point to 4 KB long page tables, similarly consisting of 1024 × 4 byte entries pointing to 4 KB long pages.

Enabling PAE (by setting bit 5, PAE, of the system register CR4) causes major changes to this scheme. By default, the size of each page remains as 4 KB. Each entry in the page table and page directory is extended to 64 bits (8 bytes) rather than 32 bits to allow for additional address bits; however, the size of tables does not change, so both table and directory now have only 512 entries. Because this allows only half as many entries as the original scheme, an extra level of hierarchy has been added, so CR3 now points to the Page Directory Pointer Table, a short table which contains pointers to 4 page directories.

The entries in the page directory have an additional flag, in bit 7, named PS (for Page Size). If this bit is set to 1, the page directory entry does not point to a page table, but to a single large 2 MB page. The NX bit is another flag in the page directory, in bit 63, to mark pages as "No eXecute". Because the 12 least significant bits of the page table entry's 64 bits are either similar flags or are available for OS-specific data, a maximum of 51 bits can be potentially used in the future to address 251 bytes, or 2 petabytes, of physical memory.

On x86-64 processors, PAE is obligatory in native long mode; currently 48 bits are used out of 52 bits possible on AMD Phenom, older CPUs may use fewer bits.

CPU support of PAE mode can be identified via the CPUID flag PAE.

[edit] Operating system support

[edit] FreeBSD

FreeBSD supports PAE in the 4.x series starting with 4.9, in the 5.x series starting with 5.1, and in all 6.x and later releases. The kernel PAE configuration option is required. Loadable kernel modules can only be loaded into a kernel with PAE enabled if the modules were built with PAE enabled; the binary modules in FreeBSD distributions are not built with PAE enabled, and thus cannot be loaded into PAE kernels. Not all drivers support more than 4 GB of physical memory; those drivers won't work correctly on a system with PAE.[2]

[edit] Linux

The Linux kernel includes full PAE support starting with version 2.6,[3] enabling access of up to 64 GB of memory on 32-bit machines. A PAE-enabled Linux-kernel requires that the CPU also support PAE. As of 2008[citation needed], many common Linux distributions come with a PAE-enabled kernel as the distribution-specific default.

[edit] Mac OS X

Mac OS X for Intel Macs supports PAE and the NX bit on all CPUs supported by Apple (from 10.4.4—the first Intel release—onwards). Mac Pro and Xserve systems can currently support 32 GB of RAM, even though the Mac OS X 10.5 Leopard kernel remains 32-bit. [4]

[edit] Microsoft Windows

PAE is supported in the following 32-bit releases of Microsoft Windows:[5][6]

Version Maximum Physical Memory
Windows 2000 Advanced Server 8 GB
Windows 2000 Datacenter Server 32 GB
Windows XP [7] 4 GB
Windows Server 2003 Enterprise Edition 32 GB
Windows Server 2003 R2 (or SP1) Enterprise Edition 64 GB
Windows Server 2003 Datacenter Edition [8] 64 GB
Windows Server 2003 Standard Edition 4 GB
Windows Vista 4 GB
Windows Server 2008 Enterprise or Datacenter Edition 64 GB
Windows Server 2008 other editions 4 GB

Windows XP Service Pack 2 and later, by default, on processors with the no-execute (NX) or execute-disable (XD) feature, runs in PAE mode in order to allow NX.[9] The NX (or XD) bit resides in bit 63 of the page table entry and, without PAE, page table entries only have 32 bits; therefore PAE mode is required if the NX feature is to be exploited. However, desktop versions of Windows (Windows XP, Windows Vista) limit physical address space to 4 GB for driver compatibility reasons.

[edit] Solaris

Solaris supports PAE beginning with Solaris version 7. However, third-party drivers used with version 7 are not specifically written to include PAE support may operate erratically or fail outright on a system with PAE.[10]

[edit] See also

[edit] References

  1. ^ Transistorized memory, such as RAM and cache sizes (other than solid state disk devices such as USB drives, CompactFlash cards, and so on) as well as CD-based storage size are specified using binary meanings for K (10241), M (10242), G (10243), ...
  2. ^ "FreeBSD PAE(4) man page". 2003-04-08. http://www.FreeBSD.org/cgi/man.cgi?query=pae&sektion=4. Retrieved on 2007-11-26. 
  3. ^ "Wonderful World of Linux 2.6". http://kniggit.net/wwol26.html. 
  4. ^ "Road to Mac OS X 10.6 Snow Leopard: 64-Bits". 2008-09-26. http://www.appleinsider.com/articles/08/08/26/road_to_mac_os_x_10_6_snow_leopard_64_bits.html. Retrieved on 2008-09-26. 
  5. ^ "Memory Limits for Windows releases". Microsoft. December 5, 2007. http://msdn2.microsoft.com/en-us/library/aa366778.aspx. Retrieved on 2007-12-10. 
  6. ^ "Intel Physical Addressing Extensions (PAE) in Windows 2000". Microsoft. October 26, 2007. http://support.microsoft.com/kb/268363/. Retrieved on 2007-12-29. 
  7. ^ "Physical Address Extension". Microsoft. http://msdn2.microsoft.com/en-us/library/aa366796(VS.85).aspx. 
  8. ^ "Memory Support and Windows Operating Systems". 2007. http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx. Retrieved on 2008-03-22. 
  9. ^ "The RAM reported by the System Properties dialog box and the System Information tool is less than you expect in Windows Vista or in Windows XP Service Pack 2 (MSKB 888137)". Knowledge Base. Microsoft. http://support.microsoft.com/kb/888137. Retrieved on 2009-01-30. 
  10. ^ "Solaris 7 5/99 Release Notes (Intel Platform Edition), Appendix B: Hardware Compatibility List and Device Configuration Guide (Intel Platform Edition) 5/99". 1999. http://docs.sun.com/app/docs/doc/806-0225/6j9ji3kj2. Retrieved on 2007-11-26. 

[edit] External links

Personal tools