1 .TH lspci 8 "@TODAY@" "@VERSION@" "The PCI Utilities"
4 lspci \- list all PCI devices
10 is a utility for displaying information about all PCI buses in the system and
11 all devices connected to them.
13 By default, it shows a brief list of devices. Use the options described
14 below to request either a more verbose output or output intended for
15 parsing by other programs.
17 If you are going to report bugs in PCI device drivers or in
19 itself, please include output of "lspci -vvx" or even better "lspci -vvxxx"
20 (however, see below for possible caveats).
22 Some parts of the output, especially in the highly verbose modes, is probably
23 intelligible only to experienced PCI hackers. For the exact definitions of
24 the fields, please consult either the PCI specifications or the
27 .B /usr/include/linux/pci.h
30 Access to some parts of the PCI configuration space is restricted to root
31 on many operating systems, so the features of
33 available to normal users are limited. However,
35 tries its best to display as much as available and mark all other
43 Be verbose and display detailed information about all devices.
46 Be very verbose and display more details. This level includes everything deemed
50 Be even more verbose and display everything we are able to parse,
51 even if it doesn't look interesting at all (e.g., undefined memory regions).
54 Show PCI vendor and device codes as numbers instead of looking them up in the
58 Show PCI vendor and device codes as both numbers and names.
61 Show hexadecimal dump of the standard part of the configuration space (the first
62 64 bytes or 128 bytes for CardBus bridges).
65 Show hexadecimal dump of the whole PCI configuration space. It is available only to root
66 as several PCI devices
68 when you try to read some parts of the config space (this behavior probably
69 doesn't violate the PCI standard, but it's at least very stupid). However, such
70 devices are rare, so you needn't worry much.
73 Show hexadecimal dump of the extended (4096-byte) PCI configuration space available
74 on PCI-X 2.0 and PCI Express buses.
77 Show kernel drivers handling each device and also kernel modules capable of handling it.
78 Turned on by default when
80 is given in the normal mode of output.
81 (Currently works only on Linux with kernel 2.6 or newer.)
84 Bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the
85 PCI bus instead of as seen by the kernel.
88 Show a tree-like diagram containing all buses, bridges, devices and connections
91 .B -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
92 Show only devices in the specified domain (in case your machine has several host bridges,
93 they can either share a common bus number space or each of them can address a PCI domain
94 of its own; domains are numbered from 0 to ffff), bus (0 to ff), slot (0 to 1f) and function (0 to 7).
95 Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are
96 hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
97 on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only
98 the fourth function of each device.
100 .B -d [<vendor>]:[<device>]
101 Show only devices with specified vendor and device ID. Both ID's are given in
102 hexadecimal and may be omitted or given as "*", both meaning "any value".
108 as the PCI ID list instead of @IDSDIR@/pci.ids.
114 as the map of PCI ID's handled by kernel modules. By default, lspci uses
115 .RI /lib/modules/ kernel_version /modules.pcimap.
116 Applies only to Linux systems with recent enough module tools.
119 Dump PCI device data in a backward-compatible machine readable form.
120 See below for details.
123 Dump PCI device data in a machine readable form for easy parsing by scripts.
124 See below for details.
127 Always show PCI domain numbers. By default, lspci suppresses them on machines which
131 Invoke bus mapping mode which performs a thorough scan of all PCI devices, including
132 those behind misconfigured bridges etc. This option is available only to root and it
133 gives meaningful results only if combined with direct hardware access mode (otherwise
134 the results are identical to normal listing modes, modulo bugs in lspci). Please note
135 that the bus mapper doesn't support PCI domains and scans only domain 0.
140 version. This option should be used stand-alone.
142 .SH PCILIB AND ITS OPTIONS
143 The PCI utilities use PCILIB (a portable library providing platform-independent
144 functions for PCI configuration space access) to talk to the PCI cards. It supports
145 the following access methods:
151 filesystem on Linux 2.6 and newer. The standard header of the config space is available
152 to all users, the rest only to root. Supports extended configuration space, PCI domains
153 and information on attached kernel drivers.
158 interface supported by Linux 2.1 and newer. The standard header of the config space is available
159 to all users, the rest only to root.
162 Direct hardware access via Intel configuration mechanism 1. Available on i386 and compatibles
163 on Linux, Solaris/x86, GNU Hurd and Windows. Requires root privileges.
166 Direct hardware access via Intel configuration mechanism 2. Available on i386 and compatibles
167 on Linux, Solaris/x86 and GNU Hurd. Requires root privileges. Warning: This method
168 is able to address only first 16 devices on any bus and it seems to be very
169 unreliable in many cases.
174 device on FreeBSD. Requires root privileges.
179 device on OpenBSD. Requires root privileges.
184 device on NetBSD accessed using the local libpci library.
187 Access method used on AIX. Requires root privileges.
190 By default, PCILIB uses the first available access method and displays no debugging
191 messages, but you can use the following switches to control its behavior:
195 Force use of the linux_proc access method, using
197 instead of /proc/bus/pci.
200 Use direct hardware access via Intel configuration mechanism 1.
203 Use direct hardware access via Intel configuration mechanism 2.
206 Extract all information from given file containing output of lspci -x. This is very
207 useful for analysis of user-supplied bug reports, because you can display the
208 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 Revision number (optional).
302 Programming interface (optional).
306 Kernel driver currently handling the device (optional, Linux only).
310 Kernel module reporting that it is capable of handling the device
311 (optional, Linux only).
314 New tags can be added in future versions, so you should silently ignore any tags you don't recognize.
316 .SS Backward-compatible verbose format (-vm)
318 In this mode, lspci tries to be perfectly compatible with its old versions.
319 It's almost the same as the regular verbose format, but the
322 tag is used for both the slot and the device name, so it occurs twice
323 in a single record. Please avoid using this format in any new code.
328 A list of all known PCI ID's (vendors, devices, classes and subclasses). Maintained
329 at http://pciids.sourceforge.net/, use the
331 utility to download the most recent version.
333 .B @IDSDIR@/pci.ids.gz
334 If lspci is compiled with support for compression, this file is tried before pci.ids.
337 An interface to PCI bus configuration space provided by the post-2.1.82 Linux
338 kernels. Contains per-bus subdirectories with per-card config space files and a
340 file containing a list of all PCI devices.
344 Sometimes, lspci is not able to decode the configuration registers completely.
345 This usually happens when not enough documentation was available to the authors.
346 In such cases, it at least prints the
348 mark to signal that there is potentially something more to say. If you know
349 the details, patches will be of course welcome.
351 Access to the extended configuration space is currently supported only by the
357 .BR update-pciids (8)
360 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.