OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / pciutils / original / man8 / setpci.8
1 .TH setpci 8 "04 January 2003" "pciutils-2.1.11" "Linux PCI Utilities"
2 .IX setpci
3 .SH NAME
4 setpci \- configure PCI devices
5 .SH SYNOPSIS
6 .B setpci
7 .RB [ options ]
8 .B devices
9 .BR operations ...
10
11 .SH DESCRIPTION
12 .PP
13 .B setpci
14 is a utility for querying and configuring PCI devices.
15
16 All numbers are entered in hexadecimal notation.
17
18 .SH OPTIONS
19 .TP
20 .B -v
21 Tells
22 .I setpci
23 to be verbose and display detailed information about configuration space accesses.
24 .TP
25 .B -f
26 Tells
27 .I setpci
28 not to complain when there's nothing to do (when no devices are selected).
29 This option is intended for use in widely-distributed configuration scripts
30 where it's uncertain whether the device in question is present in the machine
31 or not.
32 .TP
33 .B -D
34 `Demo mode' -- simulate configuration space accesses instead of really doing them.
35 It's useful to try
36 .B setpci -vD
37 to see what your complex sequence of
38 .B setpci
39 operations does before you actually execute it.
40 .TP
41 .B --version
42 Shows
43 .I setpci
44 version. This option should be used standalone.
45
46
47 .SH DEVICE SELECTION
48 .PP
49 Before each sequence of operations you need to select which devices you wish that
50 operation to affect.
51 .TP
52 .B -s [[<bus>]:][<slot>][.[<func>]]
53 Select devices in specified bus, slot and function. Each component of the device
54 address can be omitted or set as "*" meaning "any value". All numbers are
55 hexadecimal.  E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
56 on any bus, "0.3" selects third function of device 0 on all busses and ".4" selects only
57 fourth function of each device.
58 .TP
59 .B -d [<vendor>]:[<device>]
60 Select devices with specified vendor and device ID. Both ID's are given in
61 hexadecimal and may be omitted or given as "*" meaning "any value".
62
63 .SH OPERATIONS
64 .PP
65 To query value of a configuration register, just name it (either by typing its name or
66 by typing register address with optional
67 .BR .B ,
68 .B .W
69 or
70 .B .L
71 suffix specifying register width as byte, word or longword).
72 .PP
73 To set a register, write
74 .BR reg = values
75 where
76 .B reg
77 is the same you would use to query the register and
78 .B values
79 is a comma-separated list of values you want to write starting with the given
80 address.
81
82 .SH REGISTER NAMES
83 .PP
84 .B setpci
85 knows the following configuration register names. See PCI bus specs for their precise
86 meaning or consult
87 .B /usr/include/linux/pci.h
88 for few comments.
89 .PP
90 .nf
91 VENDOR_ID
92 DEVICE_ID
93 COMMAND
94 STATUS
95 REVISION
96 CLASS_PROG
97 CLASS_DEVICE
98 CACHE_LINE_SIZE
99 LATENCY_TIMER
100 HEADER_TYPE
101 BIST
102 BASE_ADDRESS_0
103 BASE_ADDRESS_1
104 BASE_ADDRESS_2
105 BASE_ADDRESS_3
106 BASE_ADDRESS_4
107 BASE_ADDRESS_5
108 CARDBUS_CIS
109 SUBSYSTEM_VENDOR_ID
110 SUBSYSTEM_ID
111 ROM_ADDRESS
112 INTERRUPT_LINE
113 INTERRUPT_PIN
114 MIN_GNT
115 MAX_LAT
116 PRIMARY_BUS
117 SECONDARY_BUS
118 SUBORDINATE_BUS
119 SEC_LATENCY_TIMER
120 IO_BASE
121 IO_LIMIT
122 SEC_STATUS
123 MEMORY_BASE
124 MEMORY_LIMIT
125 PREF_MEMORY_BASE
126 PREF_MEMORY_LIMIT
127 PREF_BASE_UPPER32
128 PREF_LIMIT_UPPER32
129 IO_BASE_UPPER16
130 IO_LIMIT_UPPER16
131 BRIDGE_ROM_ADDRESS
132 BRIDGE_CONTROL
133 CB_CARDBUS_BASE
134 CB_CAPABILITIES
135 CB_SEC_STATUS
136 CB_BUS_NUMBER
137 CB_CARDBUS_NUMBER
138 CB_SUBORDINATE_BUS
139 CB_CARDBUS_LATENCY
140 CB_MEMORY_BASE_0
141 CB_MEMORY_LIMIT_0
142 CB_MEMORY_BASE_1
143 CB_MEMORY_LIMIT_1
144 CB_IO_BASE_0
145 CB_IO_BASE_0_HI
146 CB_IO_LIMIT_0
147 CB_IO_LIMIT_0_HI
148 CB_IO_BASE_1
149 CB_IO_BASE_1_HI
150 CB_IO_LIMIT_1
151 CB_IO_LIMIT_1_HI
152 CB_SUBSYSTEM_VENDOR_ID
153 CB_SUBSYSTEM_ID
154 CB_LEGACY_MODE_BASE
155
156 .SH PCILIB OPTIONS
157 The PCI utilities use PCILIB (a portable library providing platform-independent
158 functions for PCI configuration space access) to talk to the PCI cards. The following
159 options control parameters of the library, especially what access method it uses.
160 By default, PCILIB uses the first available access method and displays no debugging
161 messages. Each switch is accompanied by a list of hardware/software configurations
162 it's supported in.
163
164 .TP
165 .B -P <dir>
166 Force use of Linux /proc/bus/pci style configuration access, using
167 .B <dir>
168 instead of /proc/bus/pci. (Linux 2.1 or newer only)
169 .TP
170 .B -H1
171 Use direct hardware access via Intel configuration mechanism 1. (i386 and compatible only)
172 .TP
173 .B -H2
174 Use direct hardware access via Intel configuration mechanism 2. Warning: This method
175 is able to address only first 16 devices on any bus and it seems to be very
176 unrealiable in many cases. (i386 and compatible only)
177 .TP
178 .B -S
179 Use PCI access syscalls. (Linux on Alpha and UltraSparc only)
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. (All systems)
186 .TP
187 .B -G
188 Increase debug level of the library. (All systems)
189
190 .SH EXAMPLES
191 .PP
192 `setpci -d *:* latency_timer=40' sets the latency timer to 64 (40 hexadecimal).
193 .PP
194 `setpci -s 0 device_id vendor_id' lists ID's of devices in slot 0 in all busses.
195 .PP
196 `setpci -s 12:3.4 3c.l=1,2,3' writes longword 1 to register 3c, 2 to register 3d
197 and 3 to register 3e of device at bus 12, slot 3, function 4.
198
199 .SH SEE ALSO
200 .BR lspci (8)
201
202 .SH AUTHOR
203 The Linux PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.