pciutils: Add decode support for RCECs
Subsystems (2)
PATCH v3 1/1 pciutils: Add decode support for RCECs
Root Complex Event Collectors provide support for terminating error and PME messages from RCiEPs. This patch provides basic decoding for the lspci RCEC Endpoint Association Extended Capability. See PCIe 5.0-1, sec 7.9.10 for further details.
---
Changes since v2 [1]:
- Incorporated suggested improvement to RCiEP bitmap generation.
- Extended to support hyphenating adjacent devices in bitmap.
- Added verbose granularity on "none" cases for bitmap and BUSN reporting.
- Corrected use of "first" with "next" as found in the Spec.
- Reported "AssociatedBusNumbers" as a single hyphenated field.
- Regenerated test output with new formatting.
i.e.,
"-vvv" case
Capabilities: [160 v2] Root Complex Event Collector Endpoint Association
RCiEPBitmap: 00000000 [none]
AssociatedBusNumbers: ff-00 [none]
"-vv" case
Capabilities: [160 v2] Root Complex Event Collector Endpoint Association
RCiEPBitmap: [none]
AssociatedBusNumbers: [none]
(Bjorn Helgaas)
[1] https://lore.kernel.org/linux-pci/[email protected]/
Thanks,
Sean
--- lib/header.h | 8 +- ls-ecaps.c | 59 +++++++++- setpci.c | 2 +- tests/cap-rcec | 299 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 364 insertions(+), 4 deletions(-) create mode 100644 tests/cap-rcec
lib/header.h +7 -1
@@ -219,7 +219,7 @@#define PCI_EXT_CAP_ID_PB 0x04/* Power Budgeting */ #define PCI_EXT_CAP_ID_RCLINK 0x05/* Root Complex Link Declaration */ #define PCI_EXT_CAP_ID_RCILINK 0x06/* Root Complex Internal Link Declaration */ -#define PCI_EXT_CAP_ID_RCECOLL 0x07/* Root Complex Event Collector */ +#define PCI_EXT_CAP_ID_RCEC 0x07/* Root Complex Event Collector */ #define PCI_EXT_CAP_ID_MFVC 0x08/* Multi-Function Virtual Channel */ #define PCI_EXT_CAP_ID_VC2 0x09/* Virtual Channel (2nd ID) */ #define PCI_EXT_CAP_ID_RCRB 0x0a/* Root Complex Register Block */
@@ -1048,6 +1048,12 @@#define PCI_RCLINK_LINK_ADDR 8/* Link Entry: Address (64-bit) */ #define PCI_RCLINK_LINK_SIZE 16/* Link Entry: sizeof */ +/* Root Complex Event Collector Endpoint Association */ +#define PCI_RCEC_EP_CAP_VER (reg) (((reg) >> 16) & 0xf) +#define PCI_RCEC_BUSN_REG_VER 0x02/* as per PCIe sec 7.9.10.1 */ +#define PCI_RCEC_RCIEP_BMAP 0x0004/* as per PCIe sec 7.9.10.2 */ +#define PCI_RCEC_BUSN_REG 0x0008/* as per PCIe sec 7.9.10.3 */ +/* PCIe Vendor-Specific Capability */ #define PCI_EVNDR_HEADER 4/* Vendor-Specific Header */ #define PCI_EVNDR_REGISTERS 8/* Vendor-Specific Registers */
ls-ecaps.c +57 -2
71 lines not on this page · raw message
setpci.c +1 -1
@@ -350,7 +350,7 @@ static const struct reg_name pci_reg_names[] = { { 0x20004, 0, 0, "ECAP_PB" }, { 0x20005, 0, 0, "ECAP_RCLINK" }, { 0x20006, 0, 0, "ECAP_RCILINK" }, - { 0x20007, 0, 0, "ECAP_RCECOLL" }, + { 0x20007, 0, 0, "ECAP_RCEC" }, { 0x20008, 0, 0, "ECAP_MFVC" }, { 0x20009, 0, 0, "ECAP_VC2" }, { 0x2000a, 0, 0, "ECAP_RBCB" },
tests/cap-rcec new file +299 -0
299 lines not on this page · raw message
--
2.27.0
Martin Mareš
AppliedHello!
Quoted 4 lines
Root Complex Event Collectors provide support for terminating error and PME messages from RCiEPs. This patch provides basic decoding for the lspci RCEC Endpoint Association Extended Capability. See PCIe 5.0-1, sec 7.9.10 for further details.
Applied.
Thanks and sorry for the delay.
Have a nice fortnight
Signature · 3 lines
Martin `MJ' Mareš <[email protected]> http://mj.ucw.cz/ United Computer Wizards, Prague, Czech Republic, Europe, Earth, Universe A Bash poem: time for echo in canyon; do echo $echo $echo; done
Quoted 7 lines · Martin Mareš
Hello!
Quoted 4 lines
Root Complex Event Collectors provide support for terminating error and PME messages from RCiEPs. This patch provides basic decoding for the lspci RCEC Endpoint Association Extended Capability. See PCIe 5.0-1, sec 7.9.10 for further details.
Quoted 5 lines
Applied.
Thanks and sorry for the delay.
Have a nice fortnight
Many thanks Martin.
Cheers,
Sean
Quoted 4 lines
Signature · 3 lines
Martin `MJ' Mareš <[email protected]> http://mj.ucw.cz/ United Computer Wizards, Prague, Czech Republic, Europe, Earth, Universe A Bash poem: time for echo in canyon; do echo $echo $echo; done