Initialize Tizen 2.3
[framework/system/pciutils.git] / setpci.man
1 .TH setpci 8 "@TODAY@" "@VERSION@" "The 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 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
24 .SH OPTIONS
25
26 .SS General options
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
35 .I setpci
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
42 `Demo mode' -- don't write anything to the configuration registers.
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.
48 .TP
49 .B --version
50 Shows
51 .I setpci
52 version. This option should be used stand-alone.
53
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
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
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
92 hexadecimal.  E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
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.
95 .TP
96 .B -d [<vendor>]:[<device>]
97 Select devices with specified vendor and device ID. Both ID's are given in
98 hexadecimal and may be omitted or given as "*", both meaning "any value".
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
114 is the same as you would use to query the register and
115 .B values
116 is a comma-separated list of values you want to write starting with the given
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 .
125
126 .SH REGISTER NAMES
127 .PP
128 .B setpci
129 knows the following configuration register names. See PCI bus specifications for their precise
130 meaning or consult
131 .B header.h
132 or
133 .B /usr/include/linux/pci.h
134 for a couple of comments.
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
202 .SH SEE ALSO
203 .BR lspci (8),
204 .BR pcilib (7)
205
206 .SH AUTHOR
207 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.