|pcilib(7)||The PCI Utilities||pcilib(7)|
pcilib - a library for accessing PCI devices
The PCI library (also known as pcilib and libpci) is a portable library for accessing PCI devices and their configuration space.
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 specify override the decision (see the -A switch of lspci).
- 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.
- 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.
- 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.
- 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.
- The /dev/pci device on FreeBSD. Requires root privileges.
- Access method used on AIX. Requires root privileges.
- The /dev/pci0 device on NetBSD accessed using the local libpci library.
- The /dev/pci device on OpenBSD. Requires root privileges.
- Read the contents of configuration registers from a file specified in the dump.name parameter. The format corresponds to the output of lspci -x.
- Access method used on Mac OS X / Darwin. Must be run as root and the system must have been booted with debug=0x144.
- 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 provides read-only virtual emulation based on information from Configuration Manager. Starting with Windows 8 (NT 6.2) it is not possible to retrieve resources from 32-bit application or library on 64-bit system.
The library is controlled by several parameters. They should have sensible default values, but in case you want to do something unusual (or even something weird), you can override them (see the -O switch of lspci).
Parameters of specific access methods¶
Parameters for resolving of ID's via DNS¶
Parameters for resolving of ID's via UDEV's HWDB¶
- Disable use of HWDB if set to a non-zero value.
The PCI Utilities are maintained by Martin Mares <email@example.com>.
|18 April 2022||pciutils-3.8.0|