PCI hole

Last updated

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).

Contents

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. 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. Provided there is enough memory installed, each program can have its own four-gigabyte addressing space, together utilizing up to 64 gigabytes of memory across all programs.

But PAE alone is not enough to address the PCI hole issue, as memory addresses and I/O PCI addresses are still overlapping somewhere between the 3rd and 4th gigabyte. A PAE compatible operating system together with a PAE compatible CPU cannot do better than accessing memory from the 1st to the 3rd gigabyte, then from the 5th to the 64th gigabyte. The PCI hole is still there. On a 4GB host, and in the absence of one or another additional workaround, PAE does nothing for accessing the ~1GB memory overlapped by the PCI I/O.

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 is mainly in use by 32-bit Linux distributions; Ubuntu has made it mandatory for its 32-bit version since 2013. 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. [2] 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

As stated earlier, in a 32-bit PAE-enabled and even in 64-bit systems, memory below and above the "memory hole" is available, but 512 MB to 1.5 GB of RAM is unavailable, around the 3rd gigabyte, because it uses their 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; only UEFI boot mode is supported.

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.

Related Research Articles

<span class="mw-page-title-main">Accelerated Graphics Port</span> Expansion bus standard

Accelerated Graphics Port (AGP) is a parallel expansion card standard, designed for attaching a video card to a computer system to assist in the acceleration of 3D computer graphics. It was originally designed as a successor to PCI-type connections for video cards. Since 2004, AGP was progressively phased out in favor of PCI Express (PCIe), which is serial, as opposed to parallel; by mid-2008, PCI Express cards dominated the market and only a few AGP models were available, with GPU manufacturers and add-in board partners eventually dropping support for the interface in favor of PCI Express.

<span class="mw-page-title-main">Motherboard</span> Main printed circuit board (PCB) for a computing device

A motherboard is the main printed circuit board (PCB) in general-purpose computers and other expandable systems. It holds and allows communication between many of the crucial electronic components of a system, such as the central processing unit (CPU) and memory, and provides connectors for other peripherals. Unlike a backplane, a motherboard usually contains significant sub-systems, such as the central processor, the chipset's input/output and memory controllers, interface connectors, and other components integrated for general use.

<span class="mw-page-title-main">Peripheral Component Interconnect</span> Local computer bus for attaching hardware devices

Peripheral Component Interconnect (PCI) is a local computer bus for attaching hardware devices in a computer and is part of the PCI Local Bus standard. The PCI bus supports the functions found on a processor bus but in a standardized format that is independent of any given processor's native bus. Devices connected to the PCI bus appear to a bus master to be connected directly to its own bus and are assigned addresses in the processor's address space. It is a parallel bus, synchronous to a single bus clock. Attached devices can take either the form of an integrated circuit fitted onto the motherboard or an expansion card that fits into a slot. The PCI Local Bus was first implemented in IBM PC compatibles, where it displaced the combination of several slow Industry Standard Architecture (ISA) slots and one fast VESA Local Bus (VLB) slot as the bus configuration. It has subsequently been adopted for other computer types. Typical PCI cards used in PCs include: network cards, sound cards, modems, extra ports such as Universal Serial Bus (USB) or serial, TV tuner cards and hard disk drive host adapters. PCI video cards replaced ISA and VLB cards until rising bandwidth needs outgrew the abilities of PCI. The preferred interface for video cards then became Accelerated Graphics Port (AGP), a superset of PCI, before giving way to PCI Express.

Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system memory independently of the central processing unit (CPU).

Rambus DRAM (RDRAM), and its successors Concurrent Rambus DRAM (CRDRAM) and Direct Rambus DRAM (DRDRAM), are types of synchronous dynamic random-access memory (SDRAM) developed by Rambus from the 1990s through to the early 2000s. The third-generation of Rambus DRAM, DRDRAM was replaced by XDR DRAM. Rambus DRAM was developed for high-bandwidth applications and was positioned by Rambus as replacement for various types of contemporary memories, such as SDRAM.

In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit central processing units (CPU) and arithmetic logic units (ALU) are those that are based on processor registers, address buses, or data buses of that size. A computer that uses such a processor is a 64-bit computer.

Memory-mapped I/O (MMIO) and port-mapped I/O (PMIO) are two complementary methods of performing input/output (I/O) between the central processing unit (CPU) and peripheral devices in a computer. An alternative approach is using dedicated I/O processors, commonly known as channels on mainframe computers, which execute their own instructions.

In computing, Physical Address Extension (PAE), sometimes referred to as Page Address Extension, is a memory management feature for the x86 architecture. PAE was first introduced by Intel in the Pentium Pro, and later by AMD in the Athlon processor. It defines a page table hierarchy of three levels (instead of two), with table entries of 64 bits each instead of 32, allowing these CPUs to directly access a physical address space larger than 4 gigabytes (232 bytes).

<span class="mw-page-title-main">Expanded memory</span> System of bank switching in DOS memory management

In DOS memory management, expanded memory is a system of bank switching that provided additional memory to DOS programs beyond the limit of conventional memory (640 KiB).

<span class="mw-page-title-main">Conventional memory</span> First 640 KB of RAM under DOS

In DOS memory management, conventional memory, also called base memory, is the first 640 kilobytes of the memory on IBM PC or compatible systems. It is the read-write memory directly addressable by the processor for use by the operating system and application programs. As memory prices rapidly declined, this design decision became a limitation in the use of large memory capacities until the introduction of operating systems and processors that made it irrelevant.

<span class="mw-page-title-main">PCI-X</span> Computer bus and expansion card standard

PCI-X, short for Peripheral Component Interconnect eXtended, is a computer bus and expansion card standard that enhances the 32-bit PCI local bus for higher bandwidth demanded mostly by servers and workstations. It uses a modified protocol to support higher clock speeds, but is otherwise similar in electrical implementation. PCI-X 2.0 added speeds up to 533 MHz, with a reduction in electrical signal levels.

PCI configuration space is the underlying way that the Conventional PCI, PCI-X and PCI Express perform auto configuration of the cards inserted into their bus.

nForce3 Chipset by Nvidia

The nForce3 chipset was created by Nvidia as a Media and Communications Processor. Specifically, it was designed for use with the Athlon 64 processor.

<span class="mw-page-title-main">SiS 630/730</span> Family of integrated chipsets from Intel and AMD

The SiS 630 and SiS 730 are a family of highly integrated chipsets for Intel and AMD respectively. At the time of release they were unique in that they not only provided VGA, Audio, LAN, IDE and USB functionality on board, but were also in a single-chip solution. At the time of release (1999) most chipsets were composed of physically separate north-bridge and south-bridge chips. Only later have single-chip solutions become popular in the mainstream, with chipsets such as the nVidia nForce4.

<span class="mw-page-title-main">Input–output memory management unit</span> Configuration in computing

In computing, an input–output memory management unit (IOMMU) is a memory management unit (MMU) connecting a direct-memory-access–capable (DMA-capable) I/O bus to the main memory. Like a traditional MMU, which translates CPU-visible virtual addresses to physical addresses, the IOMMU maps device-visible virtual addresses to physical addresses. Some units also provide memory protection from faulty or malicious devices.

In computing, PSE-36 refers to a feature of x86 processors that extends the physical memory addressing capabilities from 32 bits to 36 bits, allowing addressing to up to 64 GB of memory. Compared to the Physical Address Extension (PAE) method, PSE-36 is a simpler alternative to addressing more than 4 GB of memory. It uses the Page Size Extension (PSE) mode and a modified page directory table to map 4 MB pages into a 64 GB physical address space. PSE-36's downside is that, unlike PAE, it doesn't have 4-KB page granularity above the 4 GB mark.

The maximum random access memory (RAM) installed in any computer system is limited by hardware, software and economic factors. The hardware may have a limited number of address bus bits, limited by the processor package or design of the system. Some of the address space may be shared between RAM, peripherals, and read-only memory. In the case of a microcontroller with no external RAM, the size of the RAM array is limited by the size of the integrated circuit die. In a packaged system, only enough RAM may be provided for the system's required functions, with no provision for addition of memory after manufacture.

In computing, the term 3 GB barrier refers to a limitation of some 32-bit operating systems running on x86 microprocessors. It prevents the operating systems from using all of 4 GiB (4 × 10243 bytes) of main memory. The exact barrier varies by motherboard and I/O device configuration, particularly the size of video RAM; it may be in the range of 2.75 GB to 3.5 GB. The barrier is not present with a 64-bit processor and 64-bit operating system, or with certain x86 hardware and an operating system such as Linux or certain versions of Windows Server and macOS that allow use of Physical Address Extension (PAE) mode on x86 to access more than 4 GiB of RAM.

The 2 GB limit refers to a physical memory barrier for a process running on a 32-bit operating system, which can only use a maximum of 2 GB of memory. The problem mainly affects 32-bit versions of operating systems like Microsoft Windows and Linux, although some variants of the latter can overcome this barrier. It is also found in servers like FTP servers or embedded systems like Xbox. The use of Physical Address Extension (PAE) can overcome this barrier by extending the addresses used to represent mappings between virtual and physical memory.

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. Dansdata: What's with the 3Gb memory barrier?