1pcilib(7)                      The PCI Utilities                     pcilib(7)
2
3
4

NAME

6       pcilib - a library for accessing PCI devices
7
8

DESCRIPTION

10       The PCI library (also known as pcilib and libpci) is a portable library
11       for accessing PCI devices and their configuration space.
12
13

ACCESS METHODS

15       The library supports a variety of methods to access  the  configuration
16       space  on  different  operating systems. By default, the first matching
17       method in this list is used, but you can specify override the  decision
18       (see the -A switch of lspci).
19
20
21       linux-sysfs
22              The  /sys filesystem on Linux 2.6 and newer. The standard header
23              of the config space is available to all users, the rest only  to
24              root.  Supports  extended  configuration space, PCI domains, VPD
25              (from Linux 2.6.26), physical slots (also  since  Linux  2.6.26)
26              and information on attached kernel drivers.
27
28       linux-proc
29              The  /proc/bus/pci  interface  supported by Linux 2.1 and newer.
30              The standard header of the config  space  is  available  to  all
31              users, the rest only to root.
32
33       intel-conf1
34              Direct  hardware  access  via  Intel  configuration mechanism 1.
35              Available on i386 and compatibles  on  Linux,  Solaris/x86,  GNU
36              Hurd, Windows, BeOS and Haiku. Requires root privileges.
37
38       intel-conf2
39              Direct  hardware  access  via  Intel  configuration mechanism 2.
40              Available on i386 and compatibles  on  Linux,  Solaris/x86,  GNU
41              Hurd,  Windows,  BeOS and Haiku. Requires root privileges. Warn‐
42              ing: This method is able to address only the first 16 devices on
43              any bus and it seems to be very unreliable in many cases.
44
45       mmio-conf1
46              Direct  hardware  access via Intel configuration mechanism 1 via
47              memory-mapped I/O.  Mostly used on non-i386 platforms.  Requires
48              root  privileges. Warning: This method needs to be properly con‐
49              figured via the mmio-conf1.addrs parameter.
50
51       mmio-conf1-ext
52              Direct hardware access via  Extended  PCIe  Intel  configuration
53              mechanism  1  via  memory-mapped  I/O.   Mostly used on non-i386
54              platforms. Requires root privileges. Warning: This method  needs
55              to  be  properly configured via the mmio-conf1-ext.addrs parame‐
56              ter.
57
58       ecam   Direct hardware access via PCIe ECAM (Enhanced Configuration Ac‐
59              cess  Mechanism).  Available on all PCIe-compliant hardware. Re‐
60              quires root privileges and access to physical memory  (on  Linux
61              systems  disabled CONFIG_STRICT_DEVMEM option). On ACPI compati‐
62              ble systems is ECAM mapping read from the MCFG  table  specified
63              by  the ecam.acpimcfg parameter. On EFI compatible systems, ACPI
64              MCFG table can be located in physical memory via EFI system  ta‐
65              ble specified by the ecam.efisystab parameter. On FreeBSD/NetBSD
66              systems, physical address of ACPI MCFG table can be  located  by
67              kenv or sysctl interface when the ecam.bsd parameter is not dis‐
68              abled. On x86 BIOS compatible systems, ACPI MCFG  table  can  be
69              located  in physical memory by scanning x86 BIOS memory when the
70              ecam.x86bios parameter is not disabled. Alternatively ECAM  map‐
71              pings  can  be specified by the ecam.addrs parameter which takes
72              precedence over ACPI MCFG table. This option is required on sys‐
73              tems without ACPI and also on systems without EFI or x86 BIOS.
74
75       fbsd-device
76              The /dev/pci device on FreeBSD. Requires root privileges.
77
78       aix-device
79              Access method used on AIX. Requires root privileges.
80
81       nbsd-libpci
82              The  /dev/pci0  device on NetBSD accessed using the local libpci
83              library.
84
85       obsd-device
86              The /dev/pci device on OpenBSD. Requires root privileges.
87
88       dump   Read the contents of configuration registers from a file  speci‐
89              fied  in  the dump.name parameter. The format corresponds to the
90              output of lspci -x.
91
92       darwin Access method used on Mac OS X / Darwin. Must be run as root and
93              the system must have been booted with debug=0x144.
94
95       win32-cfgmgr32
96              Device  listing  on Windows systems using the Windows Configura‐
97              tion Manager via cfgmgr32.dll system library. This  method  does
98              not require any special Administrator rights or privileges. Con‐
99              figuration Manager provides only  basic  information  about  de‐
100              vices, assigned resources and device tree structure. There is no
101              access to the PCI configuration space but libpci either tries to
102              use other access method to access configuration space or it pro‐
103              vides read-only virtual emulation based on information from Con‐
104              figuration  Manager.  Other  access  method can be chosen by the
105              win32.cfgmethod parameter. By default the first working  one  is
106              selected  (if  any).  Starting with Windows 8 (NT 6.2) it is not
107              possible to retrieve resources from 32-bit  application  or  li‐
108              brary on 64-bit system.
109
110       win32-sysdbg
111              Access to the PCI configuration space via NT SysDbg interface on
112              Windows systems. Process needs to have  Debug  privilege,  which
113              local  Administrators  have  by default. Not available on 64-bit
114              systems and neither on recent 32-bit systems. Only devices  from
115              the  first domain are accessible and only first 256 bytes of the
116              PCI configuration space is accessible via this method.
117
118       win32-kldbg
119              Access to the PCI configuration space via Kernel Local Debugging
120              Driver kldbgdrv.sys. This driver is not part of the Windows sys‐
121              tem but is part of the Microsoft WinDbg tool. It is required  to
122              have  kldbgdrv.sys driver installed in the system32 directory or
123              to have windbg.exe  or  kd.exe  binary  in  PATH.   kldbgdrv.sys
124              driver has some restrictions. Process needs to have Debug privi‐
125              lege and Windows system has to be booted with Debugging  option.
126              Debugging  option  can be enabled by calling (takes effect after
127              next boot): bcdedit /debug on
128
129              Download links for WinDbg 6.12.2.633 standalone  installer  from
130              Microsoft Windows SDK for Windows 7 and .NET Framework 4:
131              amd64:   https://download.microsoft.com/download/A/6/A/A6AC035D-
132              DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebugging‐
133              Tools_amd64/dbg_amd64.msi
134              ia64:    https://download.microsoft.com/download/A/6/A/A6AC035D-
135              DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebugging‐
136              Tools_ia64/dbg_ia64.msi
137              x86:     https://download.microsoft.com/download/A/6/A/A6AC035D-
138              DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebugging‐
139              Tools/dbg_x86.msi
140
141              Archived download links of previous WinDbg versions:
142              https://web.archive.org/web/20110221133326/https://www.micro‐
143              soft.com/whdc/devtools/debugging/installx86.mspx
144              https://web.archive.org/web/20110214012715/https://www.micro‐
145              soft.com/whdc/devtools/debugging/install64bit.mspx
146
147

PARAMETERS

149       The  library is controlled by several parameters. They should have sen‐
150       sible default values, but in case you want to do something unusual  (or
151       even  something  weird),  you  can  override them (see the -O switch of
152       lspci).
153
154
155   Parameters of specific access methods
156       dump.name
157              Name of the bus dump file to read from.
158
159       fbsd.path
160              Path to the FreeBSD PCI device.
161
162       nbsd.path
163              Path to the NetBSD PCI device.
164
165       obsd.path
166              Path to the OpenBSD PCI device.
167
168       proc.path
169              Path to the procfs bus tree.
170
171       sysfs.path
172              Path to the sysfs device tree.
173
174       devmem.path
175              Path to the /dev/mem device.
176
177       mmio-conf1.addrs
178              Physical addresses of memory-mapped I/O ports for Intel configu‐
179              ration  mechanism  1.  CF8 (address) and CFC (data) I/O port ad‐
180              dresses are separated by slash and multiple addresses  for  dif‐
181              ferent   PCI   domains   are   separated   by  commas.   Format:
182              0xaddr1/0xdata1,0xaddr2/0xdata2,...
183
184       mmio-conf1-ext.addrs
185              Physical addresses of memory-mapped I/O ports for Extended  PCIe
186              Intel  configuration  mechanism  1.  It has same format as mmio-
187              conf1.addrs parameter.
188
189       ecam.addrs
190              Physical addresses of PCIe ECAM mappings. Each mapping must con‐
191              tains  first  PCI  bus number and physical address where mapping
192              starts. And then it may contain the length of the  mapping,  the
193              last PCI bus number and PCI domain number. When the last PCI bus
194              number is not provided then it is calculated from the length  of
195              the mapping or it is assumed 0xff. When length of the mapping is
196              provided then it is calculated from the last PCI bus number. And
197              when PCI domain is not provided then 0x0 is assumed. All numbers
198              must be supplied in hexadecimal form (leading prefix 0x  is  not
199              required).  Multiple  mappings are separated by commas.  Format:
200              [domain:]start_bus[-end_bus]:start_addr[+length],...
201
202       ecam.acpimcfg
203              Path to the ACPI MCFG table. Processed by the glob(3)  function,
204              so it may contain wildcards (*).
205
206       ecam.efisystab
207              Path to the EFI system table.
208
209       ecam.bsd
210              When  not set to 0 then use BSD kenv or sysctl to find ACPI MCFG
211              table. Default value is 1 on BSD systems.
212
213       ecam.x86bios
214              When not set to 0 then scan x86 BIOS memory for ACPI MCFG table.
215              Default value is 1 on x86 systems.
216
217       win32.cfgmethod
218              Config space access method to use with win32-cfgmgr32 on Windows
219              systems. Value auto or an empty string selects the first  access
220              method  which  supports  access  to the config space on Windows.
221              Value win32-cfgmgr32 or none only builds a read-only virtual em‐
222              ulated config space with information from the Configuration Man‐
223              ager.
224
225
226   Parameters for resolving of ID's via DNS
227       net.domain
228              DNS domain containing the ID database.
229
230       net.cache_name
231              Name of the file used for caching of resolved ID's.
232
233
234   Parameters for resolving of ID's via UDEV's HWDB
235       hwdb.disable
236              Disable use of HWDB if set to a non-zero value.
237
238

SEE ALSO

240       lspci(8), setpci(8), pci.ids(5), update-pciids(8)
241
242

AUTHOR

244       The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
245
246
247
248pciutils-3.10.0                   01 May 2023                        pcilib(7)
Impressum