PCIe Chapter 12: Error Evidence, Reporting, and Containment
Preserve evidence along an error-reporting path
AER (Advanced Error Reporting) supplies error status, reporting controls and related records. Follow normal error reporting before comparing masked errors and DPC containment. Chapter 5 provides transaction context and Chapter 7 provides notification context.
- DPC
- Downstream Port Containment
Specification route: Classification in Figure 6-1 → status, mask and severity → reporting in Figure 6-3 → root records → preservation and clearing → DPC.
PCIe error analysis connects detection, reporting, reception, and containment. Status does not prove that a message arrived; Source ID identifies a reporter rather than the physical root cause. Two separate AER and DPC examples show how to respect those boundaries.
- AER
- Advanced Error Reporting
Connect evidence from the Function to the Root
Correctable Errors can be recovered by the protocol but may affect performance. Uncorrectable Errors affect functionality and are classified Non-Fatal or Fatal. Non-Fatal does not establish successful work, and Fatal does not directly diagnose a failed chip. AER adds detailed status, masks, severity, and logs to baseline reporting; absence of AER does not imply absence of all reporting.
Inspect source Status, the Mask/Severity/Device Control settings at detection, valid Header Logs, and then Root Error Status/Source ID. Check DPC separately if containment is possible. Later configuration reads do not automatically reconstruct earlier settings. Sources: §6.2.1–§6.2.4 (pp.669–679), Figure 6-1 (p.670).
Two status bits, one unmasked error
Traverse Extended Capabilities on 03:00.0 and use Figure 7-154 to identify AER ID=0x0001. This example has base=0x100, Version=2, Next=0; Base 6.0 does not imply this Function implements all Flit features. Earlier records were cleared, settings remained unchanged, and forwarding along the path is enabled.
| Register / offset | Value | Interpretation |
|---|---|---|
| Header / 0x100 | 0x00020001 | AER, Version 2. |
| Uncorrectable Status / 0x104 | 0x00044000 | Completion Timeout bit 14; Malformed TLP bit 18. |
| Mask / 0x108 | 0x00040000 | Masks the recorded Malformed TLP error. |
| Severity / 0x10C | 0x00040000 | Non-Fatal Timeout; Fatal Malformed TLP. |
| AER Capabilities and Control / 0x118 | 0x0000100E | FEP=14; Timeout Header Log Capable=1. |
| Device Control / 0x78, 16 bits | 0x2816 | Non-Fatal and Fatal Reporting Enables set. |
- TLP
- Transaction Layer Packet
0x00044000 & ~0x00040000 = 0x00004000: only the recorded Timeout is unmasked. A masked error can set Status but does not generate its Error Message or update the Header Log, TLP Prefix Log, or FEP. Fatal severity does not override masking. Under these assumptions, Timeout produces ERR_NONFATAL according to Severity and Device Control. These are configured values, not reset defaults.
The complete path also includes Bridge forwarding, Root primary-interface transmission controls, and interrupt conditions. Follow Figure 6-3 through the path. Unsupported Request and Advisory Non-Fatal errors have additional rules; the example's arithmetic is not a general reporting algorithm.
Fields and reporting
Figures 7-154–7-157/Tables 7-134–7-137 (pp.1112–1117); Figure 7-25/Table 7-21 (pp.958–962); §6.2.3.2.2 (p.673), §6.2.6/Figure 6-3 (pp.683–685), §6.2.8.1 (p.692).
Validate the log before decoding the transaction
FEP=14 is valid because Status bit 14 is set. Completion Timeout Header Log Capable bit 12 supports recording the timed-out Request. Multiple Header Recording bits 9 and 10 are clear; there is no Flit or Prefix support. The example has four DWORDs of log capacity but uses a three-DWORD Header.
| Offset | DWORD value | Content |
|---|---|---|
| 0x11C | 0x00000040 | 3 DW Memory Read, Length=64 DW. |
| 0x120 | 0x030013FF | Requester=0x0300, Tag=0x13, both Byte Enables=0xF. |
| 0x124 | 0x40001000 | Starting address. |
| 0x128 | Not interpreted | The fourth DWORD is undefined for this 12-byte Header. |
- DW
- Double Word, a four-byte unit
The Request covers 0x40001000–0x400010FF, or 256 bytes. It is the Request that did not complete in time, not a timed-out Completion. Figure 7-161 places Header byte 0 at bits 31:24 for DWORD reads; do not reverse these values again. Flit logs require Logged TLP was Flit Mode, Header Log Size, Logged TLP Size, and Type/OHC interpretation.
- OHC
- Orthogonal Header Content
This locates a transaction and its timeout, not the responsible Endpoint, Completer, Link, or platform component. It cannot be assigned to the masked Malformed TLP event, which did not create this log.
Validity and format
§6.2.4.2 (pp.679–680); Figures 7-160/7-161, Tables 7-140/7-141 (pp.1121–1123). Memory Requests: Chapter 5.
The Root Source ID identifies the first reporter
| Root AER base=0x100 | Value | Meaning |
|---|---|---|
| Root Error Command / 0x12C | 0x00000002 | Non-Fatal interrupt reporting enabled. |
| Root Error Status / 0x130 | 0x00000024 | Uncorrectable Received and Non-Fatal Received. |
| Error Source ID / 0x134 | 0x03000000 | Upper 16 bits=0x0300, or 03:00.0. |
The Root interrupt message number is 0 and primary-interface transmission conditions are satisfied. Source ID identifies the Endpoint reporting Timeout, not the physical cause. A second message in the same category sets Multiple without replacing the first Source ID.
Root Status updates independently of Root Error Command/Root Control, but still requires applicable primary-interface transmission enables. CPU interrupt delivery additionally requires vector and routing evidence. Sources: Figures 7-162–7-164/Tables 7-142–7-144 (pp.1123–1127).
Preserve correlated records before clearing
The author recommends saving status, configuration, FEP, valid logs, and Root/DPC evidence while checking for concurrency. Separate register reads are not automatically an atomic snapshot. Clearing the status indicated by FEP can advance hardware to another log, destroying the original association if done before capture.
With Multiple Header Recording enabled and valid FEP, the specification recommends processing records through FEP rather than clearing unrelated status; it lists an exception for masked errors known to lack recorded headers. PCI Status and AER Status are also cleared independently. Sources: §6.2.4.2 (pp.679–681, footnote 108), §6.2.7.1 (p.691).
DPC can contain the error before its original message reaches the Root
Now consider a separate event on Switch Downstream Port 02:01.0, with DPC base=0x300 and no RP Extensions.
| Field / offset | Value | Meaning |
|---|---|---|
| Header / 0x300 | 0x0001001D | ID=0x001D, Version=1. |
| Control / 0x306, 16 bits | 0x000A | Trigger Enable=10b; Interrupt Enable=1. |
| Status / 0x308, 16 bits | 0x000B | Triggered, Reason=01b, Interrupt Status=1. |
| Error Source ID / 0x30A, 16 bits | 0x0300 | The triggering ERR_NONFATAL came from 03:00.0. |
Enable=10b triggers on a local unmasked Uncorrectable Error or a received ERR_NONFATAL/ERR_FATAL. Reason=01b makes Source ID meaningful here; Reason=00b would not. The triggering message is discarded at the Port rather than forwarded to the Root. This example enables DPC interrupts but not DPC ERR_COR, so the earlier Root value 0x24 is not an expected companion snapshot.
Why does the Link remain down after acknowledging the interrupt?
Figure 7-300 places DPC Trigger Status in bit 0 and DPC Interrupt Status in bit 3. Both clear on a write of 1, but they have different effects: bit 3 handles interrupt status; bit 0 keeps containment active. Clearing bit 0 permits the Link Training and Status State Machine (LTSSM) to leave Disabled and return to Detect to attempt Link establishment.
Simulated data: this teaching scenario does not represent a particular device or platform. Continue the separate DPC event above: 02:01.0 received ERR_NONFATAL from 03:00.0 and DPC Status reads 0x000B. This example saves evidence, clears only interrupt status, and then waits for containment-release conditions. The upstream management path to the Switch remains available; the disabled Link is the one from 02:01.0 to 03:00.0. No new DPC event or concurrent software write occurs.
| Action and location | DPC Interrupt Status, bit 3 | DPC Trigger Status, bit 0 | Result |
|---|---|---|---|
| Read 0x308: 0x000B | 1 | 1 | Interrupt and containment are recorded; Reason=01b. |
| After saving evidence, write 0x0008 to 0x308 using 16 bits | Clears to 0 | Remains 1 | The example reads 0x0003; the Port remains in DPC. |
| After release conditions are met, write 0x0001 to 0x308 using 16 bits | Remains 0 here | Clears to 0 | Return to Detect; Reason is invalid, so no fixed whole-register readback is specified. |
Splitting the writes makes their effects visible; the specification does not require every software implementation to use this sequence. The release conditions are mandatory. Writing the read value 0x000B back is not an interrupt-only acknowledgment: it writes 1 to both bit 3 and bit 0, releasing containment as well.
The waiting branch below follows §6.2.11: software must observe Data Link Layer Link Active=0 in Link Status before releasing DPC. Releasing it earlier has undefined results. DPC RP Busy is Reserved on this Switch Downstream Port; a Root Port supporting RP Extensions must additionally wait for that bit to read 0.
- LTSSM
- Link Training and Status State Machine
Who responds to a new Memory Read during containment?
Follow §2.9.3, Transaction Layer Behavior During Downstream Port Containment. Assume the Root Complex sends a new, valid Memory Read targeting a BAR in 03:00.0 through 02:01.0. It is submitted for downstream transmission after the Port is already in DPC. The Port discards this Request and generates an error Completion.
- BAR
- Base Address Register
Figure 7-299 and Table 7-263 determine the status: DPC Control=0x000A has DPC Completion Control, bit 2, cleared, so the response is Completer Abort (CA). Setting that bit instead selects Unsupported Request (UR). The Completion's Completer ID identifies Downstream Port 02:01.0, which terminates this Request. The earlier DPC Error Source ID of 03:00.0 identifies the sender of the message that triggered containment.
CA in this scenario comes from the Port's DPC handling; it does not establish that the Endpoint accepted or executed the read. A Request transmitted before containment, whose Completion is prevented from returning by DPC, is a different case. Without the Root Port Extensions completion-synthesis mechanism in this example, its Requester may encounter Completion Timeout. Track termination of the new Request separately from completion of earlier work.
What remains after containment is released?
Table 7-264 requires the Port to leave DPC and the LTSSM to transition to Detect when DPC Trigger Status clears. Training is only being attempted. Software still observes Link and Data Link recovery, honors the applicable §6.6.1 timing for the first Configuration Read following Conventional Reset, and restores configuration and driver operation. Chapter 9 covers the reset and readiness conditions.
Release changes log interpretation too: DPC Trigger Reason is invalid when DPC Trigger Status is clear, so analyze this event using the saved snapshot. Once release requirements are met, the specification permits clearing Trigger Status regardless of other status bits associated with the triggering event. Clearing every error record is therefore not a prerequisite for release. Rebuilding device work, resolving earlier outstanding data and restoring application service still require device, driver and platform recovery procedures.
Reading path: fields, contained transactions and release conditions
PCI Express Base Specification Revision 6.0: Figure 7-300 DPC Status Register/Table 7-264, §7.9.14.4 (PDF/printed pp.1252–1253), locates Trigger Status, Interrupt Status, Reason validity and applicable RP Busy. Section 6.2.11 Downstream Port Containment (DPC) (p.694) requires Link Active=0 before release; §6.2.11.1 DPC Interrupts (p.697) gives interrupt conditions. During containment, use §2.9.3 Transaction Layer Behavior During Downstream Port Containment (p.262), then Figure 7-299 DPC Control Register/Table 7-263, §7.9.14.3 (pp.1250–1251), for DPC Completion Control. Source interpretation uses Figure 7-301/Table 7-265, §7.9.14.5 DPC Error Source ID Register (pp.1253–1254). First configuration access after release follows §6.6.1 Conventional Reset (pp.721–723). PDF and printed page numbers match here. The software sequence is an author-created demonstration.
Check the evidence limits
Can FEP=14 identify the latest Timeout when Status bit 14 is clear?
No. FEP is invalid; a nonzero log cannot replace the validity condition. Source: §6.2.4.2.
Does Status=0 prove an error never occurred?
No. Status may have been cleared or reset, and detection and implementation conditions also matter. Sources: §6.2.4.2, Table 7-135.


Comments