Chapter 6: System Architecture

Interrupts, Error Handling, Hot-Plug, and Advanced Features

Interrupt Mechanisms

PCIe supports multiple interrupt mechanisms for backward compatibility and modern efficiency:

MechanismVectorsRoutingRecommendation
INTx (Legacy)4 (shared)In-band messagesAvoid - legacy only
MSI1-32Memory writesPreferred for simple devices
MSI-XUp to 2048Memory writesPreferred for complex devices

MSI and MSI-X

Why MSI/MSI-X is Better

  • No shared interrupt lines
  • Multiple vectors per device
  • Lower latency - memory write vs. sideband signal
  • Per-CPU targeting possible
  • No IRQ routing complexity

MSI-X Table Structure

MSI-X uses a table in device memory (BAR space) with entries containing:

Error Handling

Error Classification

  • Correctable: Hardware can recover, no data loss
  • Non-Fatal Uncorrectable: Transaction failed, but link OK
  • Fatal Uncorrectable: Link compromised, reset needed
Error TypeExamplesReporting
CorrectableReceiver Error, Bad TLP, Bad DLLP, Replay TimeoutERR_COR message
Non-FatalCompletion Timeout, Unsupported RequestERR_NONFATAL message
FatalData Link Protocol Error, Malformed TLP, ECRC ErrorERR_FATAL message

Advanced Error Reporting (AER)

AER provides detailed error logging and control through extended capability registers:

Hot-Plug Support

PCIe supports native hot-plug for adding/removing devices without system shutdown:

Attention Indicator

LED showing slot status (on, off, blinking)

Power Indicator

LED showing power status to slot

Attention Button

User request for hot-plug operation

Power Controller

Hardware to control slot power

Presence Detect

Detects card insertion/removal

MRL Sensor

Manually-operated Retention Latch sensor

Access Control Services (ACS)

ACS provides isolation controls for peer-to-peer transactions, critical for virtualization:

AtomicOps

AtomicOps provide atomic read-modify-write operations across PCIe:

Useful for synchronization in multi-device systems (GPUs, accelerators).

Downstream Port Containment (DPC)

DPC automatically contains errors at a downstream port to prevent propagation: