version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
setpci |
|
|
2 |
!!!setpci |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
DEVICE SELECTION |
|
|
8 |
OPERATIONS |
|
|
9 |
REGISTER NAMES |
|
|
10 |
PCILIB OPTIONS |
|
|
11 |
EXAMPLES |
|
|
12 |
SEE ALSO |
|
|
13 |
AUTHOR |
|
|
14 |
---- |
|
|
15 |
!!NAME |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
setpci - configure PCI devices |
|
|
19 |
!!SYNOPSIS |
|
|
20 |
|
|
|
21 |
|
|
|
22 |
__setpci__ [[__options__] __devices |
|
|
23 |
operations__... |
|
|
24 |
!!DESCRIPTION |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
__setpci__ is a utility for querying and configuring PCI |
|
|
28 |
devices. |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
To make use of all the features of this program, you need to |
|
|
32 |
have Linux kernel 2.1.82 or newer which supports the |
|
|
33 |
/proc/bus/pci interface. With older kernels, the PCI |
|
|
34 |
utilities have to use direct hardware access which is |
|
|
35 |
available only to root and it suffers from numerous race |
|
|
36 |
conditions and other problems. |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
All numbers are entered in hexadecimal |
|
|
40 |
notation. |
|
|
41 |
!!OPTIONS |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
__-v__ |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
Tells ''setpci'' to be verbose and display detailed |
|
|
48 |
information about configuration space accesses. |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
__-f__ |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
Tells ''setpci'' not to complain when there's nothing to |
|
|
55 |
do (when no devices are selected). This option is intended |
|
|
56 |
for use in widely-distributed configuration scripts where |
|
|
57 |
it's uncertain whether the device in question is present in |
|
|
58 |
the machine or not. |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
__-D__ |
|
|
62 |
|
|
|
63 |
|
|
|
64 |
`Demo mode' -- simulate configuration space accesses instead |
|
|
65 |
of really doing them. It's useful to try __setpci -vD__ |
|
|
66 |
to see what your complex sequence of __setpci__ |
|
|
67 |
operations does before you actually execute it. |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
__--version__ |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
Shows ''setpci'' version. This option should be used |
|
|
74 |
standalone. |
|
|
75 |
!!DEVICE SELECTION |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
Before each sequence of operations you need to select which |
|
|
79 |
devices you wish that operation to affect. |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
__-s |
|
|
83 |
[[[[__ |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
Select devices in specified bus, slot and function. Each |
|
|
87 |
component of the device address can be omitted or set as |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
__-d [[__ |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
Select devices with specified vendor and device ID. Both |
|
|
94 |
ID's are given in hexadecimal and may be omitted or given as |
|
|
95 |
!!OPERATIONS |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
To query value of a configuration register, just name it |
|
|
99 |
(either by typing its name or by typing register address |
|
|
100 |
with optional __.B__, __.W__ or __.L__ suffix |
|
|
101 |
specifying register width as byte, word or |
|
|
102 |
longword). |
|
|
103 |
|
|
|
104 |
|
|
|
105 |
To set a register, write __reg__=__values__ where |
|
|
106 |
__reg__ is the same you would use to query the register |
|
|
107 |
and __values__ is a comma-separated list of values you |
|
|
108 |
want to write starting with the given address. |
|
|
109 |
!!REGISTER NAMES |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
__setpci__ knows the following configuration register |
|
|
113 |
names. See PCI bus specs for their precise meaning or |
|
|
114 |
consult __/usr/include/linux/pci.h__ for few |
|
|
115 |
comments. |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
VENDOR_ID |
|
|
119 |
DEVICE_ID |
|
|
120 |
COMMAND |
|
|
121 |
STATUS |
|
|
122 |
REVISION |
|
|
123 |
CLASS_PROG |
|
|
124 |
CLASS_DEVICE |
|
|
125 |
CACHE_LINE_SIZE |
|
|
126 |
LATENCY_TIMER |
|
|
127 |
HEADER_TYPE |
|
|
128 |
BIST |
|
|
129 |
BASE_ADDRESS_0 |
|
|
130 |
BASE_ADDRESS_1 |
|
|
131 |
BASE_ADDRESS_2 |
|
|
132 |
BASE_ADDRESS_3 |
|
|
133 |
BASE_ADDRESS_4 |
|
|
134 |
BASE_ADDRESS_5 |
|
|
135 |
CARDBUS_CIS |
|
|
136 |
SUBSYSTEM_VENDOR_ID |
|
|
137 |
SUBSYSTEM_ID |
|
|
138 |
ROM_ADDRESS |
|
|
139 |
INTERRUPT_LINE |
|
|
140 |
INTERRUPT_PIN |
|
|
141 |
MIN_GNT |
|
|
142 |
MAX_LAT |
|
|
143 |
PRIMARY_BUS |
|
|
144 |
SECONDARY_BUS |
|
|
145 |
SUBORDINATE_BUS |
|
|
146 |
SEC_LATENCY_TIMER |
|
|
147 |
IO_BASE |
|
|
148 |
IO_LIMIT |
|
|
149 |
SEC_STATUS |
|
|
150 |
MEMORY_BASE |
|
|
151 |
MEMORY_LIMIT |
|
|
152 |
PREF_MEMORY_BASE |
|
|
153 |
PREF_MEMORY_LIMIT |
|
|
154 |
PREF_BASE_UPPER32 |
|
|
155 |
PREF_LIMIT_UPPER32 |
|
|
156 |
IO_BASE_UPPER16 |
|
|
157 |
IO_LIMIT_UPPER16 |
|
|
158 |
BRIDGE_ROM_ADDRESS |
|
|
159 |
BRIDGE_CONTROL |
|
|
160 |
CB_CARDBUS_BASE |
|
|
161 |
CB_CAPABILITIES |
|
|
162 |
CB_SEC_STATUS |
|
|
163 |
CB_BUS_NUMBER |
|
|
164 |
CB_CARDBUS_NUMBER |
|
|
165 |
CB_SUBORDINATE_BUS |
|
|
166 |
CB_CARDBUS_LATENCY |
|
|
167 |
CB_MEMORY_BASE_0 |
|
|
168 |
CB_MEMORY_LIMIT_0 |
|
|
169 |
CB_MEMORY_BASE_1 |
|
|
170 |
CB_MEMORY_LIMIT_1 |
|
|
171 |
CB_IO_BASE_0 |
|
|
172 |
CB_IO_BASE_0_HI |
|
|
173 |
CB_IO_LIMIT_0 |
|
|
174 |
CB_IO_LIMIT_0_HI |
|
|
175 |
CB_IO_BASE_1 |
|
|
176 |
CB_IO_BASE_1_HI |
|
|
177 |
CB_IO_LIMIT_1 |
|
|
178 |
CB_IO_LIMIT_1_HI |
|
|
179 |
CB_SUBSYSTEM_VENDOR_ID |
|
|
180 |
CB_SUBSYSTEM_ID |
|
|
181 |
CB_LEGACY_MODE_BASE |
|
|
182 |
!!PCILIB OPTIONS |
|
|
183 |
|
|
|
184 |
|
|
|
185 |
The PCI utilities use PCILIB (a portable library providing |
|
|
186 |
platform-independent functions for PCI configuration space |
|
|
187 |
access) to talk to the PCI cards. The following options |
|
|
188 |
control parameters of the library, especially what access |
|
|
189 |
method it uses. By default, PCILIB uses the first available |
|
|
190 |
access method and displays no debugging messages. Each |
|
|
191 |
switch is accompanied by a list of hardware/software |
|
|
192 |
configurations it's supported in. |
|
|
193 |
|
|
|
194 |
|
|
|
195 |
__-P __ |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
Use Linux 2.1 style configuration access to directory |
|
|
199 |
____ instead of /proc/bus/pci. (Linux 2.1 or |
|
|
200 |
newer only) |
|
|
201 |
|
|
|
202 |
|
|
|
203 |
__-H1__ |
|
|
204 |
|
|
|
205 |
|
|
|
206 |
Use direct hardware access via Intel configuration mechanism |
|
|
207 |
1. (i386 and compatible only) |
|
|
208 |
|
|
|
209 |
|
|
|
210 |
__-H2__ |
|
|
211 |
|
|
|
212 |
|
|
|
213 |
Use direct hardware access via Intel configuration mechanism |
|
|
214 |
2. Warning: This method is able to address only first 16 |
|
|
215 |
devices on any bus and it seems to be very unrealiable in |
|
|
216 |
many cases. (i386 and compatible only) |
|
|
217 |
|
|
|
218 |
|
|
|
219 |
__-S__ |
|
|
220 |
|
|
|
221 |
|
2 |
perry |
222 |
Use PCI access syscalls. (Linux on Alpha and !UltraSparc |
1 |
perry |
223 |
only) |
|
|
224 |
|
|
|
225 |
|
|
|
226 |
__-F __ |
|
|
227 |
|
|
|
228 |
|
|
|
229 |
Extract all information from given file containing output of |
|
|
230 |
lspci -x. This is very useful for analysis of user-supplied |
|
|
231 |
bug reports, because you can display the hardware |
|
|
232 |
configuration in any way you want without disturbing the |
|
|
233 |
user with requests for more dumps. (All |
|
|
234 |
systems) |
|
|
235 |
|
|
|
236 |
|
|
|
237 |
__-G__ |
|
|
238 |
|
|
|
239 |
|
|
|
240 |
Increase debug level of the library. (All |
|
|
241 |
systems) |
|
|
242 |
!!EXAMPLES |
|
|
243 |
|
|
|
244 |
|
|
|
245 |
`setpci -d *:* latency_timer=40' sets the latency timer to |
|
|
246 |
64 (40 hexadecimal). |
|
|
247 |
|
|
|
248 |
|
|
|
249 |
`setpci -s 0 device_id vendor_id' lists ID's of devices in |
|
|
250 |
slot 0 in all busses. |
|
|
251 |
|
|
|
252 |
|
|
|
253 |
`setpci -s 12:3.4 3c.l=1,2,3' writes longword 1 to register |
|
|
254 |
3c, 2 to register 3d and 3 to register 3e of device at bus |
|
|
255 |
12, slot 3, function 4. |
|
|
256 |
!!SEE ALSO |
|
|
257 |
|
|
|
258 |
|
|
|
259 |
lspci(8) |
|
|
260 |
!!AUTHOR |
|
|
261 |
|
|
|
262 |
|
|
|
263 |
The Linux PCI Utilities are maintained by Martin Mares |
|
|
264 |
---- |