On Thu, Mar 16, 2017 at 03:19:23PM +0100, Simon Mages wrote: > Hi, > > right now i got the chance to play a little bit with PCIe. I read some > parts of the spec > and was interessted what my PCIe devices can do. I also found out that > pcidump can > not display the Enhanced Capabilites. > > This patch enables pcidump to display them. > > I did not find a good list of descriptions for the different > capabilities, the one im using > in this patch was taken from the linux kernel. Is it possible to get a > complete list > somewhere?
The patch as comitted skipped entries in the array so pcidump currently prints the wrong strings in some cases. const char *pci_enhanced_capnames[] = { "Unknown", "Advanced Error Reporting", /* 0x01 */ "Virtual Channel Capability", /* 0x02 */ "Device Serial Number", /* 0x03 */ "Power Budgeting", /* 0x04 */ "Root Complex Link Declaration", /* 0x05 */ "Root Complex Internal Link Control", /* 0x06 */ "Root Complex Event Collector", /* 0x07 */ "Multi-Function VC Capability", /* 0x08 */ "Virtual Channel Capability", /* 0x09 */ "Root Complex/Root Bridge", /* 0x0a */ "Vendor-Specific", /* 0x0b */ "Config Access", /* 0x0c */ "Access Control Services", /* 0x0d */ "Alternate Routing ID", /* 0x0e */ "Address Translation Services", /* 0x0f */ "Single Root I/O Virtualization", /* 0x10 */ "Multi Root I/O Virtualization", /* 0x11 */ "Multicast", /* 0x12 */ "Page Request Interface", /* 0x13 */ "Reserved for AMD", /* 0x14 */ "Resizable BAR", /* 0x15 */ "Dynamic Power Allocation", /* 0x16 */ "TPH Requester", /* 0x17 */ "Latency Tolerance Reporting", /* 0x18 */ "Secondary PCIe Capability", /* 0x19 */ "Protocol Multiplexing", /* 0x1a */ "Process Address Space ID", /* 0x1b */ "Unknown", /* 0x1c */ "Downstream Port Containment", /* 0x1d */ "L1 PM", /* 0x1e */ "Precision Time Measurement", /* 0x1f */ }; Index: pcidump.c =================================================================== RCS file: /cvs/src/usr.sbin/pcidump/pcidump.c,v retrieving revision 1.43 diff -u -p -r1.43 pcidump.c --- pcidump.c 25 Mar 2017 07:33:46 -0000 1.43 +++ pcidump.c 17 May 2017 06:06:56 -0000 @@ -131,7 +131,9 @@ const char *pci_enhanced_capnames[] = { "Secondary PCIe Capability", "Protocol Multiplexing", "Process Address Space ID", + "Unknown", "Downstream Port Containment", + "L1 PM", "Precision Time Measurement", };