Come identificare un dispositivo > PCI


Come identificare i dispositivi PCI e PCI-simili (AGP, PCI-Express, CardBus, Express Card, ecc.) connessi al proprio computer.

Molte persone, per elencare i dispositivi sul proprio computer, usano semplicemente lspci, che è disponibile su ogni sistema Debian. hardinfo è disponibile per l'installazione e l'uso nei desktop basati su GTK, come GNOME, MATE o Xfce. kinfocenter è disponibile nel Desktop Plasma di KDE.

PCI-id

I dispositivi PCI sono identificati mediante una coppia di numeri esadecimali, per esempio 04b3:3108.

Ci sono anche dei sub-vendor-id (per identificare l'implementazione computer/produttore), e per funzione PCI e classe, vedere la sezione Riferimenti per maggiori informazioni.

Alcuni dei dispositivi (device-id) supportati da Debian sono elencati nella pagina ?it/DeviceDatabase/PCI.

lspci

lspci (dal pacchetto pciutils) è lo strumento standard per interrogare i dispositivi connessi a qualsiasi bus compatibile con PCI.

$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub [8086:27a0] (rev 03)
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)
00:02.1 Display controller [0380]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a6] (rev 03)
00:1b.0 Audio device [0403]: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller [8086:27d8] (rev 02)
00:1c.0 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 [8086:27d0] (rev 02)
00:1c.1 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 [8086:27d2] (rev 02)
00:1c.2 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 [8086:27d4] (rev 02)
00:1c.3 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 [8086:27d6] (rev 02)
00:1d.0 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 [8086:27c8] (rev 02)
00:1d.1 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 [8086:27c9] (rev 02)
00:1d.2 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 [8086:27ca] (rev 02)
00:1d.3 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 [8086:27cb] (rev 02)
00:1d.7 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller [8086:27cc] (rev 02)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev e2)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge [8086:27b9] (rev 02)
00:1f.2 IDE interface [0101]: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller [8086:27c4] (rev 02)
00:1f.3 SMBus [0c05]: Intel Corporation 82801G (ICH7 Family) SMBus Controller [8086:27da] (rev 02)
02:00.0 Ethernet controller [0200]: Intel Corporation 82573L Gigabit Ethernet Controller [8086:109a]
03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG Network Connection [8086:4227] (rev 02)
15:00.0 CardBus bridge [0607]: Texas Instruments PCI1510 PC card Cardbus Controller [104c:ac56]
16:00.0 Ethernet controller [0200]: ADMtek 21x4x DEC-Tulip compatible 10/100 Ethernet [1317:1985] (rev 11)

Alcune annotazioni sull'esempio soprastante:

{i} /usr/share/misc/pci.ids - Un file di testo che mappa gli ID dei produttori e dei dispositivi ad una descrizione testuale.

Si può accorciare l'elenco precedente usando grep:

$ lspci -nn | grep Network
03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG Network Connection [8086:4227] (rev 02)

A partire da Bookworm si può usare 'x' per trovare le corrispondenze con qualsiasi cifra con l'opzione -d. Questo è di aiuto specialmente con le sottoclassi diverse come Display Controller.

$ lspci -nn -d ::03xx
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] [10de:21c4] (rev a1)

HardInfo

hardinfo (istantanee) (dal pacchetto hardinfo) ha una sezione "PCI Device" sulle schede PCI installate nel sistema.

KInfocenter

KInfoCenter di KDE (in K Menu / Sistema / Info Center) (istantanee) (dal pacchetto kinfocenter) ha una pagina di informazioni sulle schede "PCI".

discover

discover (dal pacchetto discover) può elencare i device PCI

$ discover --vendor-id --model-id pci | uniq
8086 27a0 Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub
8086 27a0 Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub
8086 27a2 Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller
8086 27a2 Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller
8086 27a6 Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller
8086 27a6 Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller
8086 27d8 Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller
8086 27d0 Intel Corporation 82801G (ICH7 Family) PCI Express Port 1
8086 27d2 Intel Corporation 82801G (ICH7 Family) PCI Express Port 2
8086 27d4 Intel Corporation 82801G (ICH7 Family) PCI Express Port 3
8086 27d6 Intel Corporation 82801G (ICH7 Family) PCI Express Port 4
8086 27c8 Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1
8086 27c8 Intel Corporation 82801G (ICH7 Family) USB UHCI #1
8086 27c9 Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2
8086 27c9 Intel Corporation 82801G (ICH7 Family) USB UHCI #2
8086 27ca Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3
8086 27ca Intel Corporation 82801G (ICH7 Family) USB UHCI #3
8086 27cb Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4
8086 27cb Intel Corporation 82801G (ICH7 Family) USB UHCI #4
8086 27cc Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller
8086 2448 Intel Corporation 82801 Mobile PCI Bridge
8086 27b9 Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge
8086 27c4 Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller
8086 27da Intel Corporation 82801G (ICH7 Family) SMBus Controller
8086 109a Intel Corporation 82573L Gigabit Ethernet Controller8086 4227 Intel Corporation PRO/Wireless 3945ABG Network Connection
104c ac56 Texas Instruments PCI1510 PC card Cardbus Controller

{i} discover usa file propri: /lib/discover/pci-busclass.xml, /lib/discover/pci-device.xml, /lib/discover/pci-vendor.xml

Manualmente

/proc/bus/pci/devices

Se lspci non è disponibile(!), si può visualizzare il contenuto di /proc/bus/pci/devices per elencare gli ID dei produttori e dei dispositivi.

$ cat /proc/bus/pci/devices 

/sys/bus/pci

Se lspci non è disponibile(!), si può esplorare /sys/bus/pci (assumendo che sysfs sia montato in /sys). La documentazione su sysfs PCI del kernel Linux (disponibile anche nei pacchetti linux-doc) fornisce dettagli sui file in /sys/bus/pci.

Riferimenti