diff --git a/.gitignore b/.gitignore index 97aafd6..bcd9ab4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ pciutils-3.1.6.tar.gz /pciutils-3.6.3.tar.xz /pciutils-3.6.4.tar.xz /pciutils-3.7.0.tar.xz +/pciutils-3.8.0.tar.xz diff --git a/pciutils-2.2.1-idpath.patch b/pciutils-2.2.1-idpath.patch index edb58d7..fdd5f9c 100644 --- a/pciutils-2.2.1-idpath.patch +++ b/pciutils-2.2.1-idpath.patch @@ -2,7 +2,7 @@ diff -up pciutils-3.0.0/Makefile.idpath pciutils-3.0.0/Makefile --- pciutils-3.0.0/Makefile.idpath 2008-04-10 21:19:43.000000000 +0200 +++ pciutils-3.0.0/Makefile 2008-09-01 15:16:19.000000000 +0200 @@ -27,7 +27,7 @@ ABI_VERSION=.3 - PREFIX=/usr/local + BINDIR=$(PREFIX)/bin SBINDIR=$(PREFIX)/sbin SHAREDIR=$(PREFIX)/share -IDSDIR=$(SHAREDIR) diff --git a/pciutils-3.7.0-decodercec.patch b/pciutils-3.7.0-decodercec.patch deleted file mode 100644 index 036cba1..0000000 --- a/pciutils-3.7.0-decodercec.patch +++ /dev/null @@ -1,444 +0,0 @@ -From e12bd01eea67ca8cf539263124843ba281eb6ecc Mon Sep 17 00:00:00 2001 -From: Sean V Kelley -Date: Wed, 24 Jun 2020 15:39:40 -0700 -Subject: 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. - -Suggested-by: Bjorn Helgaas -Signed-off-by: Sean V Kelley ---- - 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 - -diff --git a/lib/header.h b/lib/header.h -index 472816e..57a9343 100644 ---- a/lib/header.h -+++ b/lib/header.h -@@ -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 */ -diff --git a/ls-ecaps.c b/ls-ecaps.c -index e71209e..99c55ff 100644 ---- a/ls-ecaps.c -+++ b/ls-ecaps.c -@@ -634,6 +634,61 @@ cap_rclink(struct device *d, int where) - } - } - -+static void -+cap_rcec(struct device *d, int where) -+{ -+ printf("Root Complex Event Collector Endpoint Association\n"); -+ if (verbose < 2) -+ return; -+ -+ if (!config_fetch(d, where, 12)) -+ return; -+ -+ u32 hdr = get_conf_long(d, where); -+ byte cap_ver = PCI_RCEC_EP_CAP_VER(hdr); -+ u32 bmap = get_conf_long(d, where + PCI_RCEC_RCIEP_BMAP); -+ printf("\t\tRCiEPBitmap: "); -+ if (bmap) -+ { -+ int prevmatched=0; -+ int adjcount=0; -+ int prevdev=0; -+ printf("RCiEP at Device(s):"); -+ for (int dev=0; dev < 32; dev++) -+ { -+ if (BITS(bmap, dev, 1)) -+ { -+ if (!adjcount) -+ printf("%s %u", (prevmatched) ? "," : "", dev); -+ adjcount++; -+ prevdev=dev; -+ prevmatched=1; -+ } -+ else -+ { -+ if (adjcount > 1) -+ printf("-%u", prevdev); -+ adjcount=0; -+ } -+ } -+ } -+ else -+ printf("%s", (verbose > 2) ? "00000000 [none]" : "[none]"); -+ printf("\n"); -+ -+ if (cap_ver < PCI_RCEC_BUSN_REG_VER) -+ return; -+ -+ u32 busn = get_conf_long(d, where + PCI_RCEC_BUSN_REG); -+ u8 lastbusn = BITS(busn, 16, 8); -+ u8 nextbusn = BITS(busn, 8, 8); -+ -+ if ((lastbusn == 0x00) && (nextbusn == 0xff)) -+ printf("\t\tAssociatedBusNumbers: %s\n", (verbose > 2) ? "ff-00 [none]" : "[none]"); -+ else -+ printf("\t\tAssociatedBusNumbers: %02x-%02x\n", nextbusn, lastbusn ); -+} -+ - static void - cap_dvsec_cxl(struct device *d, int where) - { -@@ -991,8 +1046,8 @@ show_ext_caps(struct device *d, int type) - case PCI_EXT_CAP_ID_RCILINK: - printf("Root Complex Internal Link \n"); - break; -- case PCI_EXT_CAP_ID_RCECOLL: -- printf("Root Complex Event Collector \n"); -+ case PCI_EXT_CAP_ID_RCEC: -+ cap_rcec(d, where); - break; - case PCI_EXT_CAP_ID_MFVC: - printf("Multi-Function Virtual Channel \n"); -diff --git a/setpci.c b/setpci.c -index 90ca726..2cb70fa 100644 ---- a/setpci.c -+++ b/setpci.c -@@ -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" }, -diff --git a/tests/cap-rcec b/tests/cap-rcec -new file mode 100644 -index 0000000..836d9a1 ---- /dev/null -+++ b/tests/cap-rcec -@@ -0,0 +1,299 @@ -+6a:00.4 Generic system peripheral [0807]: Intel Corporation Device 0b23 -+ Subsystem: Intel Corporation Device 0000 -+ Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- -+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- - 3.8.0-1 +- updated to 3.8.0 + * Thu Jan 20 2022 Fedora Release Engineering - 3.7.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 1ba7eff..77e49c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pciutils-3.7.0.tar.xz) = eaae09a1a91137f026aaa7484baa6fb138146dbe58a7fd5eb4cd38f206426a123b27e397c8f6a62eaef627470bff109365cd137a04358ec6a4539da342661f26 +SHA512 (pciutils-3.8.0.tar.xz) = de9732823c9775057a2b26967fbc170451209cd3e2be2ecffd90effb72189ed70c0199667ea4396247d996a3cb9c737f7d96c160f996507e64998ece5fd1187f