Bug 263469 - PCI class 0x13 (instrumentation) not given a name
Summary: PCI class 0x13 (instrumentation) not given a name
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-22 13:45 UTC by John F. Carr
Modified: 2022-04-22 14:47 UTC (History)
1 user (show)

See Also:


Attachments
Recognize class 0x13 as instrumentation (660 bytes, patch)
2022-04-22 13:45 UTC, John F. Carr
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Carr 2022-04-22 13:45:32 UTC
Created attachment 233395 [details]
Recognize class 0x13 as instrumentation

I attached a patch to give a correct name to PCI device class 0x13 when no driver attaches.

While scanning devices my AMD server (HPE ProLiant DL325, AMD EPYC 7402P) reports

pci4: <unknown> at device 0.0 (no driver attached)
pci5: <unknown> at device 0.0 (no driver attached)
pci8: <unknown> at device 0.0 (no driver attached)
pci9: <unknown> at device 0.0 (no driver attached)
pci13: <unknown> at device 0.0 (no driver attached)
pci14: <unknown> at device 0.0 (no driver attached)
pci17: <unknown> at device 0.0 (no driver attached)
pci18: <unknown> at device 0.0 (no driver attached)

These "unknown" class devices come in pairs with an encrypt/decrypt device, reported by pciconf as

none8@pci0:130:0:0:	class=0x130000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x148a subvendor=0x1022 subdevice=0x148a
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Starship/Matisse PCIe Dummy Function'
    class      = non-essential instrumentation
none9@pci0:130:0:2:	class=0x108000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1498 subvendor=0x1022 subdevice=0x1498
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Starship/Matisse PTDMA'
    class      = encrypt/decrypt


With my patch I see

pci18: <non-essential instrumentation> at device 0.0 (no driver attached)
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-04-22 14:40:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f010b9c2b9b0a550656de8a5b5ad1469630c3e2c

commit f010b9c2b9b0a550656de8a5b5ad1469630c3e2c
Author:     John F. Carr <jfc@mit.edu>
AuthorDate: 2022-04-22 14:28:34 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-04-22 14:39:23 +0000

    pci: recognize "non-essential instrumentation" devices

    Some AMD EPYC VCPUs generated boot message of the type:

         pci4: <unknown> at device 0.0 (no driver attached)

    These are displayed for device class 0x13 devices, e.g.:

    none8@pci0:130:0:0:     class=0x130000 rev=0x00 hdr=0x00 vendor=0x1022 \
                            device=0x148a subvendor=0x1022 subdevice=0x148a
        vendor     = 'Advanced Micro Devices, Inc. [AMD]'
        device     = 'Starship/Matisse PCIe Dummy Function'
        class      = non-essential instrumentation

    Since these devices serve no purpose (no driver attaches) I have
    enabled the reporting of suich devices only for verbose boots (a
    diversion from the patch provided in the PR).

    A verbose boot will now display such devices as:

      pci4: <non-essential instrumentation> at device 0.0 (no driver attached)

    PR:             263469
    Reported by:    jfc@mit.edu (John F. Carr)
    MFC after:      1 week

 sys/dev/pci/pci.c | 1 +
 1 file changed, 1 insertion(+)
Comment 2 Stefan Eßer freebsd_committer freebsd_triage 2022-04-22 14:47:25 UTC
Committed with a small modification:

Since this is a device without actual purpose for the OS (no driver attaches), I have chosen to only report it during a verbose boot.

I have considered the removal of this <unknown> type line from the boot log to be the main objective of the proposed change ...

Thank you for the contribution!