User Tools

Site Tools


linux:system:pcibus:pcibus

This is an old revision of the document!


PCI Bus


Understanding a PCI Address

The PCI address is a series of numbers like 0000:04:00.0. The full form is <domain>:<bus>:<device>.<function>.

The bus, device, and function numbers specify the device's location on the bus. We can break the device string “0000:04:00.0” down as follows:

  • 0000 : PCI domain (each domain can contain up to 256 PCI buses)
  • 04 : The bus number the device is attached to
  • 00 : The device number
  • .0 : PCI device function

sysfs PCI support

The Linux kernel represents PCI devices as pseudo-devices in the sysfs file system. Linux lists these devices in /sys/bus/pci/devices.

# ls -al /sys/bus/pci/devices

total 0
drwxr-xr-x 2 root root 0 20 sep 14:25 .
drwxr-xr-x 5 root root 0 20 sep 13:53 ..
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:00.0 -> ../../../devices/pci0000:00/0000:00:00.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:02.0 -> ../../../devices/pci0000:00/0000:00:02.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:08.0 -> ../../../devices/pci0000:00/0000:00:08.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:12.0 -> ../../../devices/pci0000:00/0000:00:12.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:14.0 -> ../../../devices/pci0000:00/0000:00:14.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:14.2 -> ../../../devices/pci0000:00/0000:00:14.2
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:16.0 -> ../../../devices/pci0000:00/0000:00:16.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:17.0 -> ../../../devices/pci0000:00/0000:00:17.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:1c.0 -> ../../../devices/pci0000:00/0000:00:1c.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:1d.0 -> ../../../devices/pci0000:00/0000:00:1d.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:1f.0 -> ../../../devices/pci0000:00/0000:00:1f.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:1f.3 -> ../../../devices/pci0000:00/0000:00:1f.3
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:1f.4 -> ../../../devices/pci0000:00/0000:00:1f.4
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:00:1f.5 -> ../../../devices/pci0000:00/0000:00:1f.5
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:01:00.0 -> ../../../devices/pci0000:00/0000:00:1c.0/0000:01:00.0
lrwxrwxrwx 1 root root 0 20 sep 13:53 0000:02:00.0 -> ../../../devices/pci0000:00/0000:00:1d.0/0000:02:00.0
linux/system/pcibus/pcibus.1758381231.txt.gz · Last modified: by oscar