PCI(8) PCI(8)
NAME
pci, pcirw - PCI space tools
SYNOPSIS
pci [ -cmv ] [ vid/did | bdf ]
pcirw -r bdf offset width
pcirw -w bdf offset width value
DESCRIPTION
With no options, pci prints one line per device found on the
local PCI bus described by #$/pci. The fields are
bus.device.function, class, class code, vendor/device ids,
IRQ (interrupt), followed by the BAR (base address) regis-
ters in pairs of index:address and size. The -v option adds
a second line per device, containing an English description
obtained from /lib/pci. A second -v includes a second line
of description based on the sub-DID and sub-VID.
The description for arbirary devices may be found by giving
their PCI vendor and device ids on the command line. Speci-
fying a bdfs on the command line, will print only the
selected devices.
The -c option prints a one-line summary of PCI capabilities
instead. Each capability has the format name/capcode. Com-
bined with -v the capabilities' contents are decoded in
human-readable format.
The -m option prints one line per device detailing the MSI
(message-signaled interrupt) configuration. The fields are
bus.device.function, flags, target address, target "data"
and offset of the capability structure. Combined with -v
the flags are decoded in human-readable format.
Pcirw reads (-r) or writes (-w) an integer of the specified
width and the specified offset to or from PCI configuration
space of a single specified device.
FILES
/lib/pci
SOURCE
/rc/bin/pci
SEE ALSO
pnp(3)
BUGS
Due to constrants in the PCI standard, the BAR sizes are not
discoverable without corrupting them, so these must be
Page 1 Plan 9 (printed 10/30/25)
PCI(8) PCI(8)
provided by the kernel pci device.
Page 2 Plan 9 (printed 10/30/25)