The 64-byte header used by every PCIe bridge — switch ports, root ports, and PCIe-to-PCI bridges. Primary, Secondary, and Subordinate Bus Numbers, the three address windows (I/O, Non-Prefetchable Memory, Prefetchable Memory), Secondary Status, Bridge Control, Expansion ROM, and how enumeration uses all of it.
Every PCIe bridge device uses a Type 1 configuration header. In a PCIe system, a bridge is any device that connects two bus segments — not just dedicated bridge chips. This means every switch port, every Root Complex port, and any PCIe-to-PCI or PCIe-to-PCIe-X bridge implements a Type 1 header.
The critical difference from Type 0: instead of six BARs for device registers, a Type 1 header dedicates that space to three address windows — ranges of I/O, non-prefetchable memory, and prefetchable memory that the bridge will forward downstream. A bridge claims any TLP whose target address falls within one of its windows and sends it on to the downstream bus.
The four bus number registers at offset 18h are the most important registers unique to the Type 1 header. They form the basis for all configuration TLP routing through bridges.
| Register | Offset | Access | Purpose |
|---|---|---|---|
| Primary Bus Number | 18h [7:0] | RW | Bus number of the bus segment on the upstream side of this bridge. For a root port, Primary = 0 (the RC internal bus is always bus 0). For a switch downstream port, Primary = the bus number of the switch’s internal bus. Software writes this during enumeration. |
| Secondary Bus Number | 18h [15:8] | RW | Bus number of the bus segment directly connected to the downstream side of this bridge. Devices directly attached on the downstream link have this bus number. Software writes this during enumeration — it is the “next available bus number.” |
| Subordinate Bus Number | 18h [23:16] | RW | The highest bus number reachable through this bridge — any bus number from Secondary through Subordinate is reachable downstream. During depth-first scan, software temporarily writes 0xFF here. After fully enumerating the downstream subtree, it writes back the actual highest bus number found. This tells all bridges above that the range is finalised. |
| Secondary Latency Timer | 18h [31:24] | RW | Legacy PCI concept — the minimum number of PCI clock cycles a bridge must grant to the secondary bus master before reclaiming the bus. Has no operational effect in PCIe (point-to-point, no shared bus). BIOS may write a value for PCI backward compatibility but PCIe bridges ignore it. |
PCIe enumeration is performed by firmware (BIOS/UEFI) and later by the OS, scanning the topology depth-first to discover every bridge and endpoint, assigning bus numbers as it goes. Understanding the bus number registers requires understanding how this algorithm works.
The I/O Base and I/O Limit registers at offset 1Ch tell the bridge which I/O address range it should forward downstream. Any I/O TLP whose address falls in [IO_BASE, IO_LIMIT] is forwarded to the secondary bus; all others pass through the bridge upstream or are rejected.
| Register | Offset | Access | Implied bits | Minimum window |
|---|---|---|---|---|
| I/O Base | 1Ch [7:0] | RW | Bits [11:0] = 000h (base always 4 KB aligned) | 4 KB |
| I/O Limit | 1Ch [15:8] | RW | Bits [11:0] = FFFh (limit always ends at 4 KB boundary − 1) | |
| I/O Base Upper 16 | 30h [15:0] | RW | Only used when bits [3:0] of I/O Base = 1h (32-bit decode) | Provides bits [31:16] of base address |
| I/O Limit Upper 16 | 30h [31:16] | RW | Only used when bits [3:0] of I/O Base = 1h (32-bit decode) | Provides bits [31:16] of limit address |
The non-prefetchable memory window at offset 20h covers MMIO regions where reads have side effects — control/status registers, hardware FIFOs, registers that clear on read. The bridge forwards any memory TLP whose address falls in [Memory_Base, Memory_Limit] downstream.
The minimum window granularity of 1 MB means bridges always waste some address space. If a downstream endpoint claims a 4 KB MMIO BAR at F900_0000h, the bridge’s window must be programmed as F900h/F900h — opening 1 MB even though only 4 KB is used. This dead space (F900_1000h–F90F_FFFFh) cannot be assigned to other endpoints on different buses because the bridge would forward those accesses incorrectly.
The prefetchable memory window at offsets 24h–2Ch covers MMIO regions where reads have no side effects and write merging is permitted. GPU framebuffers, NVMe device memory, and large DMA ring buffers are typical occupants. The prefetchable window supports both 32-bit and 64-bit addressing.
| Register | Offset | Width | Access | Notes |
|---|---|---|---|---|
| Prefetchable Memory Base | 24h [15:0] | 16 bits | RW | Bits [15:4] store address bits [31:20]. Bits [3:0]: 0h = 32-bit prefetchable, 1h = 64-bit prefetchable (uses the Upper 32-bit registers at 28h/2Ch). Same 1 MB alignment as NP-MMIO. |
| Prefetchable Memory Limit | 24h [31:16] | 16 bits | RW | Same encoding as base — bits [15:4] store address bits [31:20], lower 20 implied FFFFFh. Bits [3:0] = same capability indicator as base. |
| Prefetchable Base Upper 32 | 28h | 32 bits | RW | When the window is 64-bit (bits [3:0] of Prefetchable Base = 1h), this register holds bits [63:32] of the base address. All-zeros for 32-bit windows. A modern GPU with 24 GB of framebuffer needs a 64-bit P-MMIO window. |
| Prefetchable Limit Upper 32 | 2Ch | 32 bits | RW | Bits [63:32] of the limit address for a 64-bit window. All-zeros for 32-bit windows. Together with the main limit register it specifies the complete 64-bit limit of the prefetchable range. |
Offset 1Ch bits [31:16]. The Secondary Status register mirrors the Status register at offset 04h, but it reports conditions observed on the secondary (downstream) bus rather than the primary bus. It has the same bit definitions and uses the same RW1C (write-1-to-clear) sticky error bits.
| Bit | Name | Access | Meaning |
|---|---|---|---|
| 21 | 66 MHz Capable | RO | Legacy PCI. Always 0 for PCIe-native bridges. |
| 23 | Fast Back-to-Back Capable | RO | Legacy PCI. Always 0 for PCIe-native bridges. |
| 24 | Master Data Parity Error | RW1C | Bridge acting as master on secondary bus received a poisoned TLP. Set when Parity Error Response Enable (Command bit 6) is set. Latches — write 1 to clear. |
| [26:25] | DEVSEL Timing | RO | Legacy PCI. Returns 01b (Medium) for PCIe bridges. |
| 27 | Signaled Target Abort | RW1C | Bridge sent a CA (Completer Abort) completion on the secondary bus side. |
| 28 | Received Target Abort | RW1C | Bridge received a CA completion from a downstream device. |
| 29 | Received Master Abort | RW1C | Bridge received a UR (Unsupported Request) completion from a downstream device. |
| 30 | Received System Error | RW1C | Bridge received an ERR_FATAL or ERR_NONFATAL message on the secondary bus. |
| 31 | Detected Parity Error | RW1C | Bridge received a poisoned TLP on the secondary bus regardless of Parity Error Response Enable. |
The distinction between the primary Status register and the Secondary Status register matters for diagnosing errors: if an error bit is set in primary Status, the problem originated upstream of this bridge; if set in Secondary Status, the problem originated downstream. This helps narrow down error sources in multi-bridge topologies.
Offset 3Ch bits [31:16]. The Bridge Control register is the Type 1 equivalent of parts of the Command register plus bridge-specific bits. It controls the bridge’s behaviour on its secondary bus side.
| Bit | Name | Reset | Meaning when set to 1 |
|---|---|---|---|
| 0 | Parity Error Response Enable | 0 | Bridge responds to parity errors on secondary bus. Mirror of primary Command register bit 6 but for the secondary side. |
| 1 | SERR# Enable | 0 | Bridge forwards ERR_FATAL and ERR_NONFATAL messages received on the secondary bus upstream. Must be set for AER-based error propagation to the Root Complex. |
| 2 | ISA Enable | 0 | Legacy ISA. When set, the bridge does not forward I/O addresses in the top 768 bytes of each 1 KB block downstream (reserves them for ISA). Not applicable in modern PCIe systems. |
| 3 | VGA Enable | 0 | Bridge forwards VGA-compatible I/O (3B0h–3BFh, 3C0h–3DFh) and memory (A0000h–BFFFFh) downstream regardless of I/O and memory window settings. |
| 4 | VGA 16-bit Decode | 0 | When VGA Enable is set and this bit = 1, only 16-bit I/O addresses are used for VGA decode (not full 32-bit). Legacy. |
| 5 | Master Abort Mode | 0 | Legacy PCI. Controls bridge behaviour on receiving a Master Abort. Not used in PCIe. |
| 6 | Secondary Bus Reset | 0 | The most important bit. When set to 1, the bridge asserts an in-band reset (Hot Reset via TS1 ordered sets) on the secondary link. All devices downstream see a reset and restart link training. Used by software to reset a downstream device without a system-wide reset. Writing 0 de-asserts the reset and recovery begins. |
| 7 | Fast Back-to-Back Enable | 0 | Legacy PCI only. Has no effect in PCIe. |
| 8 | Primary Discard Timer | 0 | Legacy PCI delayed transaction discard timer. Not used in PCIe. |
| 9 | Secondary Discard Timer | 0 | Legacy PCI. Not used in PCIe. |
| 10 | Discard Timer Status | 0 | Legacy PCI. Not used in PCIe. |
| 11 | Discard Timer SERR# Enable | 0 | Legacy PCI. Not used in PCIe. |
| [15:12] | Reserved | 0 | Must return 0 when read. |
A Type 1 header has two BARs at offsets 10h and 14h — the same positions and encoding as BAR0/BAR1 in a Type 0 header. These BARs are for the bridge’s own register space — switch management registers, configuration space access ports, debug registers, or performance counters. They are separate from the downstream address windows (I/O, NP-MMIO, P-MMIO).
Many PCIe switches have their management registers accessible via a 64-bit prefetchable MMIO BAR programmed into BAR0/BAR1. Software reads and writes these to query switch status, configure QoS, and manage power. The Base/Limit registers at offsets 20h–2Ch do not cover the bridge’s own BAR space — they only define which address ranges are forwarded further downstream.
If a bridge has no internal MMIO registers, BAR0 and BAR1 are hardwired to 0 and software skips them during allocation, exactly as with unused BARs in a Type 0 header.
Offset 38h. Same format as the Expansion ROM BAR in a Type 0 header. Bridges rarely have Expansion ROMs — this field is typically all zeros. When present, it usually holds bridge initialisation code that runs at POST time to configure the bridge before the OS loads.
Bit 0 is the Enable bit. Bits [10:1] are hardwired to 0 (ROM minimum alignment = 2 KB). Bits [31:11] hold the base address once programmed. Software uses the same write-all-1s sizing procedure as for Type 0 Expansion ROM.
The Capabilities Pointer at offset 34h [7:0] works identically to the Type 0 version — it points to the first PCI Capability structure in the linked list. All PCIe bridges must implement at minimum the Power Management Capability and the PCIe Capability. Switches also commonly implement ACS (Access Control Services) and MSI-X for management interrupts.
| Capability ID | Mandatory for bridges? | Purpose |
|---|---|---|
| 01h | Yes | Power Management — D0/D1/D2/D3hot/D3cold states for the bridge |
| 10h | Yes | PCIe Capability — Link Control/Status, Device Control/Status, link training info |
| 0Dh (ext) | Recommended | ACS — Access Control Services — prevents DMA from bypassing IOMMU via peer-to-peer |
| 0001h (ext) | Recommended | AER — Advanced Error Reporting — detailed error logging at the bridge level |
Interrupt Line and Interrupt Pin at offset 3Ch [15:0] work as in Type 0. Most bridge devices do not generate interrupts themselves, so Interrupt Pin = 0 (no interrupt). Some switch management ports use an MSI-X capability for hot-plug and error notifications — these are declared via the Capabilities linked list, not via the legacy Interrupt Pin field.
Not every bridge will have devices downstream that use all three address windows. For windows that are not needed, software must program them in the disabled state. You cannot simply write all zeros — that would create a valid zero-address window. The correct method is to write Limit less than Base:
| Window | Disabled state | Why Base > Limit works |
|---|---|---|
| I/O | IO Base = F0h, IO Limit = 00h (Limit < Base) | Bridge sees that the limit address is lower than the base address — an impossible range — and treats it as “no I/O downstream” |
| Non-Prefetchable Memory | Memory Base = FFF0h, Memory Limit = 0000h | Same logic — limit below base = invalid range = no NP-MMIO window |
| Prefetchable Memory | Pref Base = FFF1h, Pref Limit = 0000h (also zero Upper 32 regs) | Same — disabled. The Upper 32-bit registers must also be zeroed to prevent a wrap-around window in 64-bit space |
When a TLP arrives at a bridge’s ingress port, the bridge makes a routing decision based on TLP type:
Completion TLPs (responses to read requests) use ID routing — they carry the Requester ID (bus/device/function) of the original requester and are forwarded upstream through bridges whose [Secondary, Subordinate] range includes the requester’s bus number.
The Type 1 header layout — all register positions, the bus number triple, all three address windows, Secondary Status, Bridge Control — is completely unchanged in Gen 6. Gen 6 changes only the Physical Layer. Software enumerates a Gen 6 system identically to a Gen 1 system, writes the same bus number registers, and programs the same memory windows.
What changes in the configuration space of a Gen 6 bridge is in the Extended Configuration Space (offset 100h+), not in the Type 1 header itself: a new Physical Layer 64.0 GT/s Capability structure, CXL-specific extensions for CXL 3.0 deployments, and ACS enhancements for multi-tenant SR-IOV topologies. None of these affect the Type 1 header fields described in this post.
| Register / Field | Offset | Access | Key rule or value |
|---|---|---|---|
| Vendor/Device ID, Command, Status, Class Code (06h.04h.00h), BAR0, BAR1 | 00h–14h | same as Type 0 | Class Code identifies a PCIe P2P bridge. BAR0/BAR1 for bridge’s own MMIO, not downstream windows. |
| Primary Bus Number | 18h [7:0] | RW | Bus upstream of this bridge. Root Port = 0. Written by enumeration software. |
| Secondary Bus Number | 18h [15:8] | RW | Bus directly downstream. Devices on this bus use this number. Assigned at enumeration. |
| Subordinate Bus Number | 18h [23:16] | RW | Highest bus reachable downstream. Initially FFh during depth-first scan, updated after subtree completes. |
| Secondary Status | 1Ch [31:16] | mixed | Same bit layout as primary Status. Reports secondary bus errors. RW1C sticky bits. |
| I/O Base / Limit | 1Ch [15:0] | RW | Bits [7:4] each = address bits [15:12]. Lower 12 implied (0s base, Fs limit). 4 KB minimum. Disable: Limit < Base. |
| I/O Base/Limit Upper 16 | 30h | RW | Used only for 32-bit I/O decode (bits [3:0] of I/O Base = 1h). Zero for 16-bit decode. |
| Memory Base / Limit (NP) | 20h | RW | Address bits [31:20]. Lower 20 implied (0s / Fs). 1 MB minimum. 32-bit only. Disable: Limit < Base. |
| Prefetchable Base / Limit | 24h | RW | Same encoding as NP. Bits [3:0] = 0h (32-bit) or 1h (64-bit). Use Upper 32-bit regs at 28h/2Ch for 64-bit. |
| Pref Base/Limit Upper 32 | 28h, 2Ch | RW | Address bits [63:32] for 64-bit P-MMIO window. Required for Gen 4/5/6 GPU with >4 GB framebuffer. |
| Capabilities Pointer | 34h [7:0] | RO | Points to PCI Capability list. PM and PCIe Capability mandatory for all bridges. |
| Expansion ROM | 38h | mixed | Usually 0 for bridges. Same format as Type 0. |
| Interrupt Line / Pin | 3Ch [15:0] | mixed | Usually 0. MSI-X used for switch management interrupts if needed. |
| Bridge Control | 3Ch [31:16] | RW | Bit 0: Parity Error Response. Bit 1: SERR Enable (forward errors). Bit 6: Secondary Bus Reset (Hot Reset downstream). All others legacy or reserved. |
| Config TLP routing rule | — | — | Bus == Secondary → Type 0 conversion. Secondary < Bus ≤ Subordinate → Type 1 forward. Outside → ignore. |
| Memory TLP routing rule | — | — | In NP-MMIO or P-MMIO window → forward. In bridge BAR → consume. Else → ignore or UR. |
| Disabling windows | — | — | Set Limit < Base for any unused window. Never leave uninitialized — BIOS must initialise all windows before enabling bridge. |