1 .TH lspci 8 "@TODAY@" "@VERSION@" "The PCI Utilities"
3 lspci \- list all PCI devices
9 is a utility for displaying information about PCI buses in the system and
10 devices connected to them.
12 By default, it shows a brief list of devices. Use the options described
13 below to request either a more verbose output or output intended for
14 parsing by other programs.
16 If you are going to report bugs in PCI device drivers or in
18 itself, please include output of "lspci -vvx" or even better "lspci -vvxxx"
19 (however, see below for possible caveats).
21 Some parts of the output, especially in the highly verbose modes, are probably
22 intelligible only to experienced PCI hackers. For exact definitions of
23 the fields, please consult either the PCI specifications or the
26 .B /usr/include/linux/pci.h
29 Access to some parts of the PCI configuration space is restricted to root
30 on many operating systems, so the features of
32 available to normal users are limited. However,
34 tries its best to display as much as available and mark all other
41 .SS Basic display modes
44 Dump PCI device data in a backward-compatible machine readable form.
45 See below for details.
48 Dump PCI device data in a machine readable form for easy parsing by scripts.
49 See below for details.
52 Show a tree-like diagram containing all buses, bridges, devices and connections
58 Be verbose and display detailed information about all devices.
61 Be very verbose and display more details. This level includes everything deemed
65 Be even more verbose and display everything we are able to parse,
66 even if it doesn't look interesting at all (e.g., undefined memory regions).
69 Show kernel drivers handling each device and also kernel modules capable of handling it.
70 Turned on by default when
72 is given in the normal mode of output.
73 (Currently works only on Linux with kernel 2.6 or newer.)
76 Show hexadecimal dump of the standard part of the configuration space (the first
77 64 bytes or 128 bytes for CardBus bridges).
80 Show hexadecimal dump of the whole PCI configuration space. It is available only to root
81 as several PCI devices
83 when you try to read some parts of the config space (this behavior probably
84 doesn't violate the PCI standard, but it's at least very stupid). However, such
85 devices are rare, so you needn't worry much.
88 Show hexadecimal dump of the extended (4096-byte) PCI configuration space available
89 on PCI-X 2.0 and PCI Express buses.
92 Bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the
93 PCI bus instead of as seen by the kernel.
96 Always show PCI domain numbers. By default, lspci suppresses them on machines which
100 Identify PCI devices by path through each bridge, instead of by bus number.
103 Identify PCI devices by path through each bridge, showing the bus number as
104 well as the device number.
106 .SS Options to control resolving ID's to names
109 Show PCI vendor and device codes as numbers instead of looking them up in the
113 Show PCI vendor and device codes as both numbers and names.
116 Use DNS to query the central PCI ID database if a device is not found in the local
118 file. If the DNS query succeeds, the result is cached in
120 and it is recognized in subsequent runs even if
122 is not given any more. Please use this switch inside automated scripts only
123 with caution to avoid overloading the database servers.
128 but the local cache is reset.
131 Query the central database even for entries which are recognized locally.
132 Use this if you suspect that the displayed entry is wrong.
134 .SS Options for selection of devices
136 .B -s [[[[<domain>]:]<bus>]:][<device>][.[<func>]]
137 Show only devices in the specified domain (in case your machine has several host bridges,
138 they can either share a common bus number space or each of them can address a PCI domain
139 of its own; domains are numbered from 0 to ffff), bus (0 to ff), device (0 to 1f) and function (0 to 7).
140 Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are
141 hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
142 on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only
143 the fourth function of each device.
145 .B -d [<vendor>]:[<device>][:<class>[:<prog-if>]]
146 Show only devices with specified vendor, device, class ID, and programming interface.
147 The ID's are given in hexadecimal and may be omitted or given as "*", both meaning
148 "any value". The class ID can contain "x" characters which stand for "any digit".
156 as the PCI ID list instead of @IDSDIR@/pci.ids.
162 as the map of PCI ID's handled by kernel modules. By default, lspci uses
163 .RI /lib/modules/ kernel_version /modules.pcimap.
164 Applies only to Linux systems with recent enough module tools.
167 Invoke bus mapping mode which performs a thorough scan of all PCI devices, including
168 those behind misconfigured bridges, etc. This option gives meaningful results only
169 with a direct hardware access mode, which usually requires root privileges.
170 By default, the bus mapper scans domain. You can use the
172 option to select a different domain.
177 version. This option should be used stand-alone.
179 .SS PCI access options
181 The PCI utilities use the PCI library to talk to PCI devices (see
182 \fBpcilib\fP(7) for details). You can use the following options to
183 influence its behavior:
186 The library supports a variety of methods to access the PCI hardware.
187 By default, it uses the first access method available, but you can use
188 this option to override this decision. See \fB-A help\fP for a list of
189 available methods and their descriptions.
191 .B -O <param>=<value>
192 The behavior of the library is controlled by several named parameters.
193 This option allows one to set the value of any of the parameters. Use \fB-O help\fP
194 for a list of known parameters and their default values.
197 Use direct hardware access via Intel configuration mechanism 1.
198 (This is a shorthand for \fB-A intel-conf1\fP.)
201 Use direct hardware access via Intel configuration mechanism 2.
202 (This is a shorthand for \fB-A intel-conf2\fP.)
205 Instead of accessing real hardware, read the list of devices and values of their
206 configuration registers from the given file produced by an earlier run of lspci -x.
207 This is very useful for analysis of user-supplied bug reports, because you can display
208 the hardware configuration in any way you want without disturbing the user with
209 requests for more dumps.
212 Increase debug level of the library.
214 .SH MACHINE READABLE OUTPUT
215 If you intend to process the output of lspci automatically, please use one of the
216 machine-readable output formats
220 described in this section. All other formats are likely to change
221 between versions of lspci.
224 All numbers are always printed in hexadecimal. If you want to process numeric ID's instead of
225 names, please add the
229 .SS Simple format (-m)
231 In the simple format, each device is described on a single line, which is
232 formatted as parameters suitable for passing to a shell script, i.e., values
233 separated by whitespaces, quoted and escaped if necessary.
234 Some of the arguments are positional: slot, class, vendor name, device name,
235 subsystem vendor name and subsystem name (the last two are empty if
236 the device has no subsystem); the remaining arguments are option-like:
244 Programming interface.
247 The relative order of positional arguments and options is undefined.
248 New options can be added in future versions, but they will always
249 have a single argument not separated from the option by any spaces,
250 so they can be easily ignored if not recognized.
252 .SS Verbose format (-vmm)
254 The verbose output is a sequence of records separated by blank lines.
255 Each record describes a single device by a sequence of lines, each line
263 are separated by a single tab character.
264 Neither the records nor the lines within a record are in any particular order.
265 Tags are case-sensitive.
268 The following tags are defined:
272 The name of the slot where the device resides
273 .RI ([ domain :] bus : device . function ).
274 This tag is always the first in a record.
290 Name of the subsystem vendor (optional).
294 Name of the subsystem (optional).
298 The physical slot where the device resides (optional, Linux only).
302 Revision number (optional).
306 Programming interface (optional).
310 Kernel driver currently handling the device (optional, Linux only).
314 Kernel module reporting that it is capable of handling the device
315 (optional, Linux only). Multiple lines with this tag can occur.
319 NUMA node this device is connected to (optional, Linux only).
323 IOMMU group that this device is part of (optional, Linux only).
326 New tags can be added in future versions, so you should silently ignore any tags you don't recognize.
328 .SS Backward-compatible verbose format (-vm)
330 In this mode, lspci tries to be perfectly compatible with its old versions.
331 It's almost the same as the regular verbose format, but the
334 tag is used for both the slot and the device name, so it occurs twice
335 in a single record. Please avoid using this format in any new code.
340 A list of all known PCI ID's (vendors, devices, classes and subclasses). Maintained
341 at https://pci-ids.ucw.cz/, use the
343 utility to download the most recent version.
345 .B @IDSDIR@/pci.ids.gz
346 If lspci is compiled with support for compression, this file is tried before pci.ids.
349 All ID's found in the DNS query mode are cached in this file.
353 Sometimes, lspci is not able to decode the configuration registers completely.
354 This usually happens when not enough documentation was available to the authors.
355 In such cases, it at least prints the
357 mark to signal that there is potentially something more to say. If you know
358 the details, patches will be of course welcome.
360 Access to the extended configuration space is currently supported only by the
367 .BR update-pciids (8),
371 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.