summaryrefslogtreecommitdiff
path: root/pcilib.man
blob: ae6af9f5ba8c1625a9c4c9212ae65b42ef3e3d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
.TH pcilib 7 "@TODAY@" "@VERSION@" "The PCI Utilities"
.SH NAME
pcilib \- a library for accessing PCI devices

.SH DESCRIPTION

The PCI library (also known as \fIpcilib\fP and \fIlibpci\fP) is a portable library
for accessing PCI devices and their configuration space.

.SH ACCESS METHODS

.PP
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 \fB-A\fP switch
of \fIlspci\fP).

.TP
.B linux-sysfs
The
.B /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.
.TP
.B linux-proc
The
.B /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.
.TP
.B intel-conf1
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.
.TP
.B intel-conf2
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.
.TP
.B mmio-conf1
Direct hardware access via Intel configuration mechanism 1 via memory-mapped I/O.
Mostly used on non-i386 platforms. Requires root privileges. Warning: This method
needs to be properly configured via the
.B mmio-conf1.addrs
parameter.
.TP
.B fbsd-device
The
.B /dev/pci
device on FreeBSD. Requires root privileges.
.TP
.B aix-device
Access method used on AIX. Requires root privileges.
.TP
.B nbsd-libpci
The
.B /dev/pci0
device on NetBSD accessed using the local libpci library.
.TP
.B obsd-device
The
.B /dev/pci
device on OpenBSD. Requires root privileges.
.TP
.B dump
Read the contents of configuration registers from a file specified in the
.B dump.name
parameter. The format corresponds to the output of \fIlspci\fP \fB-x\fP.
.TP
.B darwin
Access method used on Mac OS X / Darwin. Must be run as root and the system
must have been booted with debug=0x144.
.TP
.B win32-cfgmgr32
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.
.TP
.B win32-sysdbg
Access to the PCI configuration space via NT SysDbg interface on Windows
systems. Process needs to have Debug privilege, which local Administrators
have by default. Not available on 64-bit systems and neither on recent 32-bit
systems. Only devices from the first domain are accessible and only first
256 bytes of the PCI configuration space is accessible via this method.

.SH PARAMETERS

.PP
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 \fB-O\fP switch of \fIlspci\fP).

.SS Parameters of specific access methods

.TP
.B dump.name
Name of the bus dump file to read from.
.TP
.B fbsd.path
Path to the FreeBSD PCI device.
.TP
.B nbsd.path
Path to the NetBSD PCI device.
.TP
.B obsd.path
Path to the OpenBSD PCI device.
.TP
.B proc.path
Path to the procfs bus tree.
.TP
.B sysfs.path
Path to the sysfs device tree.
.TP
.B devmem.path
Path to the /dev/mem device.
.TP
.B mmio-conf1.addrs
Physical addresses of memory-mapped I/O ports for Intel configuration mechanism 1.
CF8 (address) and CFC (data) I/O port addresses are separated by slash and
multiple addresses for different PCI domains are separated by commas.
Format: 0xaddr1/0xdata1,0xaddr2/0xdata2,...

.SS Parameters for resolving of ID's via DNS
.TP
.B net.domain
DNS domain containing the ID database.
.TP
.B net.cache_name
Name of the file used for caching of resolved ID's.

.SS Parameters for resolving of ID's via UDEV's HWDB
.TP
.B hwdb.disable
Disable use of HWDB if set to a non-zero value.

.SH SEE ALSO

.BR lspci (8),
.BR setpci (8),
.BR pci.ids (5),
.BR update-pciids (8)

.SH AUTHOR
The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.