Jump to content

Physical Address Extension

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by BOTarate (talk | contribs) at 19:36, 5 February 2008 (robot Adding: es:Physical Address Extension). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, Physical Address Extension (PAE) refers to a feature of x86 and x86-64 processors that allows more than 4 gibibytes (GiB) 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 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 GiB to 64 GiB. The 32-bit size of 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 gibibytes (GiB). The operating system uses page tables to map this 4 GiB address space onto the 64 GiB of total memory, 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 GiB of memory, 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 (AWE), while on Unix-like systems a variety of tricks are used, such as using mmap() to map regions of a file into and out of the address space as needed, none having been blessed as a standard.

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 KiB long page directory, which is divided into 1024 x 4 byte entries that point to 4 KiB long page tables, similarly consisting of 1024 x 4 byte entries pointing to 4 KiB 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 KiB. 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 most significant bits of page table entry's 64 bits are either such flags or are available for OS-specific data, a maximum of 52 bits can be potentially utilized in future to address 252 bytes, or 4 pebibytes, of physical memory.

The x86 architecture presently uses only 36 bits out of 52 bits possible. On x86-64 processors, PAE is obligatory in native long mode; presently 40 bits are used out of 52 bits possible.[1]

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

Operating system support

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 GiB of physical memory; those drivers won't work correctly on a system with PAE.[2]

Linux

The Linux kernel supports PAE starting from 2.6.[3] It has full PAE support, enabling access of up to 64 GiB of memory on 32-bit machines. A PAE-enabled Linux-kernel won't work on CPUs without PAE.

Solaris

Solaris supports PAE starting in Solaris 7. Not all third-party drivers support more than 4 GiB of physical memory; those drivers won't work correctly on a system with PAE.[4]

Windows

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

Version Maximum Physical Memory
Windows 2000 Advanced Server 8 GiB
Windows 2000 Datacenter Server 32 GiB
Windows Server 2003 64 GiB
Windows Server 2008 64 GiB

Windows XP SP2 and later by default on NX capable processors enables PAE in order to enable NX, but limits physical address space to 32 bits for driver compatibility reasons. If PAE is enabled in the normal way, this compatibility hack is disabled on Windows Server. See [1].

See also

References

  1. ^ "Intel 64 and IA-32 Software Developer's Manual - Volume 3A" (PDF). Intel. Retrieved 2007-11-16. Page 3.42.
  2. ^ "FreeBSD PAE(4) man page". 2003-04-08. Retrieved 2007-11-26.
  3. ^ "Wonderful World of Linux 2.6".
  4. ^ "Solaris 7 5/99 Release Notes (Intel Platform Edition), Appendix B: Hardware Compatibility List and Device Configuration Guide (Intel Platform Edition) 5/99". 1999. Retrieved 2007-11-26.
  5. ^ "Memory Limits for Windows releases". Microsoft. December 5, 2007. Retrieved 2007-12-10.
  6. ^ "Intel Physical Addressing Extensions (PAE) in Windows 2000". Microsoft. October 26, 2007. Retrieved 2007-12-29.

External links