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.
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 stand-alone.
49 Before each sequence of operations you need to select which devices you wish that
52 .B -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
53 Show only devices in the specified domain (in case your machine has several host bridges,
54 they can either share a common bus number space or each of them can address a PCI domain
55 of its own; domains are numbered from 0 to ffff), bus (0 to ff), slot (0 to 1f) and function (0 to 7).
56 Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are
57 hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
58 on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only
59 the fourth function of each device.
61 .B -d [<vendor>]:[<device>]
62 Select devices with specified vendor and device ID. Both ID's are given in
63 hexadecimal and may be omitted or given as "*", both meaning "any value".
67 To query value of a configuration register, just name it (either by typing its name or
68 by typing register address with optional
73 suffix specifying register width as byte, word or longword).
75 To set a register, write
79 is the same as you would use to query the register and
81 is a comma-separated list of values you want to write starting with the given
82 address. Each value to be written can be specified either as a hexadecimal number
85 pair which causes the bits corresponding to binary ones in the
87 to be changed to values of the corresponding bits in the
94 knows the following configuration register names. See PCI bus specs for their precise
96 .B /usr/include/linux/pci.h
161 CB_SUBSYSTEM_VENDOR_ID
166 The PCI utilities use PCILIB (a portable library providing platform-independent
167 functions for PCI configuration space access) to talk to the PCI cards. The following
168 options control parameters of the library, especially what access method it uses.
169 By default, PCILIB uses the first available access method and displays no debugging
170 messages. Each switch is accompanied by a list of hardware/software configurations
175 Force use of Linux /proc/bus/pci style configuration access, using
177 instead of /proc/bus/pci. (Linux 2.1 or newer only)
180 Use direct hardware access via Intel configuration mechanism 1. (i386 and compatible only)
183 Use direct hardware access via Intel configuration mechanism 2. Warning: This method
184 is able to address only first 16 devices on any bus and it seems to be very
185 unreliable in many cases. (i386 and compatible only)
188 Extract all information from given file containing output of lspci -x. This is very
189 useful for analysis of user-supplied bug reports, because you can display the
190 hardware configuration in any way you want without disturbing the user with
191 requests for more dumps. (All systems)
194 Increase debug level of the library. (All systems)
198 `setpci -d *:* latency_timer=40' sets the latency timer to 64 (40 hexadecimal).
200 `setpci -s 0 device_id vendor_id' lists ID's of devices in slot 0 in all busses.
202 `setpci -s 12:3.4 3c.l=1,2,3' writes longword 1 to register 3c, 2 to register 3d
203 and 3 to register 3e of device at bus 12, slot 3, function 4.
205 `setpci -s 13:8.4 40.b=50:d0,04:0c,ff' works on bus 13, device 8, function
206 4: turns bit 7 off and bits 6 and 4 on in the byte register 40; turns
207 bit 3 off and bit 2 on in the byte register 41; sets byte register
214 The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.