pcilib(7)
pcilib(7) โ The PCI Utilities
okay bestie, this is pcilib(7), part 1, and it's literally the manual for the PCI library. Let's get into it. ๐
โจ NAME โจ
pcilib โ a library for accessing PCI devices. That's the name, periodt. ๐
๐ธ DESCRIPTION ๐ธ
The PCI library (also known as pcilib and libpci) is a portable library for accessing PCI devices and their configuration space. It's giving portable icon behavior. โจ
๐ฆ ACCESS METHODS ๐ฆ
The library supports a variety of methods to access the configuration space on different operating systems. By default, the first matching method in this list is used, but you can override that decision (see the -A switch of lspci). So many vibes. ๐
linux-sysfs
The /sys filesystem on Linux 2.6 and newer. The standard header of the config space is available to all users, the rest only to root. Supports extended configuration space, PCI domains, VPD (from Linux 2.6.26), physical slots (also since Linux 2.6.26) and information on attached kernel drivers. Obsessed with the details. ๐ธ
linux-proc
The /proc/bus/pci interface supported by Linux 2.1 and newer. The standard header of the config space is available to all users, the rest only to root. Classic. ๐
intel-conf1
Direct hardware access via Intel configuration mechanism 1. Available on i386 and compatibles on Linux, Solaris/x86, GNU Hurd, Windows, BeOS and Haiku. Requires root privileges. Root energy only. ๐
intel-conf2
Direct hardware access via Intel configuration mechanism 2. Available on i386 and compatibles on Linux, Solaris/x86, GNU Hurd, Windows, BeOS and Haiku. Requires root privileges.
Warning: This method is able to address only the first 16 devices on any bus and it seems to be very unreliable in many cases. Not the moment. ๐ญ
mmio-conf1
Direct hardware access via Intel configuration mechanism 1 via memory-mapped I/O. Mostly used on non-i386 platforms. Requires root privileges.
Warning: This method needs to be properly configured via the mmio-conf1.addrs parameter. Don't skip this. ๐ซถ
mmio-conf1-ext
Direct hardware access via Extended PCIe Intel configuration mechanism 1 via memory-mapped I/O. Mostly used on non-i386 platforms. Requires root privileges.
Warning: This method needs to be properly configured via the mmio-conf1-ext.addrs parameter. No cap. ๐
ecam
Direct hardware access via PCIe ECAM (Enhanced Configuration Access Mechanism). Available on all PCIe-compliant hardware. Requires root privileges and access to physical memory (on Linux systems with the CONFIG_STRICT_DEVMEM option disabled). On ACPI compatible systems, the ECAM mapping is read from the MCFG table specified by the ecam.acpimcfg parameter. On EFI compatible systems, ACPI MCFG table can be located in physical memory via EFI system table specified by the ecam.efisystab parameter. On FreeBSD/NetBSD systems, physical address of ACPI MCFG table can be located by kenv or sysctl interface when the ecam.bsd parameter is not disabled. On x86 BIOS compatible systems, ACPI MCFG table can be located in physical memory by scanning x86 BIOS memory when the ecam.x86bios parameter is not disabled. Alternatively ECAM mappings can be specified by the ecam.addrs parameter which takes precedence over ACPI MCFG table. This option is required on systems without ACPI and also on systems without EFI or x86 BIOS. It's giving "read the manual twice" energy. ๐
fbsd-device
The /dev/pci device on FreeBSD. Requires root privileges. ๐
aix-device
Access method used on AIX. Requires root privileges. ๐
nbsd-libpci
The /dev/pci0 device on NetBSD accessed using the local libpci library. Cute. ๐
obsd-device
The /dev/pci device on OpenBSD. Requires root privileges. ๐ฅ
dump
Read the contents of configuration registers from a file specified in the dump.name parameter. The format corresponds to the output of lspci -x. Yes bestie, it's a dump. ๐พ
darwin
Access method used on Mac OS X / Darwin. Must be run as root and the system must have been booted with debug=0x144. Very specific, very iconic. ๐
win32-cfgmgr32
Device listing on Windows systems using the Windows Configuration Manager via cfgmgr32.dll system library. This method does not require any special Administrator rights or privileges. Configuration Manager provides only basic information about devices, assigned resources and device tree structure. There is no access to the PCI configuration space but libpci either tries to use other access method to access configuration space or it provides read-only virtual emulation based on information from Configuration Manager. Other access method can be chosen by the win32.cfgmethod parameter. By default the first working one is selected (if any). Starting with Windows 8 (NT 6.2) it is not possible to retrieve resources from 32-bit application or library on 64-bit system. Windows said no. ๐ญ
win32-sysdbg
Access to the PCI configuration space via NT SysDbg interface on Windows systems. Process needs to have Debug privilege, which local Administrators have by default. Not available on 64-bit systems and neither on recent 32-bit systems. Only devices from the first domain are accessible and only first 256 bytes of the PCI configuration space is accessible via this method. Limited but valid. โจ
win32-kldbg
Access to the PCI configuration space via Kernel Local Debugging Driver kldbgdrv.sys. This driver is not part of the Windows system but is part of the Microsoft WinDbg tool. It is required to have kldbgdrv.sys driver installed in the system32 directory or to have windbg.exe or kd.exe binary in PATH. windbg.exe or kd.exe binary contains embedded kldbgdrv.sys driver which libpci can automatically unpack and register. Because of embedded driver usage, it is required that architecture of windbg.exe or kd.exe binary matches the system architecture, and not the libpci application architecture. Therefore for running i386 libpci application on AMD64 system, it is required to have AMD64 version of kldbgdrv.sys driver in the native system32 directory or AMD64 version of windbg.exe or kd.exe binary in the PATH. i386 versions of these binaries would not work. win32-kldbg access method compiled for 32-bit applications supports both 32-bit and also 64-bit OS host systems, therefore i386 libpci application with win32-kldbg method can access PCI config space also on AMD64 host system. kldbgdrv.sys driver has some restrictions. Process needs to have Debug privilege and Windows system has to be booted with Debugging option. Debugging option can be enabled by calling (takes effect after next boot):
bcdedit /debug on
Download links for WinDbg 6.12.2.633 standalone installer from Microsoft Windows SDK for Windows 7 and .NET Framework 4:
amd64: https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi
ia64: https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_ia64/dbg_ia64.msi
x86: https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/dbg_x86.msi
Archived download links of previous WinDbg versions:
https://web.archive.org/web/20110221133326/https://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
https://web.archive.org/web/20110214012715/https://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx
aos-expansion
Access method used on PowerPC Amiga running OS4+. Access is made through Expansion.library. It offers read and write access to configuration space. Retro slay. ๐
rt-thread-smart
The /proc/pci filesystem provided by RT-Thread Smart OS. This method requires PCI support (with the procfs feature enabled) to be available in the driver subsystem, and the DFS v2-based procfs must be mounted in a rootfs-enabled environment. It provides access to the standard PCI configuration space, with limited information available. Embedded bestie energy. ๐ง
โจ PARAMETERS โจ
okay so bestie, the library is literally controlled by a bunch of parameters ๐
they should come with sensible default values, but if you wanna do something unusual โ or honestly something straight-up weird ๐ โ you can override them (peep the -O switch of lspci). no cap.
๐ธ Parameters of specific access methods ๐ธ
dump.nameโ the name of the bus dump file you're reading from. that's it, that's the vibe ๐fbsd.pathโ path to the FreeBSD PCI device. slay.nbsd.pathโ path to the NetBSD PCI device.obsd.pathโ path to the OpenBSD PCI device.proc.pathโ path to the procfs bus tree ๐ธsysfs.pathโ path to the sysfs device tree โจrt-thread-smart-dm.pathโ path to the rt-thread smart DM procfs device tree. very niche, very iconic ๐devmem.pathโ okay so this one is doing a LOT ๐ญ it's the path to the/dev/memdevice, or the path to the\Device\PhysicalMemoryNT section, or the name of the platform specific physical address access method. generally, on POSIX systems it's the path to the memory device, and on Windows systems it's the path to the memory NT section. additionally, on 32-bit Windows systems these platform methods are also recognized:vxdcall,w32skrnl. on DOS/DJGPP systems only these platform methods are recognized:auto,devmap,physmap. DJGPP'sdevmapmethod uses DPMI 1.0 functions0508H(Map Device in Memory Block) and0509H(Map Conventional Memory in Memory Block). DJGPP'sphysmapmethod uses DPMI 0.9 function0800H(Physical Address Mapping). and DJGPP'sautoparameter automatically chooses one of the mentioned methods that's supported by the system. fr fr, it's giving overachiever ๐mmio-conf1.addrsโ physical addresses of memory-mapped I/O ports for Intel configuration mechanism 1.CF8(address) andCFC(data) I/O port addresses are separated by a slash, and multiple addresses for different PCI domains are separated by commas. the format is:
0xaddr1/0xdata1,0xaddr2/0xdata2,...
mmio-conf1-ext.addrsโ physical addresses of memory-mapped I/O ports for Extended PCIe Intel configuration mechanism 1. it has the same format as themmio-conf1.addrsparameter ๐ซถecam.addrsโ physical addresses of PCIe ECAM mappings, and bestie this one has lore ๐ญ each mapping must contain the first PCI bus number and the physical address where the mapping starts. and then it may contain the length of the mapping, the last PCI bus number, and the PCI domain number. when the last PCI bus number isn't provided, then it's calculated from the length of the mapping, or it's assumed0xff. when the length of the mapping is provided, then it's calculated from the last PCI bus number. and when the PCI domain isn't provided, then0x0is assumed. all numbers must be supplied in hexadecimal form (the leading0xprefix is not required). multiple mappings are separated by commas. the format is:
[domain:]start_bus[-end_bus]:start_addr[+length],...
ecam.acpimcfgโ path to the ACPI MCFG table. it's processed by theglob(3)function, so it may contain wildcards (*) โจecam.efisystabโ path to the EFI system table.ecam.bsdโ when it's not set to0, then use BSDkenvorsysctlto find the ACPI MCFG table. default value is1on BSD systems ๐ecam.x86biosโ when it's not set to0, then scan x86 BIOS memory for the ACPI MCFG table. default value is1on x86 systems ๐win32.cfgmethodโ the config space access method to use withwin32-cfgmgr32on Windows systems. the valueautoor an empty string selects the first access method which supports access to the config space on Windows. the valuewin32-cfgmgr32ornoneonly builds a read-only virtual emulated config space with information from the Configuration Manager. so like, read-only, no notes ๐
๐ฆ Parameters for resolving of IDs via DNS ๐ฆ
net.domainโ the DNS domain containing the ID database ๐net.cache_nameโ the name of the file used for caching of resolved IDs. an initial~/is expanded to the user's home directory ๐
๐ง Parameters for resolving of IDs via UDEV's HWDB ๐ง
hwdb.disableโ disable use of HWDB if set to a non-zero value. periodt.
๐ SEE ALSO ๐
lspci(8), setpci(8), pci.ids(5), update-pciids(8)
like, go read those too, iykyk ๐
๐ AUTHOR ๐
the PCI Utilities are maintained by Martin Mares <mj@ucw.cz>. absolute icon, we stan ๐ซถ
and that's the whole page, bestie!! this was pciutils-3.15.0, dated 05 April 2026 โ literally the main character energy of manpages, no cap ๐
โจ๐
๐ฆ where this page comes from
- alpine 3.24: pciutils-doc 3.15.0-r0 ยท GPL-2.0-or-later
- arch rolling: pciutils 3.15.0-1 ยท GPL-2.0-only
- fedora 43: pciutils-devel 3.15.0-1.fc43 ยท GPL-2.0-or-later
- fedora 43: pciutils-devel 3.15.0-1.fc43 ยท GPL-2.0-or-later
- fedora 44: pciutils-devel 3.15.0-1.fc44 ยท GPL-2.0-or-later
- fedora 44: pciutils-devel 3.15.0-1.fc44 ยท GPL-2.0-or-later
- nixos 26.05: pciutils 3.15.0
- nixpkgs unstable: pciutils 3.15.0
- ubuntu stonking: pciutils 1:3.15.0-2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms