]> mj.ucw.cz Git - pciutils.git/blob - lspci.man
Whitespace cleanup of all source files.
[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 -nn
58 Show PCI vendor and device codes as both numbers and names.
59 .TP
60 .B -x
61 Show hexadecimal dump of the standard part of the configuration space (the first
62 64 bytes or 128 bytes for CardBus bridges).
63 .TP
64 .B -xxx
65 Show hexadecimal dump of the whole PCI configuration space. It is available only to root
66 as several PCI devices
67 .B crash
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.
71 .TP
72 .B -xxxx
73 Show hexadecimal dump of the extended (4096-byte) PCI configuration space available
74 on PCI-X 2.0 and PCI Express buses.
75 .TP
76 .B -b
77 Bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the
78 PCI bus instead of as seen by the kernel.
79 .TP
80 .B -t
81 Show a tree-like diagram containing all buses, bridges, devices and connections
82 between them.
83 .TP
84 .B -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
85 Show only devices in the specified domain (in case your machine has several host bridges,
86 they can either share a common bus number space or each of them can address a PCI domain
87 of its own; domains are numbered from 0 to ffff), bus (0 to ff), slot (0 to 1f) and function (0 to 7).
88 Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are
89 hexadecimal.  E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
90 on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only
91 the fourth function of each device.
92 .TP
93 .B -d [<vendor>]:[<device>]
94 Show only devices with specified vendor and device ID. Both ID's are given in
95 hexadecimal and may be omitted or given as "*", both meaning "any value".
96 .TP
97 .B -i <file>
98 Use
99 .B
100 <file>
101 as the PCI ID list instead of @IDSDIR@/pci.ids.
102 .TP
103 .B -m
104 Dump PCI device data in machine readable form (both normal and verbose format supported)
105 for easy parsing by scripts. Please don't use any other formats for this purpose, they
106 are likely to change in the future versions of lspci.
107 .TP
108 .B -D
109 Always show PCI domain numbers. By default, lspci suppresses them on machines which
110 have only domain 0.
111 .TP
112 .B -M
113 Invoke bus mapping mode which performs a thorough scan of all PCI devices, including
114 those behind misconfigured bridges etc. This option is available only to root and it
115 gives meaningful results only if combined with direct hardware access mode (otherwise
116 the results are identical to normal listing modes, modulo bugs in lspci). Please note
117 that the bus mapper doesn't support PCI domains and scans only domain 0.
118 .TP
119 .B --version
120 Shows
121 .I lspci
122 version. This option should be used stand-alone.
123
124 .SH PCILIB AND ITS OPTIONS
125 The PCI utilities use PCILIB (a portable library providing platform-independent
126 functions for PCI configuration space access) to talk to the PCI cards. It supports
127 the following access methods:
128
129 .TP
130 .B linux_sysfs
131 The
132 .B /sys
133 filesystem on Linux 2.6 and newer. The standard header of the config space is available
134 to all users, the rest only to root. Supports extended configuration space and PCI domains.
135 .TP
136 .B linux_proc
137 The
138 .B /proc/bus/pci
139 interface supported by Linux 2.1 and newer. The standard header of the config space is available
140 to all users, the rest only to root.
141 .TP
142 .B intel_conf1
143 Direct hardware access via Intel configuration mechanism 1. Available on i386 and compatibles
144 on Linux, Solaris/x86, GNU Hurd and Windows. Requires root privileges.
145 .TP
146 .B intel_conf2
147 Direct hardware access via Intel configuration mechanism 2. Available on i386 and compatibles
148 on Linux, Solaris/x86 and GNU Hurd. Requires root privileges. Warning: This method
149 is able to address only first 16 devices on any bus and it seems to be very
150 unreliable in many cases.
151 .TP
152 .B fbsd_device
153 The
154 .B /dev/pci
155 device on FreeBSD. Requires root privileges.
156 .TP
157 .B aix_device
158 Access method used on AIX. Requires root privileges.
159 .TP
160 .B nbsd_libpci
161 The
162 .B /dev/pci0
163 device on NetBSD accessed using the local libpci library.
164
165 .P
166 By default, PCILIB uses the first available access method and displays no debugging
167 messages, but you can use the following switches to control its behavior:
168
169 .TP
170 .B -P <dir>
171 Force use of the linux_proc access method, using
172 .B <dir>
173 instead of /proc/bus/pci.
174 .TP
175 .B -H1
176 Use direct hardware access via Intel configuration mechanism 1.
177 .TP
178 .B -H2
179 Use direct hardware access via Intel configuration mechanism 2.
180 .TP
181 .B -F <file>
182 Extract all information from given file containing output of lspci -x. This is very
183 useful for analysis of user-supplied bug reports, because you can display the
184 hardware configuration in any way you want without disturbing the user with
185 requests for more dumps.
186 .TP
187 .B -G
188 Increase debug level of the library.
189
190 .SH FILES
191 .TP
192 .B @IDSDIR@/pci.ids
193 A list of all known PCI ID's (vendors, devices, classes and subclasses). Maintained
194 at http://pciids.sourceforge.net/, use the
195 .B update-pciids
196 utility to download the most recent version.
197 .TP
198 .B @IDSDIR@/pci.ids.gz
199 If lspci is compiled with support for compression, this file is tried before pci.ids.
200 .TP
201 .B /proc/bus/pci
202 An interface to PCI bus configuration space provided by the post-2.1.82 Linux
203 kernels. Contains per-bus subdirectories with per-card config space files and a
204 .I devices
205 file containing a list of all PCI devices.
206
207 .SH SEE ALSO
208 .BR setpci (8),
209 .BR update-pciids (8)
210
211 .SH AUTHOR
212 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.