]> git.ipfire.org Git - thirdparty/pciutils.git/blame - setpci.8
Updated spec file from Krzysztof G. Baranowski.
[thirdparty/pciutils.git] / setpci.8
CommitLineData
d38471fd 1.TH setpci 8 "22 November 1998" "pciutils-1.09" "Linux PCI Utilities"
b2c9b373
MM
2.IX setpci
3.SH NAME
4lspci \- 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
14is a utility for querying and configuring PCI devices. It requires Linux kernel 2.1.82
15or newer as it uses the /proc/bus/pci interface.
16.PP
17All numbers are entered in hexadecimal notation.
18
19.SH OPTIONS
20.TP
21.B -v
22Tells
23.I setpci
24to be verbose and display detailed information about configuration space accesses.
25.TP
26.B -f
27Tells
28.I lspci
29not to complain when there's nothing to do (when no devices are selected).
30This option is intended for use in widely-distributed configuration scripts
31where it's uncertain whether the device in question is present in the machine
32or not.
33.TP
34.B -D
35`Demo mode' -- simulate configuration space accesses instead of really doing them.
36It's useful to try
37.B setpci -vD
38to see what your complex sequence of
39.B setpci
40operations does before you actually execute it.
41
42.SH DEVICE SELECTION
43.PP
44Before each sequence of operations you need to select which devices you wish that
45operation to affect.
46.TP
47.B -s [[<bus>]:][<slot>][.[<func>]]
48Select devices in specified bus, slot and function. Each component of the device
49address can be omitted or set as "*" meaning "any value". All numbers are
50hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0
51on any bus, "0.3" selects third function of device 0 on all busses and ".4" selects only
52fourth function of each device.
53.TP
54.B -d [<vendor>]:[<device>]
55Select devices with specified vendor and device ID. Both ID's are given in
56hexadecimal and may be omitted or given as "*" meaning "any value".
57
58.SH OPERATIONS
59.PP
60To query value of a configuration register, just name it (either by typing its name or
61by typing register address with optional
62.BR .B ,
63.B .W
64or
65.B .L
66suffix specifying register width as byte, word or longword).
67.PP
68To set a register, write
69.BR reg = values
70where
71.B reg
72is the same you would use to query the register and
73.B values
74is a comma-separated list of values you want to write starting with the given
75address.
76
77.SH REGISTER NAMES
78.PP
79.B setpci
80knows the following configuration register names. See PCI bus specs for their precise
81meaning or consult
82.B /usr/include/linux/pci.h
83for few comments.
84.PP
85.nf
86VENDOR_ID
87DEVICE_ID
88COMMAND
89STATUS
90REVISION
91CLASS_PROG
92CLASS_DEVICE
93CACHE_LINE_SIZE
94LATENCY_TIMER
95HEADER_TYPE
96BIST
97BASE_ADDRESS_0
98BASE_ADDRESS_1
99BASE_ADDRESS_2
100BASE_ADDRESS_3
101BASE_ADDRESS_4
102BASE_ADDRESS_5
103CARDBUS_CIS
104SUBSYSTEM_VENDOR_ID
105SUBSYSTEM_ID
106ROM_ADDRESS
107INTERRUPT_LINE
108INTERRUPT_PIN
109MIN_GNT
110MAX_LAT
111PRIMARY_BUS
112SECONDARY_BUS
113SUBORDINATE_BUS
114SEC_LATENCY_TIMER
115IO_BASE
116IO_LIMIT
117SEC_STATUS
118MEMORY_BASE
119MEMORY_LIMIT
120PREF_MEMORY_BASE
121PREF_MEMORY_LIMIT
122PREF_BASE_UPPER32
123PREF_LIMIT_UPPER32
124IO_BASE_UPPER16
125IO_LIMIT_UPPER16
126BRIDGE_ROM_ADDRESS
127BRIDGE_CONTROL
128CB_CARDBUS_BASE
129CB_CAPABILITIES
130CB_SEC_STATUS
131CB_BUS_NUMBER
132CB_CARDBUS_NUMBER
133CB_SUBORDINATE_BUS
134CB_CARDBUS_LATENCY
135CB_MEMORY_BASE_0
136CB_MEMORY_LIMIT_0
137CB_MEMORY_BASE_1
138CB_MEMORY_LIMIT_1
139CB_IO_BASE_0
140CB_IO_BASE_0_HI
141CB_IO_LIMIT_0
142CB_IO_LIMIT_0_HI
143CB_IO_BASE_1
144CB_IO_BASE_1_HI
145CB_IO_LIMIT_1
146CB_IO_LIMIT_1_HI
147CB_SUBSYSTEM_VENDOR_ID
148CB_SUBSYSTEM_ID
149CB_LEGACY_MODE_BASE
150
151.SH EXAMPLES
152.PP
153`setpci -d *:* latency_timer=40' sets the latency timer to 64 (40 hexadecimal).
154.PP
155`setpci -s 0 device_id vendor_id' lists ID's of devices in slot 0 in all busses.
156.PP
157`setpci -s 12:3.4 34.l=1,2,3' writes longword 1 to register 34, 2 to register 35
158and 3 to register 35 of device at bus 12, slot 3, function 4.
159
160.SH AUTHOR
161The Linux PCI Utilities are maintained by Martin Mares <mj@atrey.karlin.mff.cuni.cz>.