PCI hole

The PCI hole or PCI memory hole is a limitation of 32-bit hardware and 32-bit operating systems that causes a computer to appear to have less memory available than is physically installed.[1] This memory addressing limitation and the later workarounds necessary to overcome it are functionally similar to the memory limits of the early 8088 IBM PC memory architecture (see Conventional memory).

Similar situations have often arisen in the history of computing, when hardware intended to have up to a certain level of resources is designed to handle several times the maximum expected amount, which eventually becomes a severe restriction as Moore's law increases resources economically available. The original IBM PC was typically supplied with 64 KB of memory or less; it was designed to take a maximum of 640 KB, far more than it was thought would ever be needed. In fact, Bill Gates is famously (but dubiously[2][3]) thought to have pointed out that "640 KB ought to be enough for anyone." This rapidly became a restriction that had to be handled by complex DOS memory management. Similar successive restrictions in size have been imposed and overcome on hard drives.

Unavailable memory

The loss of usable memory caused by the PCI hole, when using memory-mapped I/O, is caused by using the same address space for both physical memory and to communicate with hardware devices. Thus, installed hardware devices need some of the address space in order to communicate with the processor and system software. As 32-bit hardware has a total of four gigabytes of addressable memory,[lower-alpha 1] some of the real physical memory of a 32-bit machine, when enough memory is installed, needs to be sacrificed by making it hidden so the devices have room to communicate. Which part of physical memory becomes replaced with the device communication space depends upon the machine, but it is usually anything above 2.5 to 3.5 GB.

The amount of system memory that is hidden and unavailable varies widely with the actual mainboard and chipset, the BIOS, the amount of physical memory, the amount of video RAM installed on graphics cards, and the number and type of PCI cards installed in the system. More than a gigabyte of 32-bit system memory can be unavailable when four gigabytes of physical memory and multiple 3D cards with large amounts of video memory are installed; on some mainboards, the hole is always at least one gigabyte in size regardless of the installed expansion cards.

Physical address extension

A workaround first developed in the Pentium Pro, known as Physical Address Extension (PAE), allows certain 32-bit operating systems to access up to 36-bit memory addresses, even though individual programs are still limited to operating within 32 bits of address space. Each program can have its own four-gigabyte addressing space, together utilizing up to 64 gigabytes of memory across all programs.

PAE was fully supported in Windows XP up to the Service Pack 1 (SP1) release, but then withdrawn for SP2; the only 32-bit versions of Microsoft Windows to fully support this are certain high-end server versions of Windows Server 2003 and earlier; as of 2014, it remains in use by some 32-bit Linux distributions. Microsoft disabled the support in Windows XP SP2 and later operating systems because there were many compatibility problems with graphics card and other devices, which needed PAE-aware drivers, distinct from both standard 32-bit and later 64-bit drivers.[4] Many versions of MS Windows can activate what is still called PAE for the purpose of using the NX bit, but this no longer extends the address space.

Filling the memory hole

In a 64-bit system, memory below and above the "memory hole" is available, but 512 MB to 1.5 GB of RAM is unavailable because it uses memory addresses required for devices. With the decreasing cost of memory this may not be a serious issue, but there are ways to regain access to the missing memory.

Mapping devices to addresses above 4 GB

The limitations of the 32-bit PCI hole can affect purely 64-bit operating systems as the system BIOS must cater for all operating systems which are supported by the hardware (16-, 32-, and 64-bit operating systems all run on the same hardware). The BIOS must be able to boot mapping all devices below four gigabytes, although a 64-bit system does not require this. Many BIOSes can be configured by the user to fill the memory hole by mapping devices high up in the 64-bit address space, so long as the devices, their drivers, and the chipset all support this. A machine configured this way cannot boot into a 16- or 32-bit operating system; if a machine is set up this way, the BIOS setup must be temporarily changed to boot into a 16- or 32-bit operating system, e.g. from a bootable CD or USB storage device.

Mapping memory to addresses above 4 GB

Another way to remove the PCI hole, which is only useful for 64-bit operating systems and those 32-bit systems that support the Physical Address Extension method described above, is to "remap" some or all of the memory between the two- and four-gigabyte limits to addresses above four gigabytes. This needs to be supported by the chipset of the computer and can usually be activated in the BIOS Setup. This remapping works on the level of physical addresses, unlike the higher-level remapping of virtual to physical addresses that happens inside the CPU core. Activating this for traditional 32-bit operating systems does more harm than good, as the remapped memory (often larger than the PCI hole itself) is unusable to such operating systems, even though e.g. Windows Vista will show such memory to physically exist on the "System Properties" page.

See also

Notes

  1. With 16 bits, two to the power of 16 equals to 65,536 different locations that can be addressed; with 32 bits it is 4,294,967,296 locations, while with 64 bits it is 18,446,744,073,709,551,616.

References

  1. "Memory Hole in Large Memory X86 Based Systems" (PDF). techfiles.de. Sun Microsystems. May 19, 2014. Archived from the original (PDF) on July 19, 2011. Retrieved November 7, 2014.
  2. "Computer Memory: 640K Ought to be Enough for Anyone". Quote Investigator. 2011-09-08. Retrieved 2014-02-19.
  3. wikiquote:Talk:Bill Gates
  4. Dansdata: What's with the 3Gb memory barrier?
This article is issued from Wikipedia - version of the 9/11/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.