aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2019-12-13 23:46:59 +0000
committerScott Long <scottl@FreeBSD.org>2019-12-13 23:46:59 +0000
commit97faa4c470d11b5d234829dd146432db808e6e8b (patch)
tree4abd3d72ad0bb117a1a642f1cdff18d466432945 /sys/dev/pci
parent93dafad57af81a238b3805e4385d78a8a091d859 (diff)
Add accessors for the Vendor Specific Extended Capability (VSEC)
Parse out the VSEC. If the user invokes a second -c command line option, do a hex dump of the vendor data. Reviewed by: imp MFC after: 3 days Sponsored by: Intel Differential Revision: http://reviews.freebsd.org/D22808
Notes
Notes: svn path=/head/; revision=355741
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pcireg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h
index 4764b7c26621..ed93aaca2694 100644
--- a/sys/dev/pci/pcireg.h
+++ b/sys/dev/pci/pcireg.h
@@ -1049,6 +1049,13 @@
#define PCIR_SRIOV_BARS 0x24
#define PCIR_SRIOV_BAR(x) (PCIR_SRIOV_BARS + (x) * 4)
+/* Extended Capability Vendor-Specific definitions */
+#define PCIR_VSEC_HEADER 0x04
+#define PCIR_VSEC_ID(hdr) ((hdr) & 0xffff)
+#define PCIR_VSEC_REV(hdr) (((hdr) & 0xf0000) >> 16)
+#define PCIR_VSEC_LENGTH(hdr) (((hdr) & 0xfff00000) >> 20)
+#define PCIR_VSEC_DATA 0x08
+
/*
* PCI Express Firmware Interface definitions
*/