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