PCICONF(8)
π pciconf(8) β your PCI bus bestie
okay so real quick: this is the pciconf page from the System Manager's Manual, and it's literally the diagnostic utility for the PCI bus. she's β¨iconicβ¨, she's a little bit root-only, and she's about to tell you everything about every device on your bus. buckle up π
β¨ NAME β¨
pciconf β diagnostic utility for the PCI bus π¦
πΈ SYNOPSIS πΈ
pciconf -l [-BbceVv] [device]
pciconf -t [-v]
pciconf -a device
pciconf -r [-b | -h] device addr[:addr2]
pciconf -w [-b | -h] device addr value
pciconf -D [-b | -h | -x] device bar [start [count]]
no cap, that's the whole shape of her π
π DESCRIPTION π
so pciconf gives you a command line interface to the functionality provided by the pci(4) ioctl(2) interface. and here's the thing bestie β some of those functions are only available to users with write access to /dev/pci, which is normally only the super-user. so likeβ¦ don't be shocked when the write-y stuff says no π
A device can be identified either by a device name (if the device is attached to a driver) or by a selector. Selectors identify a PCI device by its address in PCI config space and can take one of the following forms:
pcidomain:bus:device:functionpcibus:device:functionpcibus:device
In the case of an abridged form, omitted selector components are assumed to be 0. cute right? An optional leading device name followed by @ and an optional final colon will be ignored β this is so that the first column in the output of pciconf -l can be used without modification. very "copy paste and it just works" of her π«Ά
All numbers are base 10.
π List Mode π
With the -l option, pciconf lists PCI devices in the following format:
foo0@pci0:0:4:0: class=0x010000 rev=0x01 hdr=0x00 vendor=0x1000 device=0x000f subvendor=0x0000 subdevice=0x0000
bar0@pci0:0:5:0: class=0x000100 rev=0x00 hdr=0x00 vendor=0x88c1 device=0x5333 subvendor=0x0000 subdevice=0x0000
none0@pci0:0:6:0: class=0x020000 rev=0x00 hdr=0x00 vendor=0x10ec device=0x8029 subvendor=0x0000 subdevice=0x0000
okay let's break down the columns because they matter:
The first column gives the driver name, unit number, and selector. If there is no driver attached to the PCI device in question, the driver name will be βnoneβ. Unit numbers for detached devices start at zero and are incremented for each detached device that is encountered. The selector is in a form which may directly be used for the other forms of the command. main character energy, honestly
The second column is the class code, with the class byte printed as two hex digits, followed by the sub-class and the interface bytes.
The third column prints the device's revision.
The fourth column describes the header type.
Currently assigned header types include 0 for standard devices, 1 for PCI to PCI bridges, and 2 for PCI to CardBus bridges. If the most significant bit of the header type register is set for function 0 of a PCI device, it is a multi-function device, which contains several (similar or independent) functions on one chip. one chip, many vibes π
The sixth and seventh columns contain the vendor ID and the device ID of the device. The eigth and ninth columns (yes, the manpage says "eigth", we love her for it π) contain subvendor and subdevice IDs, introduced in revision 2.1 of the PCI standard. Note that they will be 0 for older cards.
Adding a second -l option causes output to be in a compact columnar format, suitable for 80 column output:
drv selector class rev hdr vendor device subven subdev
foo0@pci0:0:4:0: 010000 01 00 1000 000f 0000 0000
bar0@pci0:0:5:0: 000100 00 00 88c1 5333 0000 0000
none0@pci0:0:6:0: 020000 00 00 10ec 8029 0000 0000
All fields retain the same definition as with the non-compact form. same facts, tidier fit β¨
If the -B option is supplied, pciconf will list additional information for PCI to PCI and PCI to CardBus bridges β specifically the resource ranges decoded by the bridge for use by devices behind the bridge. Each bridge lists a range of bus numbers handled by the bridge and its downstream devices. Memory and I/O port decoding windows are enumerated via a line in the following format:
window[1c] = type I/O Port, range 16, addr 0x5000-0x8fff, enabled
The first value after the βwindowβ prefix in the square brackets is the offset of the decoding window in config space in hexadecimal. The type of a window is one of βMemoryβ, βPrefetchable Memoryβ, or βI/O Portβ. The range indicates the binary log of the maximum address the window decodes. The address field indicates the start and end addresses of the decoded range. Finally, the last flag indicates if the window is enabled or disabled.
If the -b option is supplied, pciconf will list any base address registers (BARs) that are assigned resources for each device. Each BAR will be enumerated via a line in the following format:
bar [10] = type Memory, range 32, base 0xda060000, size 131072, enabled
The first value after the βbarβ prefix in the square brackets is the offset of the BAR in config space in hexadecimal. The type of a BAR is one of βMemoryβ, βPrefetchable Memoryβ, or βI/O Portβ. The range indicates the binary log of the maximum address the BAR decodes. The base and size indicate the start and length of the BAR's address window, respectively. Finally, the last flag indicates if the BAR is enabled or disabled.
If the -c option is supplied, pciconf will list any capabilities supported by each device. A second invocation of -c will print additional data for certain capabilities. Each capability is enumerated via a line in the following format:
cap 10[40] = PCI-Express 1 root port
The first value after the βcapβ prefix is the capability ID in hexadecimal. The second value in the square brackets is the offset of the capability in config space in hexadecimal. The format of the text after the equals sign is capability-specific. iykyk π
Each extended capability is enumerated via a line in a similar format:
ecap 0002[100] = VC 1 max VC0
The first value after the βecapβ prefix is the extended capability ID in hexadecimal. The second value in the square brackets is the offset of the extended capability in config space in hexadecimal. The format of the text after the equals sign is capability-specific.
If the -e option is supplied, pciconf will list any errors reported for this device in standard PCI error registers. Errors are checked for in the PCI status register, the PCI-express device status register, and the Advanced Error Reporting status registers. error check era π
If the -v option is supplied, pciconf will attempt to load the vendor/device information database, and print vendor, device, class and subclass identification strings for each device. human-readable names, slay
If the -V option is supplied, pciconf will list any vital product data (VPD) provided by each device. Each VPD keyword is enumerated via a line in the following format:
VPD ro PN = '110114640C0 '
The first string after the βVPDβ prefix indicates if the keyword is read-only βroβ or read-write βrwβ. The second string provides the keyword name. The text after the equals sign lists the value of the keyword which is usually an ASCII string.
If the optional device argument is given with the -l flag, pciconf will only list details about a single device instead of all devices. targeted. focused. π
π¦ Tree Mode π¦
With the -t flag, pciconf lists PCI devices in a tree, prefixing each device with indentation text showing the sibling and parent/child relationships. If the device has an attached driver, the device is identified by the driver name and unit number; otherwise, the device is identified by a PCI selector.
Top-level entries in the tree identify top-level PCI buses. Each bus is named as a partial PCI selector: pcidomain:bus. it's giving family tree π
If the -v flag is specified, the device name or PCI selector is followed by the device's vendor and device strings from the vendor/device information database. If an identification string is not found in the database, the ID register values are output instead.
π§ Device Information Modes π§
With the -a flag, pciconf determines whether any driver has been assigned to the device identified by selector. An exit status of zero indicates that the device has a driver; non-zero indicates that it does not. yes/no energy, love that for us
The -r option reads a configuration space register at byte offset addr of device selector and prints out its value in hexadecimal. The optional second address addr2 specifies a range to read. The -w option writes the value into a configuration space register at byte offset addr of device selector.
The -D option requests a dump of the specified bar. Dump is performed to the standard output, raw register values are written. Use hexdump(1) to convert them to human-readable dump, or redirect into a file to save the snapshot of the device state. Optionally, the start and count of the registers dumped can be specified, in multiple of the operation width, see next paragraph. snapshot the state, bestie πΈ
For read, write, and dump operations, the flags -b, -h, and -x select the width of the operation; -b indicates a byte operation, and -h indicates a halfword (two-byte) operation. -x indicates a quadword (four-byte) operation. The default is to read or write a longword (four bytes). The quadword mode is only valid for BAR dump.
π ENVIRONMENT π
PCI vendor and device information is read from /usr/local/share/pciids/pci.ids. If that file is not present, it is read from /usr/share/misc/pci_vendors. This path can be overridden by setting the environment variable PCICONF_VENDOR_DATABASE. custom paths, we love a configurable queen π
π₯ SEE ALSO π₯
ioctl(2), devinfo(8), kldload(8)
β HISTORY β
The pciconf utility appeared first in FreeBSD 2.2. The -a option was added for PCI KLD support in FreeBSD 3.0. she's been iconic since the 90s, no cap
πΈ AUTHORS πΈ
The pciconf utility was written by Stefan Esser and Garrett Wollman. π«Ά legends fr fr
π BUGS π
- The
-band-hoptions are implemented inpciconf, but not in the underlyingioctl(2). π yeah, that one. - It might be useful to give non-root users access to the
-aand-roptions. But only root will be able to execute akldloadto provide the device with a driver KLD, and reading of configuration space registers may cause a failure in badly designed PCI chips. so like⦠proceed with awareness, bestie 𫣠- There is currently no way to specify the caching mode for the mapping established by the
-Doption,pciconfalways uses uncached access. This is fine for control register BARs.
fr fr: those last two aren't scary for no reason β one is a permissions reality check, the other is a "this chip might be badly designed and that's not on us" heads-up. read them properly before you go poking at config space π
and that's the whole page, bestie ππβ¨ β this was the Debian build of the pciconf(8) manpage, dated March 10, 2026. go forth and -l responsibly ππ¦π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 1997 Stefan Esser <se@FreeBSD.org>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms