Viewing PCI device attributes on Solaris and Linux hosts

Periodically I need to identify the vendor and model of a PCI card installed in a x86 Linux or Solaris host. To retrieve this information on Solaris hosts, I typically use the scanpci utility (prtdiag also provides some incredibly useful information):

$ scanpci -v

pci bus 0x0000 cardnum 0x02 function 0x00: vendor 0xaaaa device 0x1121
 Device unknown
  STATUS    0x0280  COMMAND 0x0007
  CLASS     0x03 0x00 0x00  REVISION 0x00
  BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x00
  BASE0     0x0000ff01  addr 0x0000ff00  I/O
  BASE1     0xc0000000  addr 0xc0000000  MEM
  BASEROM   0x000c0001  addr 0x000c0000  decode-enabled
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x00  INT_LINE 0xff

pci bus 0x0000 cardnum 0x03 function 0x00: vendor 0xaaaa device 0x1112
 Device unknown
  STATUS    0x0280  COMMAND 0x000f
  CLASS     0x06 0x80 0x00  REVISION 0x00
  BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x00
  BASE0     0x00001041  addr 0x00001040  I/O
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x01  INT_LINE 0x09

pci bus 0x0000 cardnum 0x05 function 0x00: vendor 0x10ec device 0x8029
 Realtek Semiconductor Co., Ltd. RTL-8029(AS)
  STATUS    0x0000  COMMAND 0x0007
  CLASS     0x02 0x00 0x00  REVISION 0x00
  BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x00
  BASE0     0x00001081  addr 0x00001080  I/O
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x01  INT_LINE 0x0a

pci bus 0x0000 cardnum 0x1e function 0x00: vendor 0x8086 device 0x1130
 Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub
 CardVendor 0x8086 card 0x4541 (Intel Corporation, Card unknown)
  STATUS    0x0090  COMMAND 0x0007
  CLASS     0x06 0x00 0x00  REVISION 0x02
  BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x00
  BASE0     0x84000008  addr 0x84000000  MEM PREFETCHABLE
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x00  INT_LINE 0xff

pci bus 0x0000 cardnum 0x1f function 0x00: vendor 0x8086 device 0x2440
 Intel Corporation 82801BA ISA Bridge (LPC)
 CardVendor 0x8086 card 0x4541 (Intel Corporation, Card unknown)
  STATUS    0x0280  COMMAND 0x000f
  CLASS     0x06 0x01 0x00  REVISION 0x08
  BIST      0x00  HEADER 0x80  LATENCY 0x00  CACHE 0x00
  BASE0     0x000010c0  addr 0x000010c0  MEM
  BASE1     0x00001400  addr 0x00001400  MEM
  BASE2     0x00001440  addr 0x00001440  MEM
  BASE3     0x00001480  addr 0x00001480  MEM
  BASE4     0x000014c0  addr 0x000014c0  MEM
  BASE5     0x00001800  addr 0x00001800  MEM
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x00  INT_LINE 0xff
  BYTE_0    0x01  BYTE_1  0x10  BYTE_2  0x00  BYTE_3  0x00

pci bus 0x0000 cardnum 0x1f function 0x01: vendor 0x8086 device 0x244b
 Intel Corporation 82801BA IDE U100
 CardVendor 0x8086 card 0x4541 (Intel Corporation, Card unknown)
  STATUS    0x0280  COMMAND 0x0007
  CLASS     0x01 0x01 0x80  REVISION 0x00
  BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x00
  BASE4     0x00001841  addr 0x00001840  I/O
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x00  INT_LINE 0xff
  BYTE_0    0xff  BYTE_1  0xe3  BYTE_2  0xff  BYTE_3  0xe3

For Linux hosts, lspci provides similar information:

$ lspci -v

00:02.0 VGA compatible controller: Unknown device aaaa:1121 (prog-if 00 [VGA])
        Flags: bus master, medium devsel, latency 0
        I/O ports at ff00 [size=64]
        Memory at c0000000 (32-bit, non-prefetchable) [size=1024M]
        Expansion ROM at 

00:03.0 Bridge: Unknown device aaaa:1112
        Flags: bus master, medium devsel, latency 0, IRQ 9
        I/O ports at 10a0 [size=32]

00:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8029(AS)
        Subsystem: Realtek Semiconductor Co., Ltd. RTL-8029(AS)
        Flags: bus master, fast devsel, latency 0, IRQ 10
        I/O ports at 1080 [size=32]

00:1e.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controlle
r Hub (rev 02)
        Subsystem: Intel Corporation: Unknown device 4541
        Flags: bus master, fast devsel, latency 0
        Memory at 84000000 (32-bit, prefetchable) [size=64M]
        Capabilities: [88] Vendor Specific Information
        Capabilities: [a0] AGP version 2.0

00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 08)
        Subsystem: Intel Corporation: Unknown device 4541
        Flags: bus master, medium devsel, latency 0
        Memory at  (32-bit, non-prefetchable)
        Memory at  (32-bit, non-prefetchable)
        Memory at  (32-bit, non-prefetchable)
        Memory at  (32-bit, non-prefetchable)
        Memory at  (32-bit, non-prefetchable)
        Memory at  (32-bit, non-prefetchable)

00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 (prog-if 80 [Master])
        Subsystem: Intel Corporation: Unknown device 4541
        Flags: bus master, medium devsel, latency 0
        I/O ports at 1840 [size=16]

00:1f.5 Multimedia audio controller: Intel Corporation 82801BA/BAM AC'97 Audio (rev 02)
        Flags: bus master, medium devsel, latency 0, IRQ 9
        I/O ports at 1c00 [size=256]
        I/O ports at 2000 [size=64]

These are invaluable commands, and can come in handy!

One Comment

Anthony  on January 15th, 2007

The equivalent in FreeBSD is pciconf -l -v

Love your blog. Keep writing!

Leave a Comment