This patch monitors the OPAL message log for PCIe errors, and attempts to print the error status of all PHBs if an error message is found. Log format compatibility is maintained with Linux, enabling use of the standard phberr.py tool for PHB EEH analysis.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Example output from physically yanking out an active card on a Blackbird host:
opal_handle_phb_error PHB error detected. Please file a bug report. pcib0: Found PCI error set on PE#ffffffffffffffff, retreiving PHB error log from OPAL pcib0: Retrieved PHB error log from OPAL, dumping... pcib0: PHB4 PHB#0 Diag-data (Version: 1) pcib0: brdgCtl: 00000002 pcib0: RootSts: 00000040 00002000 01010008 00100104 00000000 pcib2: Found PCI error set on PE#ffffffffffffffff, retreiving PHB error log from OPAL pcib2: Retrieved PHB error log from OPAL, dumping... pcib2: PHB4 PHB#1 Diag-data (Version: 1) pcib2: brdgCtl: 00000002 pcib2: RootSts: 00010040 00402000 e8810008 00100107 00000000 pcib2: RootErrSts: 00000000 00000000 00000001 pcib2: PhbSts: 0000001800000000 0000001800000000 pcib2: Lem: 0000000100000000 0000000000000000 0000000100000000 pcib2: PhbErr: 0000008000000000 0000008000000000 2148000098000240 a008400000000000 pcib2: PcieDlp: 0000000000000000 0000000000000000 0800000000000000 pcib2: RegbErr: 0050000010000000 0000000010000000 a1000c4800000000 0000000007011000 pcib4: Found PCI error set on PE#ffffffffffffffff, retreiving PHB error log from OPAL pcib4: Retrieved PHB error log from OPAL, dumping... pcib4: PHB4 PHB#2 Diag-data (Version: 1) pcib4: brdgCtl: 00000002 pcib4: RootSts: 00000040 00402000 a0220008 00100107 00000000 pcib4: RegbErr: 0040000000000000 0000000000000000 a2000a4008000101 0800010100000000 pcib6: Found PCI error set on PE#ffffffffffffffff, retreiving PHB error log from OPAL pcib6: Retrieved PHB error log from OPAL, dumping... pcib6: PHB4 PHB#3 Diag-data (Version: 1) pcib6: brdgCtl: 00000002 pcib6: RootSts: 00000040 00402000 a0120008 00100107 00000000 pcib6: RegbErr: 0040000000000000 0000000000000000 a2000a4008000101 0800010100000000 pcib8: Found PCI error set on PE#ffffffffffffffff, retreiving PHB error log from OPAL pcib8: Retrieved PHB error log from OPAL, dumping... pcib8: PHB4 PHB#4 Diag-data (Version: 1) pcib8: brdgCtl: 00000002 pcib8: RootSts: 00000020 00402000 20210008 00100107 00000000 pcib10: Found PCI error set on PE#ffffffffffffffff, retreiving PHB error log from OPAL pcib10: Retrieved PHB error log from OPAL, dumping... pcib10: PHB4 PHB#5 Diag-data (Version: 1) pcib10: brdgCtl: 00000002 pcib10: RootSts: 00000020 00402000 a0120008 00100107 00000000 pcib10: Found PCI error set on PE#ffffffffffffffff, retreiving PHB error log from OPAL pcib10: Retrieved PHB error log from OPAL, dumping... pcib10: PHB4 PHB#5 Diag-data (Version: 1) pcib10: brdgCtl: 00000002 pcib10: RootSts: 00000020 00402000 a0120008 00100107 00000000
Running through phberr.py yields useful and correct information:
==== PHB Register dump found ====
pcib2: PHB4 PHB#1 Diag-data (Version: 1)
phbErrorStatus = 0000008000000000:
! 24 - pcie_etu_regb_err_inf
phbRegbErrorStatus = 0050000010000000:
9 - PCIE Link Up
11 - PCIE Link BW Management Event Status
! 35 - DL_EC08_RECEIVERERROR