]>
Commit | Line | Data |
---|---|---|
4284af58 | 1 | .TH setpci 8 "@TODAY@" "@VERSION@" "The PCI Utilities" |
b2c9b373 MM |
2 | .IX setpci |
3 | .SH NAME | |
6ece6bc6 | 4 | setpci \- configure PCI devices |
b2c9b373 MM |
5 | .SH SYNOPSIS |
6 | .B setpci | |
7 | .RB [ options ] | |
8 | .B devices | |
9 | .BR operations ... | |
10 | ||
11 | .SH DESCRIPTION | |
12 | .PP | |
13 | .B setpci | |
727ce158 MM |
14 | is a utility for querying and configuring PCI devices. |
15 | ||
b2c9b373 MM |
16 | All numbers are entered in hexadecimal notation. |
17 | ||
84d437d6 MM |
18 | Root privileges are necessary for almost all operations, excluding reads |
19 | of the standard header of the configuration space on some operating systems. | |
20 | Please see | |
21 | .BR lspci(8) | |
22 | for details on access rights. | |
23 | ||
b2c9b373 | 24 | .SH OPTIONS |
f2bf13dc MM |
25 | |
26 | .SS General options | |
b2c9b373 MM |
27 | .TP |
28 | .B -v | |
29 | Tells | |
30 | .I setpci | |
31 | to be verbose and display detailed information about configuration space accesses. | |
32 | .TP | |
33 | .B -f | |
34 | Tells | |
727ce158 | 35 | .I setpci |
b2c9b373 MM |
36 | not to complain when there's nothing to do (when no devices are selected). |
37 | This option is intended for use in widely-distributed configuration scripts | |
38 | where it's uncertain whether the device in question is present in the machine | |
39 | or not. | |
40 | .TP | |
41 | .B -D | |
5f5b1a7b | 42 | `Demo mode' -- don't write anything to the configuration registers. |
b2c9b373 MM |
43 | It's useful to try |
44 | .B setpci -vD | |
45 | to see what your complex sequence of | |
46 | .B setpci | |
47 | operations does before you actually execute it. | |
89984232 MM |
48 | .TP |
49 | .B --version | |
50 | Shows | |
51 | .I setpci | |
1f7c91cc | 52 | version. This option should be used stand-alone. |
89984232 | 53 | |
f2bf13dc MM |
54 | .SS PCI access options |
55 | .PP | |
56 | The PCI utilities use the PCI library to talk to PCI devices (see | |
57 | \fBpcilib\fP(7) for details). You can use the following options to | |
58 | influence its behavior: | |
59 | .TP | |
60 | .B -A <method> | |
61 | The library supports a variety of methods to access the PCI hardware. | |
62 | By default, it uses the first access method available, but you can use | |
63 | this option to override this decision. See \fB-A help\fP for a list of | |
64 | available methods and their descriptions. | |
65 | .TP | |
66 | .B -O <param>=<value> | |
67 | The behavior of the library is controlled by several named parameters. | |
68 | This option allows to set the value of any of the parameters. Use \fB-O help\fP | |
69 | for a list of known parameters and their default values. | |
70 | .TP | |
71 | .B -H1 | |
72 | Use direct hardware access via Intel configuration mechanism 1. | |
73 | (This is a shorthand for \fB-A intel-conf1\fP.) | |
74 | .TP | |
75 | .B -H2 | |
76 | Use direct hardware access via Intel configuration mechanism 2. | |
77 | (This is a shorthand for \fB-A intel-conf2\fP.) | |
78 | .TP | |
79 | .B -G | |
80 | Increase debug level of the library. | |
81 | ||
b2c9b373 MM |
82 | .SH DEVICE SELECTION |
83 | .PP | |
84 | Before each sequence of operations you need to select which devices you wish that | |
85 | operation to affect. | |
86 | .TP | |
1f7c91cc MM |
87 | .B -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]] |
88 | Show only devices in the specified domain (in case your machine has several host bridges, | |
89 | they can either share a common bus number space or each of them can address a PCI domain | |
90 | of its own; domains are numbered from 0 to ffff), bus (0 to ff), slot (0 to 1f) and function (0 to 7). | |
91 | Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are | |
b2c9b373 | 92 | hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0 |
1f7c91cc MM |
93 | on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only |
94 | the fourth function of each device. | |
b2c9b373 MM |
95 | .TP |
96 | .B -d [<vendor>]:[<device>] | |
97 | Select devices with specified vendor and device ID. Both ID's are given in | |
1f7c91cc | 98 | hexadecimal and may be omitted or given as "*", both meaning "any value". |
b2c9b373 MM |
99 | |
100 | .SH OPERATIONS | |
101 | .PP | |
102 | To query value of a configuration register, just name it (either by typing its name or | |
103 | by typing register address with optional | |
104 | .BR .B , | |
105 | .B .W | |
106 | or | |
107 | .B .L | |
108 | suffix specifying register width as byte, word or longword). | |
109 | .PP | |
110 | To set a register, write | |
111 | .BR reg = values | |
112 | where | |
113 | .B reg | |
b7351143 | 114 | is the same as you would use to query the register and |
b2c9b373 MM |
115 | .B values |
116 | is a comma-separated list of values you want to write starting with the given | |
b7351143 MM |
117 | address. Each value to be written can be specified either as a hexadecimal number |
118 | or as a | |
119 | .BR bits : mask | |
120 | pair which causes the bits corresponding to binary ones in the | |
121 | .B mask | |
122 | to be changed to values of the corresponding bits in the | |
123 | .B bits | |
124 | . | |
b2c9b373 MM |
125 | |
126 | .SH REGISTER NAMES | |
127 | .PP | |
128 | .B setpci | |
84d437d6 | 129 | knows the following configuration register names. See PCI bus specifications for their precise |
b2c9b373 | 130 | meaning or consult |
84d437d6 MM |
131 | .B header.h |
132 | or | |
b2c9b373 | 133 | .B /usr/include/linux/pci.h |
84d437d6 | 134 | for a couple of comments. |
b2c9b373 MM |
135 | .PP |
136 | .nf | |
137 | VENDOR_ID | |
138 | DEVICE_ID | |
139 | COMMAND | |
140 | STATUS | |
141 | REVISION | |
142 | CLASS_PROG | |
143 | CLASS_DEVICE | |
144 | CACHE_LINE_SIZE | |
145 | LATENCY_TIMER | |
146 | HEADER_TYPE | |
147 | BIST | |
148 | BASE_ADDRESS_0 | |
149 | BASE_ADDRESS_1 | |
150 | BASE_ADDRESS_2 | |
151 | BASE_ADDRESS_3 | |
152 | BASE_ADDRESS_4 | |
153 | BASE_ADDRESS_5 | |
154 | CARDBUS_CIS | |
155 | SUBSYSTEM_VENDOR_ID | |
156 | SUBSYSTEM_ID | |
157 | ROM_ADDRESS | |
158 | INTERRUPT_LINE | |
159 | INTERRUPT_PIN | |
160 | MIN_GNT | |
161 | MAX_LAT | |
162 | PRIMARY_BUS | |
163 | SECONDARY_BUS | |
164 | SUBORDINATE_BUS | |
165 | SEC_LATENCY_TIMER | |
166 | IO_BASE | |
167 | IO_LIMIT | |
168 | SEC_STATUS | |
169 | MEMORY_BASE | |
170 | MEMORY_LIMIT | |
171 | PREF_MEMORY_BASE | |
172 | PREF_MEMORY_LIMIT | |
173 | PREF_BASE_UPPER32 | |
174 | PREF_LIMIT_UPPER32 | |
175 | IO_BASE_UPPER16 | |
176 | IO_LIMIT_UPPER16 | |
177 | BRIDGE_ROM_ADDRESS | |
178 | BRIDGE_CONTROL | |
179 | CB_CARDBUS_BASE | |
180 | CB_CAPABILITIES | |
181 | CB_SEC_STATUS | |
182 | CB_BUS_NUMBER | |
183 | CB_CARDBUS_NUMBER | |
184 | CB_SUBORDINATE_BUS | |
185 | CB_CARDBUS_LATENCY | |
186 | CB_MEMORY_BASE_0 | |
187 | CB_MEMORY_LIMIT_0 | |
188 | CB_MEMORY_BASE_1 | |
189 | CB_MEMORY_LIMIT_1 | |
190 | CB_IO_BASE_0 | |
191 | CB_IO_BASE_0_HI | |
192 | CB_IO_LIMIT_0 | |
193 | CB_IO_LIMIT_0_HI | |
194 | CB_IO_BASE_1 | |
195 | CB_IO_BASE_1_HI | |
196 | CB_IO_LIMIT_1 | |
197 | CB_IO_LIMIT_1_HI | |
198 | CB_SUBSYSTEM_VENDOR_ID | |
199 | CB_SUBSYSTEM_ID | |
200 | CB_LEGACY_MODE_BASE | |
201 | ||
727ce158 | 202 | .SH SEE ALSO |
f2bf13dc MM |
203 | .BR lspci (8), |
204 | .BR pcilib (7) | |
727ce158 | 205 | |
b2c9b373 | 206 | .SH AUTHOR |
4284af58 | 207 | The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>. |