Project

General

Profile

Actions

Feature #14927

closed

pcieadm alternate protocol decoding

Added by Robert Mustacchi 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

With the advent of CXL and PCIe 5.0, many systems are beginning to contain the alternate protocol capability and thus decoding it would be useful.

Actions #1

Updated by Electric Monk 4 months ago

  • Gerrit CR set to 2318
Actions #2

Updated by Robert Mustacchi 3 months ago

Here's our decoding of this. note I snipped out files that didn't have the capability from a set captured from a PCIe Gen 5 / CXL capable system:

rm@beowulf:/ws/rm/pcieadm/projects/illumos/usr/src$ for f in ~/pci/*.pci; do echo $f; ./cmd/pcieadm/pcieadm show-cfgspace -f $f ap 2>/dev/null; done
...
/home/rm/pci/00-05-01.pci
Alternative Protocol Capability (0x2b)
  Capability Header: 0x1002b
    |--> Capability ID: 0x2b
    |--> Capability Version: 0x1
    |--> Next Capability Offset: 0x0
  Alternate Protocol Capabilities: 0x102
    |--> Alternate Protocol Count: 0x2
    |--> Alternate Protocol Select Enable: supported (0x100)
  Alternate Protocol Control: 0x0
    |--> Alternate Protocol Index Select: 0x0
    |--> Alternate Protocol Negotiation Global Enable: disabled (0x0)
  Alternate Protocol Data 1: 0x0
    |--> Alternate Protocol Usage Information: 0x0
    |--> Alternate Protocol Details: 0x0
    |--> Alternate Protocol Vendor ID: 0x0
  Alternate Protocol Data 2: 0x0
    |--> Modified TS 2 Information: 0x0
  Alternate Protocol Select Enable Mask: 0x1
    |--> Selective Enable Mask - PCIe: enabled (0x1)
    |--> Selective Enable Mask - Other: 0x0
...
/home/rm/pci/80-01-01.pci
Alternative Protocol Capability (0x2b)
  Capability Header: 0x57c1002b
    |--> Capability ID: 0x2b
    |--> Capability Version: 0x1
    |--> Next Capability Offset: 0x57c
  Alternate Protocol Capabilities: 0x102
    |--> Alternate Protocol Count: 0x2
    |--> Alternate Protocol Select Enable: supported (0x100)
  Alternate Protocol Control: 0x100
    |--> Alternate Protocol Index Select: 0x0
    |--> Alternate Protocol Negotiation Global Enable: enabled (0x100)
  Alternate Protocol Data 1: 0x0
    |--> Alternate Protocol Usage Information: 0x0
    |--> Alternate Protocol Details: 0x0
    |--> Alternate Protocol Vendor ID: 0x0
  Alternate Protocol Data 2: 0x0
    |--> Modified TS 2 Information: 0x0
  Alternate Protocol Select Enable Mask: 0x3
    |--> Selective Enable Mask - PCIe: enabled (0x1)
    |--> Selective Enable Mask - Other: 0x1
/home/rm/pci/80-02-00.pci
/home/rm/pci/80-03-00.pci
/home/rm/pci/80-04-00.pci
/home/rm/pci/80-05-00.pci
/home/rm/pci/80-07-00.pci
/home/rm/pci/80-07-01.pci
/home/rm/pci/82-00-00.pci
/home/rm/pci/82-00-01.pci
/home/rm/pci/c0-00-00.pci
/home/rm/pci/c0-00-02.pci
/home/rm/pci/c0-00-03.pci
/home/rm/pci/c0-01-00.pci
/home/rm/pci/c0-02-00.pci
/home/rm/pci/c0-03-00.pci
/home/rm/pci/c0-04-00.pci
/home/rm/pci/c0-05-00.pci
/home/rm/pci/c0-05-02.pci
Alternative Protocol Capability (0x2b)
  Capability Header: 0x1002b
    |--> Capability ID: 0x2b
    |--> Capability Version: 0x1
    |--> Next Capability Offset: 0x0
  Alternate Protocol Capabilities: 0x102
    |--> Alternate Protocol Count: 0x2
    |--> Alternate Protocol Select Enable: supported (0x100)
  Alternate Protocol Control: 0x0
    |--> Alternate Protocol Index Select: 0x0
    |--> Alternate Protocol Negotiation Global Enable: disabled (0x0)
  Alternate Protocol Data 1: 0x0
    |--> Alternate Protocol Usage Information: 0x0
    |--> Alternate Protocol Details: 0x0
    |--> Alternate Protocol Vendor ID: 0x0
  Alternate Protocol Data 2: 0x0
    |--> Modified TS 2 Information: 0x0
  Alternate Protocol Select Enable Mask: 0x1
    |--> Selective Enable Mask - PCIe: enabled (0x1)
    |--> Selective Enable Mask - Other: 0x0
/home/rm/pci/c0-05-03.pci
Alternative Protocol Capability (0x2b)
  Capability Header: 0x1002b
    |--> Capability ID: 0x2b
    |--> Capability Version: 0x1
    |--> Next Capability Offset: 0x0
  Alternate Protocol Capabilities: 0x102
    |--> Alternate Protocol Count: 0x2
    |--> Alternate Protocol Select Enable: supported (0x100)
  Alternate Protocol Control: 0x0
    |--> Alternate Protocol Index Select: 0x0
    |--> Alternate Protocol Negotiation Global Enable: disabled (0x0)
  Alternate Protocol Data 1: 0x0
    |--> Alternate Protocol Usage Information: 0x0
    |--> Alternate Protocol Details: 0x0
    |--> Alternate Protocol Vendor ID: 0x0
  Alternate Protocol Data 2: 0x0
    |--> Modified TS 2 Information: 0x0
  Alternate Protocol Select Enable Mask: 0x1
    |--> Selective Enable Mask - PCIe: enabled (0x1)
    |--> Selective Enable Mask - Other: 0x0
Actions #3

Updated by Electric Monk 3 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 459e74f09efc5a666d1084b7fa9d0c113a574edd

commit  459e74f09efc5a666d1084b7fa9d0c113a574edd
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2022-09-04T04:36:43.000Z

    14927 pcieadm alternate protocol decoding
    Reviewed by: Benjamin Naecker <bnaecker@fastmail.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Actions

Also available in: Atom PDF