1 .TH setpci 8 "@TODAY@" "@VERSION@" "The PCI Utilities"
4 setpci \- configure PCI devices
14 is a utility for querying and configuring PCI devices.
16 All numbers are entered in hexadecimal notation.
18 Root privileges are necessary for almost all operations, excluding reads
19 of the standard header of the configuration space on some operating systems.
22 for details on access rights.
29 to be verbose and display detailed information about configuration space accesses.
34 not to complain when there's nothing to do (when no devices are selected).
35 This option is intended for use in widely-distributed configuration scripts
36 where it's uncertain whether the device in question is present in the machine
40 `Demo mode' -- don't write anything to the configuration registers.
43 to see what your complex sequence of
45 operations does before you actually execute it.
50 version. This option should be used stand-alone.
54 Before each sequence of operations you need to select which devices you wish that
57 .B -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
58 Show only devices in the specified domain (in case your machine has several host bridges,
59 they can either share a common bus number space or each of them can address a PCI domain
60 of its own; domains are numbered from 0 to ffff), bus (0 to ff), slot (0 to 1f) and function (0 to 7).
61 Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are
62 hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
63 on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only
64 the fourth function of each device.
66 .B -d [<vendor>]:[<device>]
67 Select devices with specified vendor and device ID. Both ID's are given in
68 hexadecimal and may be omitted or given as "*", both meaning "any value".
72 To query value of a configuration register, just name it (either by typing its name or
73 by typing register address with optional
78 suffix specifying register width as byte, word or longword).
80 To set a register, write
84 is the same as you would use to query the register and
86 is a comma-separated list of values you want to write starting with the given
87 address. Each value to be written can be specified either as a hexadecimal number
90 pair which causes the bits corresponding to binary ones in the
92 to be changed to values of the corresponding bits in the
99 knows the following configuration register names. See PCI bus specifications for their precise
103 .B /usr/include/linux/pci.h
104 for a couple of comments.
168 CB_SUBSYSTEM_VENDOR_ID
173 The PCI utilities use PCILIB (a portable library providing platform-independent
174 functions for PCI configuration space access) to talk to the PCI cards. Please
177 for a list of switches controlling behavior of the library.
181 `setpci -d *:* latency_timer=40' sets the latency timer to 64 (40 hexadecimal).
183 `setpci -s 0 device_id vendor_id' lists ID's of devices in slot 0 in all buses.
185 `setpci -s 12:3.4 3c.l=1,2,3' writes longword 1 to register 3c, 2 to register 3d
186 and 3 to register 3e of device at bus 12, slot 3, function 4.
188 `setpci -s 13:8.4 40.b=50:d0,04:0c,ff' works on bus 13, device 8, function
189 4: turns bit 7 off and bits 6 and 4 on in the byte register 40; turns
190 bit 3 off and bit 2 on in the byte register 41; sets byte register
197 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.