|
1 | | -.\" $NetBSD: pcictl.8,v 1.20 2019/11/30 02:47:14 riastradh Exp $ |
| 1 | +.\" $NetBSD: pcictl.8,v 1.21 2026/01/25 00:59:36 uwe Exp $ |
2 | 2 | .\" |
3 | 3 | .\" Copyright 2001 Wasabi Systems, Inc. |
4 | 4 | .\" All rights reserved. |
|
33 | 33 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
34 | 34 | .\" POSSIBILITY OF SUCH DAMAGE. |
35 | 35 | .\" |
36 | | -.Dd September 23, 2016 |
| 36 | +.Dd January 25, 2026 |
37 | 37 | .Dt PCICTL 8 |
38 | 38 | .Os |
| 39 | +. |
39 | 40 | .Sh NAME |
40 | 41 | .Nm pcictl |
41 | 42 | .Nd a program to manipulate the PCI bus |
| 43 | +. |
42 | 44 | .Sh SYNOPSIS |
43 | 45 | .Nm |
44 | 46 | .Ar pcibus |
45 | 47 | .Ar command |
46 | | -.Oo |
47 | | -.Ar arg Oo ... |
48 | | -.Oc |
49 | | -.Oc |
| 48 | +.Op Ar arg \&... |
| 49 | +. |
50 | 50 | .Sh DESCRIPTION |
51 | 51 | .Nm |
52 | 52 | allows a user or system administrator to access various resources |
53 | | -on a PCI bus. |
54 | | -.Pp |
55 | | -The following commands are available: |
| 53 | +on a |
| 54 | +.Tn PCI |
| 55 | +bus. |
| 56 | +The |
| 57 | +.Ar pcibus |
| 58 | +argument names a special file for the |
| 59 | +.Tn PCI |
| 60 | +bus device. |
| 61 | +If the file name is relative, it's interpreted relative to the |
| 62 | +.Pa /dev |
| 63 | +directory, so e.g. plain |
| 64 | +.Ql pci0 |
| 65 | +refers to |
| 66 | +.Pa /dev/pci0 . |
| 67 | +. |
56 | 68 | .Pp |
| 69 | +The following |
| 70 | +.Ar command\^ Ns s |
| 71 | +are available: |
| 72 | +. |
| 73 | +.Bl -tag -width Cm |
| 74 | +. |
| 75 | +.It Xo |
57 | 76 | .Cm list |
58 | 77 | .Op Fl Nn |
59 | 78 | .Op Fl b Ar bus |
60 | 79 | .Op Fl d Ar device |
61 | 80 | .Op Fl f Ar function |
62 | | -.Pp |
63 | | -List the devices in the PCI domain, either as names or, if |
| 81 | +.Xc |
| 82 | +List the devices in the |
| 83 | +.Tn PCI |
| 84 | +domain, either as names or, if |
64 | 85 | .Fl n |
65 | 86 | is given, as numbers. |
66 | | -The bus, device, and function |
67 | | -numbers may be specified by flags. |
68 | | -Any locator not specified defaults |
69 | | -to a wildcard, or may be explicitly wildcarded by specifying |
70 | | -.Dq any . |
| 87 | +.Pp |
71 | 88 | If |
72 | 89 | .Fl N |
73 | | -is given, the driver name for this PCI device will be listed |
74 | | -if any driver is attached. |
| 90 | +is given, the driver name for this |
| 91 | +.Tn PCI |
| 92 | +device will be listed if any driver is attached. |
75 | 93 | .Pp |
76 | | -.Cm dump |
77 | | -.Op Fl b Ar bus |
78 | | -.Fl d Ar device |
79 | | -.Op Fl f Ar function |
| 94 | +Any locator not specified defaults |
| 95 | +to a wildcard, or may be explicitly wildcarded by specifying |
| 96 | +.Sq Li all , |
| 97 | +or |
| 98 | +.Sq Li any . |
| 99 | +. |
| 100 | +.El |
| 101 | +.\" |
80 | 102 | .Pp |
81 | | -Dump the PCI configuration space for the specified device located |
82 | | -at the specified bus, device, and function. |
| 103 | +The remaining commands operate on a single |
| 104 | +.Tn PCI |
| 105 | +device, the |
| 106 | +.Fl d |
| 107 | +argument is mandatory. |
83 | 108 | If the bus is not specified, it defaults to the bus number of the |
84 | | -PCI bus specified on the command line. |
| 109 | +.Ar pcibus . |
85 | 110 | If the function is not specified, it defaults to 0. |
86 | | -.Pp |
87 | | -.Cm read |
| 111 | +. |
| 112 | +.Bl -tag -width Cm |
| 113 | +. |
| 114 | +.It Xo |
| 115 | +.Cm dump |
88 | 116 | .Op Fl b Ar bus |
89 | | -.Fl d Ar device |
| 117 | +. Fl d Ar device |
90 | 118 | .Op Fl f Ar function |
91 | | -.Ar reg |
92 | | -.Pp |
93 | | -Read the specified 32-bit aligned PCI configuration register and print |
94 | | -it in hexadecimal to standard output. |
95 | | -If the bus is not specified, it defaults to the bus number of the |
96 | | -PCI bus specified on the command line. |
97 | | -If the function is not specified, it defaults to 0. |
98 | | -.Pp |
99 | | -.Sy WARNING : |
100 | | -.Nm |
| 119 | +.Xc |
| 120 | +Dump the |
| 121 | +.Tn PCI |
| 122 | +configuration space for the specified device. |
| 123 | +. |
| 124 | +.It Xo |
101 | 125 | .Cm read |
102 | | -is a dangerous command that can damage hardware and panic the operating |
103 | | -system, even though it appears to be a harmless read-only operation. |
104 | | -It is meant as a diagnostic tool for experiments or to debug device |
105 | | -drivers. |
106 | | -Do not use it as a substitute for a device driver! |
107 | | -.Pp |
| 126 | +.Op Fl b Ar bus |
| 127 | +. Fl d Ar device |
| 128 | +.Op Fl f Ar function |
| 129 | +.Ar register |
| 130 | +.Xc |
| 131 | +Read the specified 32-bit aligned |
| 132 | +.Tn PCI |
| 133 | +configuration |
| 134 | +.Ar register |
| 135 | +and print it in hexadecimal to standard output. |
| 136 | +. |
| 137 | +.It Xo |
108 | 138 | .Cm write |
109 | 139 | .Op Fl b Ar bus |
110 | | -.Fl d Ar device |
| 140 | +. Fl d Ar device |
111 | 141 | .Op Fl f Ar function |
112 | | -.Ar reg |
| 142 | +.Ar register |
113 | 143 | .Ar value |
114 | | -.Pp |
115 | | -Write the specified value to the specified 32-bit aligned PCI |
116 | | -configuration register. |
117 | | -If the bus is not specified, it defaults to the bus number of the |
118 | | -PCI bus specified on the command line. |
119 | | -If the function is not specified, it defaults to 0. |
120 | | -.Pp |
121 | | -.Sy WARNING : |
122 | | -.Nm |
123 | | -.Cm write |
124 | | -is a dangerous command that can damage hardware and panic the operating |
125 | | -system. |
126 | | -It is meant as a diagnostic tool for experiments or to debug device |
127 | | -drivers. |
128 | | -Do not use it as a substitute for a device driver! |
| 144 | +.Xc |
| 145 | +Write the specified |
| 146 | +.Ar value |
| 147 | +to the specified 32-bit aligned |
| 148 | +.Tn PCI |
| 149 | +configuration |
| 150 | +.Ar register . |
| 151 | +. |
| 152 | +.El |
| 153 | +. |
129 | 154 | .Sh FILES |
130 | | -.Pa /dev/pci* |
131 | | -- PCI bus device nodes |
| 155 | +.Bl -tag -width Pa |
| 156 | +.It Pa /dev/pci* |
| 157 | +.Tn PCI |
| 158 | +bus device nodes |
| 159 | +.El |
| 160 | +. |
132 | 161 | .Sh EXAMPLES |
133 | | -This shows all PCI devices on the system: |
| 162 | +This shows all |
| 163 | +.Tn PCI |
| 164 | +devices on the system: |
134 | 165 | .Pp |
135 | 166 | .Dl pcictl pci0 list |
136 | 167 | .Pp |
137 | | -This shows all PCI devices on the system, including attached drivers: |
| 168 | +This shows all |
| 169 | +.Tn PCI |
| 170 | +devices on the system, including attached drivers: |
138 | 171 | .Pp |
139 | 172 | .Dl pcictl pci0 list -N |
| 173 | +. |
140 | 174 | .Sh SEE ALSO |
141 | 175 | .Xr pci 3 , |
142 | 176 | .Xr pci 4 , |
143 | 177 | .Xr drvctl 8 |
| 178 | +. |
144 | 179 | .Sh HISTORY |
145 | 180 | The |
146 | 181 | .Nm |
147 | 182 | command first appeared in |
148 | 183 | .Nx 1.6 . |
| 184 | +. |
| 185 | +.Sh CAVEATS |
| 186 | +.Nm |
| 187 | +.Cm read |
| 188 | +and |
| 189 | +.Cm write |
| 190 | +are dangerous commands that can damage hardware |
| 191 | +and panic the operating system. |
| 192 | +They are meant as a diagnostic tool for experiments or to debug device |
| 193 | +drivers. |
| 194 | +Do not use them as substitutes for a device driver! |
0 commit comments