1 .TH setpci 8 "@TODAY@" "@VERSION@" "Linux 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.
23 to be verbose and display detailed information about configuration space accesses.
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
34 `Demo mode' -- don't write anything to the configuration registers.
37 to see what your complex sequence of
39 operations does before you actually execute it.
44 version. This option should be used standalone.
49 Before each sequence of operations you need to select which devices you wish that
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.
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".
65 To query value of a configuration register, just name it (either by typing its name or
66 by typing register address with optional
71 suffix specifying register width as byte, word or longword).
73 To set a register, write
77 is the same as you would use to query the register and
79 is a comma-separated list of values you want to write starting with the given
80 address. Each value to be written can be specified either as a hexadecimal number
83 pair which causes the bits corresponding to binary ones in the
85 to be changed to values of the corresponding bits in the
92 knows the following configuration register names. See PCI bus specs for their precise
94 .B /usr/include/linux/pci.h
159 CB_SUBSYSTEM_VENDOR_ID
164 The PCI utilities use PCILIB (a portable library providing platform-independent
165 functions for PCI configuration space access) to talk to the PCI cards. The following
166 options control parameters of the library, especially what access method it uses.
167 By default, PCILIB uses the first available access method and displays no debugging
168 messages. Each switch is accompanied by a list of hardware/software configurations
173 Force use of Linux /proc/bus/pci style configuration access, using
175 instead of /proc/bus/pci. (Linux 2.1 or newer only)
178 Use direct hardware access via Intel configuration mechanism 1. (i386 and compatible only)
181 Use direct hardware access via Intel configuration mechanism 2. Warning: This method
182 is able to address only first 16 devices on any bus and it seems to be very
183 unrealiable in many cases. (i386 and compatible only)
186 Use PCI access syscalls. (Linux on Alpha and UltraSparc only)
189 Extract all information from given file containing output of lspci -x. This is very
190 useful for analysis of user-supplied bug reports, because you can display the
191 hardware configuration in any way you want without disturbing the user with
192 requests for more dumps. (All systems)
195 Increase debug level of the library. (All systems)
199 `setpci -d *:* latency_timer=40' sets the latency timer to 64 (40 hexadecimal).
201 `setpci -s 0 device_id vendor_id' lists ID's of devices in slot 0 in all busses.
203 `setpci -s 12:3.4 3c.l=1,2,3' writes longword 1 to register 3c, 2 to register 3d
204 and 3 to register 3e of device at bus 12, slot 3, function 4.
206 `setpci -s 13:8.4 40.b=50:d0,04:0c,ff' works on bus 13, device 8, function
207 4: turns bit 7 off and bits 6 and 4 on in the byte register 40; turns
208 bit 3 off and bit 2 on in the byte register 41; sets byte register
215 The Linux PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.