1lspci(8) The PCI Utilities lspci(8)
2
3
4
6 lspci - list all PCI devices
7
9 lspci [options]
10
12 lspci is a utility for displaying information about all PCI buses in
13 the system and all devices connected to them.
14
15 By default, it shows a brief list of devices. Use the options described
16 below to request either a more verbose output or output intended for
17 parsing by other programs.
18
19 If you are going to report bugs in PCI device drivers or in lspci
20 itself, please include output of "lspci -vvx" or even better "lspci
21 -vvxxx" (however, see below for possible caveats).
22
23 Some parts of the output, especially in the highly verbose modes, is
24 probably intelligible only to experienced PCI hackers. For the exact
25 definitions of the fields, please consult either the PCI specifications
26 or the header.h and /usr/include/linux/pci.h include files.
27
28 Access to some parts of the PCI configuration space is restricted to
29 root on many operating systems, so the features of lspci available to
30 normal users are limited. However, lspci tries its best to display as
31 much as available and mark all other information with <access denied>
32 text.
33
34
36 -v Be verbose and display detailed information about all devices.
37
38 -vv Be very verbose and display more details. This level includes
39 everything deemed useful.
40
41 -vvv Be even more verbose and display everything we are able to
42 parse, even if it doesn't look interesting at all (e.g., unde‐
43 fined memory regions).
44
45 -n Show PCI vendor and device codes as numbers instead of looking
46 them up in the PCI ID list.
47
48 -nn Show PCI vendor and device codes as both numbers and names.
49
50 -x Show hexadecimal dump of the standard part of the configuration
51 space (the first 64 bytes or 128 bytes for CardBus bridges).
52
53 -xxx Show hexadecimal dump of the whole PCI configuration space. It
54 is available only to root as several PCI devices crash when you
55 try to read some parts of the config space (this behavior proba‐
56 bly doesn't violate the PCI standard, but it's at least very
57 stupid). However, such devices are rare, so you needn't worry
58 much.
59
60 -xxxx Show hexadecimal dump of the extended (4096-byte) PCI configura‐
61 tion space available on PCI-X 2.0 and PCI Express buses.
62
63 -b Bus-centric view. Show all IRQ numbers and addresses as seen by
64 the cards on the PCI bus instead of as seen by the kernel.
65
66 -t Show a tree-like diagram containing all buses, bridges, devices
67 and connections between them.
68
69 -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
70 Show only devices in the specified domain (in case your machine
71 has several host bridges, they can either share a common bus
72 number space or each of them can address a PCI domain of its
73 own; domains are numbered from 0 to ffff), bus (0 to ff), slot
74 (0 to 1f) and function (0 to 7). Each component of the device
75 address can be omitted or set to "*", both meaning "any value".
76 All numbers are hexadecimal. E.g., "0:" means all devices on
77 bus 0, "0" means all functions of device 0 on any bus, "0.3"
78 selects third function of device 0 on all buses and ".4" shows
79 only the fourth function of each device.
80
81 -d [<vendor>]:[<device>]
82 Show only devices with specified vendor and device ID. Both ID's
83 are given in hexadecimal and may be omitted or given as "*",
84 both meaning "any value".
85
86 -i <file>
87 Use <file> as the PCI ID list instead of
88 /usr/share/hwdata/pci.ids.
89
90 -m Dump PCI device data in a backward-compatible machine readable
91 form. See below for details.
92
93 -mm Dump PCI device data in a machine readable form for easy parsing
94 by scripts. See below for details.
95
96 -D Always show PCI domain numbers. By default, lspci suppresses
97 them on machines which have only domain 0.
98
99 -M Invoke bus mapping mode which performs a thorough scan of all
100 PCI devices, including those behind misconfigured bridges etc.
101 This option is available only to root and it gives meaningful
102 results only if combined with direct hardware access mode (oth‐
103 erwise the results are identical to normal listing modes, modulo
104 bugs in lspci). Please note that the bus mapper doesn't support
105 PCI domains and scans only domain 0.
106
107 --version
108 Shows lspci version. This option should be used stand-alone.
109
110
112 The PCI utilities use PCILIB (a portable library providing platform-
113 independent functions for PCI configuration space access) to talk to
114 the PCI cards. It supports the following access methods:
115
116
117 linux_sysfs
118 The /sys filesystem on Linux 2.6 and newer. The standard header
119 of the config space is available to all users, the rest only to
120 root. Supports extended configuration space and PCI domains.
121
122 linux_proc
123 The /proc/bus/pci interface supported by Linux 2.1 and newer.
124 The standard header of the config space is available to all
125 users, the rest only to root.
126
127 intel_conf1
128 Direct hardware access via Intel configuration mechanism 1.
129 Available on i386 and compatibles on Linux, Solaris/x86, GNU
130 Hurd and Windows. Requires root privileges.
131
132 intel_conf2
133 Direct hardware access via Intel configuration mechanism 2.
134 Available on i386 and compatibles on Linux, Solaris/x86 and GNU
135 Hurd. Requires root privileges. Warning: This method is able to
136 address only first 16 devices on any bus and it seems to be very
137 unreliable in many cases.
138
139 fbsd_device
140 The /dev/pci device on FreeBSD. Requires root privileges.
141
142 aix_device
143 Access method used on AIX. Requires root privileges.
144
145 nbsd_libpci
146 The /dev/pci0 device on NetBSD accessed using the local libpci
147 library.
148
149
150 By default, PCILIB uses the first available access method and displays
151 no debugging messages, but you can use the following switches to con‐
152 trol its behavior:
153
154
155 -P <dir>
156 Force use of the linux_proc access method, using <dir> instead
157 of /proc/bus/pci.
158
159 -H1 Use direct hardware access via Intel configuration mechanism 1.
160
161 -H2 Use direct hardware access via Intel configuration mechanism 2.
162
163 -F <file>
164 Extract all information from given file containing output of
165 lspci -x. This is very useful for analysis of user-supplied bug
166 reports, because you can display the hardware configuration in
167 any way you want without disturbing the user with requests for
168 more dumps.
169
170 -G Increase debug level of the library.
171
172
174 If you intend to process the output of lspci automatically, please use
175 one of the machine-readable output formats (-m, -vm, -vmm) described in
176 this section. All other formats are likely to change between versions
177 of lspci.
178
179
180 All numbers are always printed in hexadecimal. If you want to process
181 numeric ID's instead of names, please add the -n switch.
182
183
184 Simple format (-m)
185 In the simple format, each device is described on a single line, which
186 is formatted as parameters suitable for passing to a shell script,
187 i.e., values separated by whitespaces, quoted and escaped if necessary.
188 Some of the arguments are positional: slot, class, vendor name, device
189 name, subsystem vendor name and subsystem name (the last two are empty
190 if the device has no subsystem); the remaining arguments are option-
191 like:
192
193
194 -rrev Revision number.
195
196
197 -pprogif
198 Programming interface.
199
200
201 The relative order of positional arguments and options is undefined.
202 New options can be added in future versions, but they will always have
203 a single argument not separated from the option by any spaces, so they
204 can be easily ignored if not recognized.
205
206
207 Verbose format (-vmm)
208 The verbose output is a sequence of records separated by blank lines.
209 Each record describes a single device by a sequence of lines, each line
210 containing a single `tag: value' pair. The tag and the value are sepa‐
211 rated by a single tab character. Neither the records nor the lines
212 within a record are in any particular order. Tags are case-sensitive.
213
214
215 The following tags are defined:
216
217
218 Slot The name of the slot where the device resides
219 ([domain:]bus:device.function). This tag is always the first in
220 a record.
221
222
223 Class Name of the class.
224
225
226 Vendor Name of the vendor.
227
228
229 Device Name of the device.
230
231
232 SVendor
233 Name of the subsystem vendor (optional).
234
235
236 SDevice
237 Name of the subsystem (optional).
238
239
240 Rev Revision number (optional).
241
242
243 ProgIf Programming interface (optional).
244
245
246 New tags can be added in future versions, so you should silently ignore
247 any tags you don't recognize.
248
249
250 Backward-compatible verbose format (-vm)
251 In this mode, lspci tries to be perfectly compatible with its old ver‐
252 sions. It's almost the same as the regular verbose format, but the
253 Device tag is used for both the slot and the device name, so it occurs
254 twice in a single record. Please avoid using this format in any new
255 code.
256
257
259 /usr/share/hwdata/pci.ids
260 A list of all known PCI ID's (vendors, devices, classes and sub‐
261 classes). Maintained at http://pciids.sourceforge.net/, use the
262 update-pciids utility to download the most recent version.
263
264 /usr/share/hwdata/pci.ids.gz
265 If lspci is compiled with support for compression, this file is
266 tried before pci.ids.
267
268 /proc/bus/pci
269 An interface to PCI bus configuration space provided by the
270 post-2.1.82 Linux kernels. Contains per-bus subdirectories with
271 per-card config space files and a devices file containing a list
272 of all PCI devices.
273
274
276 setpci(8), update-pciids(8)
277
278
280 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
281
282
283
284pciutils-2.2.4 09 September 2006 lspci(8)