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. Gli utenti Gnome possono installare ed usare il metodo hardinfo. Gli utenti di KDE possono usare kinfocenter.
PCI-id
I dispositivi sono identificati principalmente usando una coppia di numeri esadecimali, come in 04b3:3108.
- Le prime 4 cifre esadecimali corrispondono all'ID del produttore (1014 = IBM).
- Le ultime 4 cifre esadecimali corrispondono all'ID del dispositivo (003e = 16/4 Token ring)
In verità esistono anche ID sub-vendor-id (per identificare l'implementazione computer/produttore), funzioni pci e classi... Vedere Riferimenti per maggiori informazioni.
Alcuni dei dispositivi (device-id) supportati da Debian sono elencati alla pagina: DeviceDatabase/PCI.
lspci
lspci [pacchetto: pciutils] è lo strumento standard per interrogare i dispositivi connessi a qualsiasi bus pci-compatibile.
Esempio di output (l'opzione "-nn" funziona solo sulle versioni di Linux più recenti):
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:
- 104c:ac56 è il bridge cardbus bridge ("controller");
- 1317:1985 è un adattatore Ethernet PCCard (32-bit Cardbus);
se nella descrizione dei propri dispositivi appare "Unknown device" (Dispositivo sconosciuto), si può aggiornare la propria definizione locale dei pci-id eseguendo come utente root update-pciids.
man (8)lspci (8)update-pciids
/usr/share/misc/pci.ids - Un file di testo che mappa gli ID dei produttori e dei dispositivi ad una descrizione testuale.
Si può usare grep per accorciare l'elenco precedente:
~$ lspci -nn | grep Network 03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG Network Connection [8086:4227] (rev 02)
In Gnome: hardinfo
Le informazioni di sistema di Gnome (Hardinfo in Menu Applicazioni/ Strumenti di sistema, dal pacchetto hardinfo) hanno una pagina di informazioni sulle schede "PCI".
In KDE: KInfocenter
KDE's KInfoCenter (in K Menu / System / KInfoCenter Info Center, from package:kcontrol) has an information page on the "PCI" cards. KInfoCenter di KDE (in K Menu / Sistema / Centro informazioni KInfoCenter, dal pacchetto: kcontrol) ha una pagina di informazioni sulle schede "PCI".
Nota bene: KInfoCenter fornisce i nomi dei dispositivi PCI, non i loro ID.
discover
Anche nel pacchetto discover c'è un bel comando:
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
man discover(1)
discover usa file propri: /lib/discover/pci-busclass.xml, /lib/discover/pci-device.xml, /lib/discover/pci-vendor.xml
Scovando le informazioni a mano
/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).
/usr/share/doc/linux-doc-2.6.26/Documentation/filesystems/sysfs-pci.txt.gz - panoramica su /sys/bus/pci
Riferimenti
Wikipedia - PCI
http://pci-ids.ucw.cz/ mantiene un elenco di device-id e vendor-id mappandoli al testo corrispondente (usato da lspci, xorg ed altri)