1setpci(8)                      The PCI Utilities                     setpci(8)
2
3
4

NAME

6       setpci - configure PCI devices
7

SYNOPSIS

9       setpci [options] devices operations...
10
11

DESCRIPTION

13       setpci is a utility for querying and configuring PCI devices.
14
15       All numbers are entered in hexadecimal notation.
16
17       Root  privileges  are  necessary  for  almost all operations, excluding
18       reads of the standard header of the configuration space on some operat‐
19       ing systems.  Please see lspci(8) for details on access rights.
20
21

OPTIONS

23       -v     Tells  setpci  to  be  verbose  and display detailed information
24              about configuration space accesses.
25
26       -f     Tells setpci not to complain when there's nothing to do (when no
27              devices  are  selected).   This  option  is  intended for use in
28              widely-distributed configuration scripts  where  it's  uncertain
29              whether the device in question is present in the machine or not.
30
31       -D     `Demo  mode' -- don't write anything to the configuration regis‐
32              ters.  It's useful to try setpci -vD to see  what  your  complex
33              sequence  of  setpci operations does before you actually execute
34              it.
35
36       --version
37              Shows setpci version. This option should be used stand-alone.
38
39

DEVICE SELECTION

41       Before each sequence of operations you need to select which devices you
42       wish that operation to affect.
43
44       -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
45              Show  only devices in the specified domain (in case your machine
46              has several host bridges, they can either  share  a  common  bus
47              number  space  or  each  of them can address a PCI domain of its
48              own; domains are numbered from 0 to ffff), bus (0 to  ff),  slot
49              (0  to  1f) and function (0 to 7).  Each component of the device
50              address can be omitted or set to "*", both meaning "any  value".
51              All  numbers  are  hexadecimal.  E.g., "0:" means all devices on
52              bus 0, "0" means all functions of device 0  on  any  bus,  "0.3"
53              selects  third  function of device 0 on all buses and ".4" shows
54              only the fourth function of each device.
55
56       -d [<vendor>]:[<device>]
57              Select devices with specified vendor and device  ID.  Both  ID's
58              are  given  in  hexadecimal  and may be omitted or given as "*",
59              both meaning "any value".
60
61

OPERATIONS

63       To query value of a configuration register, just  name  it  (either  by
64       typing  its  name or by typing register address with optional .B, .W or
65       .L suffix specifying register width as byte, word or longword).
66
67       To set a register, write reg=values where reg is the same as you  would
68       use  to query the register and values is a comma-separated list of val‐
69       ues you want to write starting with the given address. Each value to be
70       written  can  be  specified  either  as  a  hexadecimal  number or as a
71       bits:mask pair which causes the bits corresponding to  binary  ones  in
72       the mask to be changed to values of the corresponding bits in the bits
73
74

REGISTER NAMES

76       setpci  knows  the  following configuration register names. See PCI bus
77       specifications  for  their  precise  meaning  or  consult  header.h  or
78       /usr/include/linux/pci.h for a couple of comments.
79
80       VENDOR_ID
81       DEVICE_ID
82       COMMAND
83       STATUS
84       REVISION
85       CLASS_PROG
86       CLASS_DEVICE
87       CACHE_LINE_SIZE
88       LATENCY_TIMER
89       HEADER_TYPE
90       BIST
91       BASE_ADDRESS_0
92       BASE_ADDRESS_1
93       BASE_ADDRESS_2
94       BASE_ADDRESS_3
95       BASE_ADDRESS_4
96       BASE_ADDRESS_5
97       CARDBUS_CIS
98       SUBSYSTEM_VENDOR_ID
99       SUBSYSTEM_ID
100       ROM_ADDRESS
101       INTERRUPT_LINE
102       INTERRUPT_PIN
103       MIN_GNT
104       MAX_LAT
105       PRIMARY_BUS
106       SECONDARY_BUS
107       SUBORDINATE_BUS
108       SEC_LATENCY_TIMER
109       IO_BASE
110       IO_LIMIT
111       SEC_STATUS
112       MEMORY_BASE
113       MEMORY_LIMIT
114       PREF_MEMORY_BASE
115       PREF_MEMORY_LIMIT
116       PREF_BASE_UPPER32
117       PREF_LIMIT_UPPER32
118       IO_BASE_UPPER16
119       IO_LIMIT_UPPER16
120       BRIDGE_ROM_ADDRESS
121       BRIDGE_CONTROL
122       CB_CARDBUS_BASE
123       CB_CAPABILITIES
124       CB_SEC_STATUS
125       CB_BUS_NUMBER
126       CB_CARDBUS_NUMBER
127       CB_SUBORDINATE_BUS
128       CB_CARDBUS_LATENCY
129       CB_MEMORY_BASE_0
130       CB_MEMORY_LIMIT_0
131       CB_MEMORY_BASE_1
132       CB_MEMORY_LIMIT_1
133       CB_IO_BASE_0
134       CB_IO_BASE_0_HI
135       CB_IO_LIMIT_0
136       CB_IO_LIMIT_0_HI
137       CB_IO_BASE_1
138       CB_IO_BASE_1_HI
139       CB_IO_LIMIT_1
140       CB_IO_LIMIT_1_HI
141       CB_SUBSYSTEM_VENDOR_ID
142       CB_SUBSYSTEM_ID
143       CB_LEGACY_MODE_BASE
144
145

PCILIB OPTIONS

147       The  PCI  utilities  use PCILIB (a portable library providing platform-
148       independent functions for PCI configuration space access)  to  talk  to
149       the  PCI  cards. Please see lspci(8) for a list of switches controlling
150       behavior of the library.
151
152

EXAMPLES

154       `setpci -d *:* latency_timer=40' sets the latency timer to 64 (40 hexa‐
155       decimal).
156
157       `setpci  -s  0  device_id vendor_id' lists ID's of devices in slot 0 in
158       all buses.
159
160       `setpci -s 12:3.4 3c.l=1,2,3' writes longword 1 to register  3c,  2  to
161       register  3d and 3 to register 3e of device at bus 12, slot 3, function
162       4.
163
164       `setpci -s 13:8.4 40.b=50:d0,04:0c,ff' works on bus 13, device 8, func‐
165       tion  4:  turns  bit 7 off and bits 6 and 4 on in the byte register 40;
166       turns bit 3 off and bit 2 on in the byte register 41; sets byte  regis‐
167       ter 42 to ff.
168
169

SEE ALSO

171       lspci(8)
172
173

AUTHOR

175       The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
176
177
178
179pciutils-2.2.4                 09 September 2006                     setpci(8)
Impressum