]> git.ipfire.org Git - thirdparty/pciutils.git/blame - pcilib.man
libpci: win32-cfgmgr32: Add support for accessing config space via other backend
[thirdparty/pciutils.git] / pcilib.man
CommitLineData
f2bf13dc 1.TH pcilib 7 "@TODAY@" "@VERSION@" "The PCI Utilities"
f2bf13dc
MM
2.SH NAME
3pcilib \- a library for accessing PCI devices
4
5.SH DESCRIPTION
6
7The PCI library (also known as \fIpcilib\fP and \fIlibpci\fP) is a portable library
8for accessing PCI devices and their configuration space.
9
10.SH ACCESS METHODS
11
12.PP
13The library supports a variety of methods to access the configuration space
14on different operating systems. By default, the first matching method in this
15list is used, but you can specify override the decision (see the \fB-A\fP switch
16of \fIlspci\fP).
17
18.TP
19.B linux-sysfs
20The
21.B /sys
22filesystem on Linux 2.6 and newer. The standard header of the config space is available
9bd5b1cf 23to all users, the rest only to root. Supports extended configuration space, PCI domains,
e16e04e8
MM
24VPD (from Linux 2.6.26), physical slots (also since Linux 2.6.26) and information on attached
25kernel drivers.
f2bf13dc
MM
26.TP
27.B linux-proc
28The
29.B /proc/bus/pci
30interface supported by Linux 2.1 and newer. The standard header of the config space is available
31to all users, the rest only to root.
32.TP
33.B intel-conf1
34Direct hardware access via Intel configuration mechanism 1. Available on i386 and compatibles
40e253d7 35on Linux, Solaris/x86, GNU Hurd, Windows, BeOS and Haiku. Requires root privileges.
f2bf13dc
MM
36.TP
37.B intel-conf2
38Direct hardware access via Intel configuration mechanism 2. Available on i386 and compatibles
40e253d7 39on Linux, Solaris/x86, GNU Hurd, Windows, BeOS and Haiku. Requires root privileges. Warning: This method
f2bf13dc
MM
40is able to address only the first 16 devices on any bus and it seems to be very
41unreliable in many cases.
42.TP
0a7350fb
PR
43.B mmio-conf1
44Direct hardware access via Intel configuration mechanism 1 via memory-mapped I/O.
45Mostly used on non-i386 platforms. Requires root privileges. Warning: This method
46needs to be properly configured via the
47.B mmio-conf1.addrs
48parameter.
49.TP
e2d9340b
PR
50.B mmio-conf1-ext
51Direct hardware access via Extended PCIe Intel configuration mechanism 1 via memory-mapped I/O.
52Mostly used on non-i386 platforms. Requires root privileges. Warning: This method
53needs to be properly configured via the
54.B mmio-conf1-ext.addrs
55parameter.
56.TP
f2bf13dc
MM
57.B fbsd-device
58The
59.B /dev/pci
60device on FreeBSD. Requires root privileges.
61.TP
62.B aix-device
63Access method used on AIX. Requires root privileges.
64.TP
65.B nbsd-libpci
66The
67.B /dev/pci0
68device on NetBSD accessed using the local libpci library.
69.TP
70.B obsd-device
71The
72.B /dev/pci
73device on OpenBSD. Requires root privileges.
74.TP
75.B dump
76Read the contents of configuration registers from a file specified in the
77.B dump.name
78parameter. The format corresponds to the output of \fIlspci\fP \fB-x\fP.
d4c2ab05
MM
79.TP
80.B darwin
81Access method used on Mac OS X / Darwin. Must be run as root and the system
82must have been booted with debug=0x144.
765da485
PR
83.TP
84.B win32-cfgmgr32
85Device listing on Windows systems using the Windows Configuration Manager
86via cfgmgr32.dll system library. This method does not require any special
87Administrator rights or privileges. Configuration Manager provides only basic
88information about devices, assigned resources and device tree structure. There
848123eb
PR
89is no access to the PCI configuration space but libpci either tries to use
90other access method to access configuration space or it provides read-only
91virtual emulation based on information from Configuration Manager. Other
92access method can be chosen by the
93.B win32.cfgmethod
94parameter. By default the first working one is selected (if any). Starting
765da485
PR
95with Windows 8 (NT 6.2) it is not possible to retrieve resources from 32-bit
96application or library on 64-bit system.
963d7cb7
PR
97.TP
98.B win32-sysdbg
99Access to the PCI configuration space via NT SysDbg interface on Windows
100systems. Process needs to have Debug privilege, which local Administrators
101have by default. Not available on 64-bit systems and neither on recent 32-bit
102systems. Only devices from the first domain are accessible and only first
103256 bytes of the PCI configuration space is accessible via this method.
388dc6c2
PR
104.TP
105.B win32-kldbg
106Access to the PCI configuration space via Kernel Local Debugging Driver
107kldbgdrv.sys. This driver is not part of the Windows system but is part of
108the Microsoft WinDbg tool. It is required to have kldbgdrv.sys driver installed
109in the system32 directory or to have windbg.exe or kd.exe binary in PATH.
110kldbgdrv.sys driver has some restrictions. Process needs to have Debug privilege
111and Windows system has to be booted with Debugging option. Debugging option can
112be enabled by calling (takes effect after next boot):
113.B bcdedit /debug on
114.IP
115Download links for WinDbg 6.12.2.633 standalone installer from Microsoft Windows
116SDK for Windows 7 and .NET Framework 4:
117.br
118amd64: https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi
119.br
120ia64: https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_ia64/dbg_ia64.msi
121.br
122x86: https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/dbg_x86.msi
123.IP
124Archived download links of previous WinDbg versions:
125.br
126https://web.archive.org/web/20110221133326/https://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
127.br
128https://web.archive.org/web/20110214012715/https://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx
f2bf13dc
MM
129
130.SH PARAMETERS
131
132.PP
133The library is controlled by several parameters. They should have sensible default
134values, but in case you want to do something unusual (or even something weird),
135you can override them (see the \fB-O\fP switch of \fIlspci\fP).
136
137.SS Parameters of specific access methods
138
139.TP
140.B dump.name
141Name of the bus dump file to read from.
142.TP
143.B fbsd.path
144Path to the FreeBSD PCI device.
145.TP
146.B nbsd.path
147Path to the NetBSD PCI device.
148.TP
149.B obsd.path
150Path to the OpenBSD PCI device.
151.TP
152.B proc.path
153Path to the procfs bus tree.
154.TP
155.B sysfs.path
156Path to the sysfs device tree.
0a7350fb
PR
157.TP
158.B devmem.path
159Path to the /dev/mem device.
160.TP
161.B mmio-conf1.addrs
162Physical addresses of memory-mapped I/O ports for Intel configuration mechanism 1.
163CF8 (address) and CFC (data) I/O port addresses are separated by slash and
164multiple addresses for different PCI domains are separated by commas.
165Format: 0xaddr1/0xdata1,0xaddr2/0xdata2,...
e2d9340b
PR
166.TP
167.B mmio-conf1-ext.addrs
168Physical addresses of memory-mapped I/O ports for Extended PCIe Intel configuration mechanism 1.
169It has same format as
170.B mmio-conf1.addrs
171parameter.
848123eb
PR
172.TP
173.B win32.cfgmethod
174Config space access method for win32-cfgmgr32 on Windows systems. Value
175.I auto
176or emtpy string probe and choose the first access method which supports access
177to the config space access on Windows. Value
178.I win32-cfgmgr32
179only builds read-only virtual emulated config space with information from the
180Configuration Manager.
f2bf13dc
MM
181
182.SS Parameters for resolving of ID's via DNS
183.TP
184.B net.domain
185DNS domain containing the ID database.
186.TP
187.B net.cache_name
188Name of the file used for caching of resolved ID's.
189
ac357d3b
MM
190.SS Parameters for resolving of ID's via UDEV's HWDB
191.TP
192.B hwdb.disable
193Disable use of HWDB if set to a non-zero value.
194
f2bf13dc
MM
195.SH SEE ALSO
196
197.BR lspci (8),
198.BR setpci (8),
ef5b622f 199.BR pci.ids (5),
f2bf13dc
MM
200.BR update-pciids (8)
201
202.SH AUTHOR
203The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.