]> git.ipfire.org Git - thirdparty/pciutils.git/blame - pcilib.man
libpci: Add auxiliary data member to struct pci_access for use by the back-end
[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
43.B fbsd-device
44The
45.B /dev/pci
46device on FreeBSD. Requires root privileges.
47.TP
48.B aix-device
49Access method used on AIX. Requires root privileges.
50.TP
51.B nbsd-libpci
52The
53.B /dev/pci0
54device on NetBSD accessed using the local libpci library.
55.TP
56.B obsd-device
57The
58.B /dev/pci
59device on OpenBSD. Requires root privileges.
60.TP
61.B dump
62Read the contents of configuration registers from a file specified in the
63.B dump.name
64parameter. The format corresponds to the output of \fIlspci\fP \fB-x\fP.
d4c2ab05
MM
65.TP
66.B darwin
67Access method used on Mac OS X / Darwin. Must be run as root and the system
68must have been booted with debug=0x144.
765da485
PR
69.TP
70.B win32-cfgmgr32
71Device listing on Windows systems using the Windows Configuration Manager
72via cfgmgr32.dll system library. This method does not require any special
73Administrator rights or privileges. Configuration Manager provides only basic
74information about devices, assigned resources and device tree structure. There
75is no access to the PCI configuration space but libpci provides read-only
76virtual emulation based on information from Configuration Manager. Starting
77with Windows 8 (NT 6.2) it is not possible to retrieve resources from 32-bit
78application or library on 64-bit system.
963d7cb7
PR
79.TP
80.B win32-sysdbg
81Access to the PCI configuration space via NT SysDbg interface on Windows
82systems. Process needs to have Debug privilege, which local Administrators
83have by default. Not available on 64-bit systems and neither on recent 32-bit
84systems. Only devices from the first domain are accessible and only first
85256 bytes of the PCI configuration space is accessible via this method.
f2bf13dc
MM
86
87.SH PARAMETERS
88
89.PP
90The library is controlled by several parameters. They should have sensible default
91values, but in case you want to do something unusual (or even something weird),
92you can override them (see the \fB-O\fP switch of \fIlspci\fP).
93
94.SS Parameters of specific access methods
95
96.TP
97.B dump.name
98Name of the bus dump file to read from.
99.TP
100.B fbsd.path
101Path to the FreeBSD PCI device.
102.TP
103.B nbsd.path
104Path to the NetBSD PCI device.
105.TP
106.B obsd.path
107Path to the OpenBSD PCI device.
108.TP
109.B proc.path
110Path to the procfs bus tree.
111.TP
112.B sysfs.path
113Path to the sysfs device tree.
114
115.SS Parameters for resolving of ID's via DNS
116.TP
117.B net.domain
118DNS domain containing the ID database.
119.TP
120.B net.cache_name
121Name of the file used for caching of resolved ID's.
122
ac357d3b
MM
123.SS Parameters for resolving of ID's via UDEV's HWDB
124.TP
125.B hwdb.disable
126Disable use of HWDB if set to a non-zero value.
127
f2bf13dc
MM
128.SH SEE ALSO
129
130.BR lspci (8),
131.BR setpci (8),
ef5b622f 132.BR pci.ids (5),
f2bf13dc
MM
133.BR update-pciids (8)
134
135.SH AUTHOR
136The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.