]> git.ipfire.org Git - thirdparty/pciutils.git/blob - lspci.man
Register caching rewrite
[thirdparty/pciutils.git] / lspci.man
1 .TH lspci 8 "@TODAY@" "@VERSION@" "The PCI Utilities"
2 .IX lspci
3 .SH NAME
4 lspci \- list all PCI devices
5 .SH SYNOPSIS
6 .B lspci
7 .RB [ options ]
8 .SH DESCRIPTION
9 .B lspci
10 is a utility for displaying information about all PCI buses in the system and
11 all devices connected to them.
12
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.
16
17 If you are going to report bugs in PCI device drivers or in
18 .I lspci
19 itself, please include output of "lspci -vvx" or even better "lspci -vvxxx"
20 (however, see below for possible caveats).
21
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
25 .B header.h
26 and
27 .B /usr/include/linux/pci.h
28 include files.
29
30 Access to some parts of the PCI configuration space is restricted to root
31 on many operating systems, so the features of
32 .I lspci
33 available to normal users are limited. However,
34 .I lspci
35 tries its best to display as much as available and mark all other
36 information with
37 .I <access denied>
38 text.
39
40 .SH OPTIONS
41 .TP
42 .B -v
43 Be verbose and display detailed information about all devices.
44 .TP
45 .B -vv
46 Be very verbose and display more details. This level includes everything deemed
47 useful.
48 .TP
49 .B -vvv
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).
52 .TP
53 .B -n
54 Show PCI vendor and device codes as numbers instead of looking them up in the
55 PCI ID list.
56 .TP
57 .B -x
58 Show hexadecimal dump of the standard part of the configuration space (the first
59 64 bytes or 128 bytes for CardBus bridges).
60 .TP
61 .B -xxx
62 Show hexadecimal dump of the whole PCI configuration space. It is available only to root
63 as several PCI devices
64 .B crash
65 when you try to read some parts of the config space (this behavior probably
66 doesn't violate the PCI standard, but it's at least very stupid). However, such
67 devices are rare, so you needn't worry much.
68 .TP
69 .B -xxxx
70 Show hexadecimal dump of the extended (4096-byte) PCI configuration space available
71 on PCI-X 2.0 and PCI Express buses.
72 .TP
73 .B -b
74 Bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the
75 PCI bus instead of as seen by the kernel.
76 .TP
77 .B -t
78 Show a tree-like diagram containing all buses, bridges, devices and connections
79 between them.
80 .TP
81 .B -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
82 Show only devices in the specified domain (in case your machine has several host bridges,
83 they can either share a common bus number space or each of them can address a PCI domain
84 of its own; domains are numbered from 0 to ffff), bus (0 to ff), slot (0 to 1f) and function (0 to 7).
85 Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are
86 hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
87 on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only
88 the fourth function of each device.
89 .TP
90 .B -d [<vendor>]:[<device>]
91 Show only devices with specified vendor and device ID. Both ID's are given in
92 hexadecimal and may be omitted or given as "*", both meaning "any value".
93 .TP
94 .B -i <file>
95 Use
96 .B
97 <file>
98 as the PCI ID list instead of @SHAREDIR@/pci.ids.
99 .TP
100 .B -m
101 Dump PCI device data in machine readable form (both normal and verbose format supported)
102 for easy parsing by scripts.
103 .TP
104 .B -M
105 Invoke bus mapping mode which performs a thorough scan of all PCI devices, including
106 those behind misconfigured bridges etc. This option is available only to root and it
107 gives meaningful results only if combined with direct hardware access mode (otherwise
108 the results are identical to normal listing modes, modulo bugs in lspci). Please note
109 that the bus mapper doesn't support PCI domains and scans only domain 0.
110 .TP
111 .B --version
112 Shows
113 .I lspci
114 version. This option should be used stand-alone.
115
116 .SH PCILIB AND ITS OPTIONS
117 The PCI utilities use PCILIB (a portable library providing platform-independent
118 functions for PCI configuration space access) to talk to the PCI cards. It supports
119 the following access methods:
120
121 .TP
122 .B linux_sysfs
123 The
124 .B /sys
125 filesystem on Linux 2.6 and newer. The standard header of the config space is available
126 to all users, the rest only to root. Supports extended configuration space and PCI domains.
127 .TP
128 .B linux_proc
129 The
130 .B /proc/bus/pci
131 interface supported by Linux 2.1 and newer. The standard header of the config space is available
132 to all users, the rest only to root.
133 .TP
134 .B intel_conf1
135 Direct hardware access via Intel configuration mechanism 1. Available on i386 and compatibles
136 on Linux, Solaris/x86, GNU Hurd and Windows. Requires root privileges.
137 .TP
138 .B intel_conf2
139 Direct hardware access via Intel configuration mechanism 2. Available on i386 and compatibles
140 on Linux, Solaris/x86 and GNU Hurd. Requires root privileges. Warning: This method
141 is able to address only first 16 devices on any bus and it seems to be very
142 unreliable in many cases.
143 .TP
144 .B fbsd_device
145 The
146 .B /dev/pci
147 device on FreeBSD. Requires root privileges.
148 .TP
149 .B aix_device
150 Access method used on AIX. Requires root privileges.
151 .TP
152 .B nbsd_libpci
153 The
154 .B /dev/pci0
155 device on NetBSD accessed using the local libpci library.
156
157 .P
158 By default, PCILIB uses the first available access method and displays no debugging
159 messages, but you can use the following switches to control its behavior:
160
161 .TP
162 .B -P <dir>
163 Force use of the linux_proc access method, using
164 .B <dir>
165 instead of /proc/bus/pci.
166 .TP
167 .B -H1
168 Use direct hardware access via Intel configuration mechanism 1.
169 .TP
170 .B -H2
171 Use direct hardware access via Intel configuration mechanism 2.
172 .TP
173 .B -F <file>
174 Extract all information from given file containing output of lspci -x. This is very
175 useful for analysis of user-supplied bug reports, because you can display the
176 hardware configuration in any way you want without disturbing the user with
177 requests for more dumps.
178 .TP
179 .B -G
180 Increase debug level of the library.
181
182 .SH FILES
183 .TP
184 .B @SHAREDIR@/pci.ids
185 A list of all known PCI ID's (vendors, devices, classes and subclasses). Maintained
186 at http://pciids.sourceforge.net/, use the
187 .B update-pciids
188 utility to download the most recent version.
189 .TP
190 .B /proc/bus/pci
191 An interface to PCI bus configuration space provided by the post-2.1.82 Linux
192 kernels. Contains per-bus subdirectories with per-card config space files and a
193 .I devices
194 file containing a list of all PCI devices.
195
196 .SH SEE ALSO
197 .BR setpci (8),
198 .BR update-pciids (8)
199
200 .SH AUTHOR
201 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.