In the early days of PCs, installing a new expansion card meant manually configuring physical switches and jumpers to assign resources, which frequently resulted in frustrating hardware conflicts. The original PCI architecture solved this by introducing a standardized “Plug and Play” mechanism known as Configuration Address Space.
As the industry transitioned to PCI Express (PCIe), this vital address space had to evolve dramatically to keep up with new capabilities. Here is a look at the transition from the legacy PCI configuration space to the expanded PCIe architecture.
The Legacy: 256-Byte PCI-Compatible Space
In the traditional PCI model, every physical device function is allocated a dedicated block of exactly 256 bytes of configuration address space. This space allows system software to standardly discover the device, configure its operation, and check its status.
This 256-byte block is strictly divided into two sections:
- The Configuration Header (First 64 Bytes): This standardized header contains the most basic functionality needed to identify and control the device. A Type 0 header is used for standard endpoints, while a Type 1 header is required for bridge functions that create another bus in the topology.
- Capability Structures (Remaining 192 Bytes): The rest of the space is reserved for optional, standardized features known as capability structures, such as Power Management or Message Signaled Interrupts (MSI).
Hitting the Limit
When PCIe was introduced, it became immediately clear that the legacy 256-byte space was no longer sufficient. With the need to support a host of new, complex capability structures—along with the desire of hardware vendors to include proprietary device information—designers simply ran out of room in the standard PCI footprint.
The Solution: The 4KB PCIe Extended Configuration Space
To solve this space limitation, PCIe expanded the configuration space per function from 256 bytes to a massive 4KB (4,096 bytes), creating what is known as the Extended Configuration Space.
To maintain seamless backward compatibility, PCIe carefully organizes this new space:
- The First 256 Bytes (PCI-Compatible Space): The beginning of the 4KB block remains perfectly identical to the legacy PCI layout. Older legacy software can safely read the headers and capability pointers in this region completely unaware that the rest of the 4KB space even exists.
- The Extended Space (Remaining 3,840 Bytes): This massive new region is strictly utilized for advanced PCIe capabilities. It houses powerful new optional registers for features like Advanced Error Reporting, Virtual Channels, Device Serial Numbers, and Power Budgeting.
Accessing the Space: The Enhanced Configuration Mechanism
Because legacy processors were originally limited by older indirect IO access methods, legacy PCI software can only “see” and access the first 256 bytes of this space.
To access the newly added Extended Configuration Space, PCIe relies on the Enhanced Configuration Access Mechanism. This modern method maps the entire 4KB configuration space directly into the system’s memory address space, allowing the system to easily and securely configure advanced PCIe features with standard memory reads and writes.
