Focuses on PCIe configuration space deep dive, advanced BARs, Type0/Type1 headers, Address Translation Services (ATS), PASID, and TLP routing rules.


1. Advanced PCIe Configuration Space

  • PCIe configuration space allows the system to discover and initialize devices
  • Extended 4KB space supports modern features beyond legacy 256 bytes
  • Includes capability registers for MSI, power management, virtual channels, and advanced error reporting

ASCII Layout: Advanced Config Space

Offset 0x00-0x3F: Standard Header (Type0 / Type1)
Offset 0x40-0xFF: Capability List (MSI, Power, AER, VC)
Offset 0x100-0xFFF: Extended capabilities (ATS, SR-IOV, Vendor-specific)

2. Type0 & Type1 Headers Advanced Usage

2.1 Type0 Header (Endpoint Devices)

  • Contains BARs, interrupt lines, latency timers, capabilities
  • Advanced usage: multi-function devices, MSI-X vector table mapping, extended BARs

ASCII Example – Type0 Extended

BAR0  BAR1  BAR2
BAR3  BAR4  BAR5
MSI/MSI-X Vector Table
Power Management Capabilities
Extended Capabilities (ATS, SR-IOV)

2.2 Type1 Header (Bridges / Switches)

  • Supports downstream bus number allocation
  • Defines memory, I/O, and prefetchable regions
  • Enables hot-plug and multi-function bridge devices

ASCII Example – Type1 Extended

Primary Bus  Secondary Bus  Subordinate Bus
IO Base / Limit  Mem Base / Limit  Prefetchable Mem
Capability Registers
Extended Capabilities (ATS, PTM)

3. Base Address Registers (BARs) Deep Dive

  • BARs map device memory or I/O space to system address space
  • Each BAR includes:
    • Memory type (32-bit, 64-bit, prefetchable)
    • Address range size
    • Control bits for caching, memory ordering, and attributes

ASCII BAR Example

BAR0: Memory 0x80000000 - 0x800FFFFF (1MB, prefetchable)
BAR1: I/O   0x0000C000 - 0x0000C0FF (256B)
BAR2: Memory 0x90000000 - 0x9000FFFF (64KB, non-prefetchable)

4. Address Translation Services (ATS)

  • ATS enables endpoints to request virtual-to-physical translations from Root Complex
  • Useful for virtualized environments and IOMMU
  • Endpoint sends ATS Request TLP, Root Complex responds with ATS Completion TLP

ASCII ATS Flow

[Endpoint] -> ATS Request -> [Root Complex] -> ATS Completion -> Endpoint

Reduces software overhead and memory translation latency.


5. Process Address Space ID (PASID) Functionality

  • PASID allows tagging multiple streams of transactions from a single function
  • Supports efficient virtualization
  • Each TLP includes PASID in the header to indicate process context

ASCII PASID Example

TLP Header: [Requester ID][PASID][Address][Command]

6. TLP Routing Rules

6.1 Address Routing

  • Switch uses TLP address to select downstream port
  • Ensures correct delivery to target endpoint

6.2 ID Routing

  • Uses Requester ID in TLP header
  • Useful in complex switch topologies

6.3 Implicit Routing

  • Uses TLP hints such as Steering Tags or Traffic Class
  • Optimizes multi-VC and QoS traffic flow

ASCII Routing Example

TLP Dest Addr: 0x8000 -> Switch -> Endpoint2
TLP ReqID: 0x01 -> Switch -> Endpoint1
TLP VC0 -> Steering Tag 3 -> Endpoint3

7. Transaction Processing Hints (TPH) Rules

  • TPH allows endpoints to hint completion routing
  • Reduces latency by optimizing TLP flow
  • Supports Flit and Non-Flit modes

ASCII TPH Example

TLP with TPH hint -> Switch -> Root Complex -> Endpoint

8. Summary – Advanced Configuration & Routing

Responsibilities:

  • Extended configuration space for capabilities and virtualized features
  • Advanced BAR usage for memory mapping and I/O
  • ATS & PASID for efficient virtualization support
  • TLP routing using address, ID, implicit hints, and TPH
  • Type0/Type1 headers provide advanced endpoint and bridge management

Scroll to Top