| @@ -1,588 +1,557 @@ | | | @@ -1,588 +1,557 @@ |
1 | .\" $NetBSD: acpi.4,v 1.54 2010/08/06 16:44:06 jruoho Exp $ | | 1 | .\" $NetBSD: acpi.4,v 1.55 2010/08/06 18:54:50 jruoho Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice, this list of conditions and the following disclaimer. | | 10 | .\" notice, this list of conditions and the following disclaimer. |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | | 12 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | | 13 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" | | 14 | .\" |
15 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | | 15 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
16 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 16 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
17 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 17 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
18 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 18 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
19 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 19 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
20 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 20 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
21 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 21 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
22 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 22 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
23 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 23 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
24 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 24 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
25 | .\" POSSIBILITY OF SUCH DAMAGE. | | 25 | .\" POSSIBILITY OF SUCH DAMAGE. |
26 | .\" | | 26 | .\" |
27 | .Dd June 30, 2010 | | 27 | .Dd August 6, 2010 |
28 | .Dt ACPI 4 | | 28 | .Dt ACPI 4 |
29 | .Os | | 29 | .Os |
30 | .Sh NAME | | 30 | .Sh NAME |
31 | .Nm acpi | | 31 | .Nm acpi |
32 | .Nd Advanced Configuration and Power Interface | | 32 | .Nd Advanced Configuration and Power Interface |
33 | .Sh SYNOPSIS | | 33 | .Sh SYNOPSIS |
34 | .Cd "acpi0 at mainbus0" | | 34 | .Cd "acpi0 at mainbus0" |
35 | .Pp | | 35 | .Pp |
36 | .Cd "options ACPI_DEBUG" | | 36 | .Cd "options ACPI_DEBUG" |
37 | .Cd "options ACPIVERBOSE" | | 37 | .Cd "options ACPIVERBOSE" |
38 | .Cd "options ACPI_ACTIVATE_DEV" | | 38 | .Cd "options ACPI_ACTIVATE_DEV" |
39 | .Cd "options ACPI_DSDT_OVERRIDE" | | 39 | .Cd "options ACPI_DSDT_OVERRIDE" |
40 | .Cd "options ACPI_DSDT_FILE=\*[q]\*[q]" | | 40 | .Cd "options ACPI_DSDT_FILE=\*[q]\*[q]" |
41 | .Sh DESCRIPTION | | 41 | .Sh DESCRIPTION |
42 | .Nx | | 42 | .Nx |
43 | provides machine-independent bus support for | | 43 | provides machine-independent bus support for |
44 | Advanced Configuration and Power Interface | | 44 | Advanced Configuration and Power Interface |
45 | .Pq Tn ACPI | | 45 | .Pq Tn ACPI |
46 | devices and includes several | | 46 | devices and includes several |
47 | .Tn ACPI | | 47 | .Tn ACPI |
48 | device drivers. | | 48 | device drivers. |
49 | .Pp | | 49 | .Pp |
50 | The | | 50 | The |
51 | .Nx | | 51 | .Nx |
52 | implementation of | | 52 | implementation of |
53 | .Tn ACPI | | 53 | .Tn ACPI |
54 | integrates Intel's ACPI Component Architecture | | 54 | integrates Intel's ACPI Component Architecture |
55 | .Pq Tn ACPI-CA | | 55 | .Pq Tn ACPI-CA |
56 | for the OS-independent part. | | 56 | for the OS-independent part. |
57 | The | | 57 | The |
58 | .Tn ACPI-CA | | 58 | .Tn ACPI-CA |
59 | provides OS-neutral | | 59 | provides OS-neutral |
60 | .Tn ACPI | | 60 | .Tn ACPI |
61 | functionalities such as | | 61 | functionalities such as |
62 | .Tn ACPI | | 62 | .Tn ACPI |
63 | .Tn BIOS | | 63 | .Tn BIOS |
64 | table support, | | 64 | table support, |
65 | an | | 65 | an |
66 | .Tn ACPI | | 66 | .Tn ACPI |
67 | event framework and an ACPI Machine Language | | 67 | event framework and an ACPI Machine Language |
68 | .Pq Tn AML | | 68 | .Pq Tn AML |
69 | interpreter. | | 69 | interpreter. |
70 | .Pp | | 70 | .Pp |
71 | Options: | | 71 | Options: |
72 | .Bl -tag -width ACPI_DSDT_FILE__filename_XX -offset 3n | | 72 | .Bl -tag -width ACPI_DSDT_FILE__filename_XX -offset 3n |
73 | .It Dv ACPI_DEBUG | | 73 | .It Dv ACPI_DEBUG |
74 | Enable various debug facilities. | | 74 | Enable various debug facilities. |
75 | .It Dv ACPIVERBOSE | | 75 | .It Dv ACPIVERBOSE |
76 | Enable verbose debug messages. | | 76 | Enable verbose debug messages. |
77 | .It Dv ACPI_ACTIVATE_DEV | | 77 | .It Dv ACPI_ACTIVATE_DEV |
78 | Determine if the | | 78 | Determine if the |
79 | .Tn ACPI | | 79 | .Tn ACPI |
80 | driver should attempt to activate inactive devices. | | 80 | driver should attempt to activate inactive devices. |
81 | The default is off. | | 81 | The default is off. |
82 | .It Dv ACPI_DSDT_OVERRIDE | | 82 | .It Dv ACPI_DSDT_OVERRIDE |
83 | Force a given Differentiated System Description Table | | 83 | Force a given Differentiated System Description Table |
84 | .Pq Tn DSDT | | 84 | .Pq Tn DSDT |
85 | instead of the version supplied by the | | 85 | instead of the version supplied by the |
86 | .Tn BIOS . | | 86 | .Tn BIOS . |
87 | Use | | 87 | Use |
88 | .Dv ACPI_DSDT_FILE | | 88 | .Dv ACPI_DSDT_FILE |
89 | to specify a | | 89 | to specify a |
90 | .Tn DSDT . | | 90 | .Tn DSDT . |
91 | .It Dv ACPI_DSDT_FILE="filename" | | 91 | .It Dv ACPI_DSDT_FILE="filename" |
92 | If | | 92 | If |
93 | .Dv ACPI_DSDT_FILE | | 93 | .Dv ACPI_DSDT_FILE |
94 | is not specified, default to | | 94 | is not specified, default to |
95 | .Dq dsdt.hex | | 95 | .Dq dsdt.hex |
96 | in the build directory. | | 96 | in the build directory. |
97 | .El | | 97 | .El |
98 | .Sh SYSCTL SUPPORT | | 98 | .Sh SYSCTL SUPPORT |
99 | Few | | 99 | Few |
100 | .Xr sysctl 8 | | 100 | .Xr sysctl 8 |
101 | variables are directly relevant for | | 101 | variables are directly relevant for |
102 | .Tn ACPI . | | 102 | .Tn ACPI . |
103 | .Bl -tag -width "123456" -offset indent | | 103 | .Bl -tag -width "123456" -offset indent |
104 | .It Ic hw.acpi.root | | 104 | .It Ic hw.acpi.root |
105 | The | | 105 | The |
106 | .Tn ACPI | | 106 | .Tn ACPI |
107 | root pointer. | | 107 | root pointer. |
108 | .It Ic hw.acpi.supported_states | | 108 | .It Ic hw.acpi.supported_states |
109 | A list of the | | 109 | A list of the |
110 | .Tn ACPI | | 110 | .Tn ACPI |
111 | sleep states that the machine supports. | | 111 | sleep states that the machine supports. |
112 | The possible values are: | | 112 | The possible values are: |
113 | .Pp | | 113 | .Pp |
114 | .Bl -tag -width XS1X -offset indent -compact | | 114 | .Bl -tag -width XS1X -offset indent -compact |
115 | .It S0 | | 115 | .It S0 |
116 | fully running | | 116 | fully running |
117 | .It S1 | | 117 | .It S1 |
118 | power on suspend (CPU and hard disks are off) | | 118 | power on suspend (CPU and hard disks are off) |
119 | .It S2 | | 119 | .It S2 |
120 | similar to S3, usually not implemented | | 120 | similar to S3, usually not implemented |
121 | .It S3 | | 121 | .It S3 |
122 | suspend-to-RAM | | 122 | suspend-to-RAM |
123 | .It S4 | | 123 | .It S4 |
124 | suspend-to-disk (not supported on | | 124 | suspend-to-disk (not supported on |
125 | .Nx ) | | 125 | .Nx ) |
126 | .It S5 | | 126 | .It S5 |
127 | power off | | 127 | power off |
128 | .El | | 128 | .El |
129 | .It Ic hw.acpi.stat.gpe | | 129 | .It Ic hw.acpi.stat.gpe |
130 | The number of dispatched General Purpose Events | | 130 | The number of dispatched General Purpose Events |
131 | .Pq Tn GPEs . | | 131 | .Pq Tn GPEs . |
132 | .It Ic hw.acpi.stat.sci | | 132 | .It Ic hw.acpi.stat.sci |
133 | The number of System Control Interrupts | | 133 | The number of System Control Interrupts |
134 | .Pq Tn SCIs . | | 134 | .Pq Tn SCIs . |
135 | See | | 135 | See |
136 | .Xr acpiec 4 | | 136 | .Xr acpiec 4 |
137 | for a brief description of both | | 137 | for a brief description of both |
138 | .Tn GPEs | | 138 | .Tn GPEs |
139 | and | | 139 | and |
140 | .Tn SCIs . | | 140 | .Tn SCIs . |
141 | .It Ic hw.acpi.stat.fixed | | 141 | .It Ic hw.acpi.stat.fixed |
142 | The number of | | 142 | The number of |
143 | .Dq fixed events . | | 143 | .Dq fixed events . |
144 | .It Ic hw.acpi.stat.method | | 144 | .It Ic hw.acpi.stat.method |
145 | The number of | | 145 | The number of |
146 | .Tn ACPI | | 146 | .Tn ACPI |
147 | methods executed by the interpreter. | | 147 | methods executed by the interpreter. |
148 | .It Ic machdep.acpi_beep_on_reset | | 148 | .It Ic machdep.acpi_beep_on_reset |
149 | A boolean variable that controls whether the | | 149 | A boolean variable that controls whether the |
150 | .Tn PC | | 150 | .Tn PC |
151 | speaker beeps upon resume. | | 151 | speaker beeps upon resume. |
152 | .It Ic machdep.acpi_vbios_reset | | 152 | .It Ic machdep.acpi_vbios_reset |
153 | Defines the handling of the graphics card. | | 153 | Defines the handling of the graphics card. |
154 | The supported values are: | | 154 | The supported values are: |
155 | .Bl -tag -width '2' -offset indent | | 155 | .Bl -tag -width '2' -offset indent |
156 | .It 0 | | 156 | .It 0 |
157 | No attempt to reset the | | 157 | No attempt to reset the |
158 | .Tn VGA | | 158 | .Tn VGA |
159 | controller will be made. | | 159 | controller will be made. |
160 | .It 1 | | 160 | .It 1 |
161 | Call the | | 161 | Call the |
162 | .Tn VGA | | 162 | .Tn VGA |
163 | .Tn BIOS | | 163 | .Tn BIOS |
164 | when still in real mode. | | 164 | when still in real mode. |
165 | This can result in direct reboots. | | 165 | This can result in direct reboots. |
166 | In that case, use | | 166 | In that case, use |
167 | .Sq 2 | | 167 | .Sq 2 |
168 | or | | 168 | or |
169 | .Ic vbetool post | | 169 | .Ic vbetool post |
170 | from the | | 170 | from the |
171 | .Pa pkgsrc/sysutils/vbetool | | 171 | .Pa pkgsrc/sysutils/vbetool |
172 | package. | | 172 | package. |
173 | .It 2 | | 173 | .It 2 |
174 | Call the | | 174 | Call the |
175 | .Tn VGA | | 175 | .Tn VGA |
176 | .Tn BIOS | | 176 | .Tn BIOS |
177 | using the in-kernel x86 emulator. | | 177 | using the in-kernel x86 emulator. |
178 | .El | | 178 | .El |
179 | .El | | 179 | .El |
180 | .Sh SUPPORTED DEVICES | | 180 | .Sh SUPPORTED DEVICES |
181 | .Nx | | 181 | .Nx |
182 | .Tn ACPI | | 182 | .Tn ACPI |
183 | supports several machine-dependent and machine-independent devices: | | 183 | supports several machine-dependent and machine-independent devices: |
184 | .Ss Machine-independent devices | | 184 | .Ss Machine-independent devices |
185 | .Bl -tag -width "thinkpad(4) " -offset indent -compact | | 185 | .Bl -tag -width "thinkpad(4) " -offset indent -compact |
186 | .It Xr acpiacad 4 | | 186 | .It Xr acpiacad 4 |
187 | .Tn ACPI | | 187 | .Tn ACPI |
188 | AC adapters. | | 188 | AC adapters. |
189 | .It Xr acpibat 4 | | 189 | .It Xr acpibat 4 |
190 | .Tn ACPI | | 190 | .Tn ACPI |
191 | batteries. | | 191 | batteries. |
192 | .It Xr acpibut 4 | | 192 | .It Xr acpibut 4 |
193 | .Tn ACPI | | 193 | .Tn ACPI |
194 | power and sleep buttons. | | 194 | power and sleep buttons. |
195 | .It Xr acpicpu 4 | | 195 | .It Xr acpicpu 4 |
196 | .Tn ACPI | | 196 | .Tn ACPI |
197 | processors. | | 197 | processors. |
198 | .It Xr acpidalb 4 | | 198 | .It Xr acpidalb 4 |
199 | .Tn ACPI | | 199 | .Tn ACPI |
200 | direction application launch buttons. | | 200 | direction application launch buttons. |
201 | .It Xr acpiec 4 | | 201 | .It Xr acpiec 4 |
202 | .Tn ACPI | | 202 | .Tn ACPI |
203 | embedded controllers. | | 203 | embedded controllers. |
204 | .It Xr acpiecdt 4 | | 204 | .It Xr acpiecdt 4 |
205 | .Tn ACPI | | 205 | .Tn ACPI |
206 | Embedded Controller Boot Resource Table | | 206 | Embedded Controller Boot Resource Table |
207 | .Pq Tn ECDT . | | 207 | .Pq Tn ECDT . |
208 | .It Xr acpilid 4 | | 208 | .It Xr acpilid 4 |
209 | .Tn ACPI | | 209 | .Tn ACPI |
210 | lid switches. | | 210 | lid switches. |
211 | .It Xr acpismbus 4 | | 211 | .It Xr acpismbus 4 |
212 | .Tn ACPI | | 212 | .Tn ACPI |
213 | SMBus via Control Method Interface | | 213 | SMBus via Control Method Interface |
214 | .Pq Tn CMI . | | 214 | .Pq Tn CMI . |
215 | .It Xr acpitz 4 | | 215 | .It Xr acpitz 4 |
216 | .Tn ACPI | | 216 | .Tn ACPI |
217 | thermal zones. | | 217 | thermal zones. |
218 | .It Xr acpiwmi 4 | | 218 | .It Xr acpiwmi 4 |
219 | .Tn ACPI | | 219 | .Tn ACPI |
220 | support for Windows Management Instrumentation. | | 220 | support for Windows Management Instrumentation. |
221 | .It Xr aibs 4 | | 221 | .It Xr aibs 4 |
222 | ASUSTeK voltage, temperature and fan sensors. | | 222 | ASUSTeK voltage, temperature and fan sensors. |
223 | .It asus | | 223 | .It asus |
224 | ASUS laptop hotkeys. | | 224 | ASUS laptop hotkeys. |
225 | .It Xr attimer 4 | | 225 | .It Xr attimer 4 |
226 | AT Timer. | | 226 | AT Timer. |
227 | .It Xr com 4 | | 227 | .It Xr com 4 |
228 | NS8250-, NS16450-, and NS16550-based serial ports. | | 228 | NS8250-, NS16450-, and NS16550-based serial ports. |
229 | .It Xr fdc 4 | | 229 | .It Xr fdc 4 |
230 | Floppy disk controllers. | | 230 | Floppy disk controllers. |
231 | .It Xr hpet 4 | | 231 | .It Xr hpet 4 |
232 | High Precision Event Timer | | 232 | High Precision Event Timer |
233 | .Pq Tn HPET . | | 233 | .Pq Tn HPET . |
234 | .It Xr hpqlb 4 | | 234 | .It Xr hpqlb 4 |
235 | HP Quick Launch Buttons. | | 235 | HP Quick Launch Buttons. |
236 | .It Xr joy 4 | | 236 | .It Xr joy 4 |
237 | Joystick/Game port interface. | | 237 | Joystick/Game port interface. |
238 | .It Xr lpt 4 | | 238 | .It Xr lpt 4 |
239 | Standard ISA parallel port interface. | | 239 | Standard ISA parallel port interface. |
240 | .It Xr mpu 4 | | 240 | .It Xr mpu 4 |
241 | Roland MPU-401 (compatible) MIDI UART. | | 241 | Roland MPU-401 (compatible) MIDI UART. |
242 | .It Xr pcppi 4 | | 242 | .It Xr pcppi 4 |
243 | AT-style speaker sound. | | 243 | AT-style speaker sound. |
244 | .It Xr thinkpad 4 | | 244 | .It Xr thinkpad 4 |
245 | IBM/Lenovo ThinkPad laptop device driver. | | 245 | IBM/Lenovo ThinkPad laptop device driver. |
246 | .It Xr ug 4 | | 246 | .It Xr ug 4 |
247 | Abit uGuru Hardware monitor. | | 247 | Abit uGuru Hardware monitor. |
248 | .It Xr vald 4 | | 248 | .It Xr vald 4 |
249 | Toshiba Libretto device. | | 249 | Toshiba Libretto device. |
250 | .It Xr wb 4 | | 250 | .It Xr wb 4 |
251 | Winbond W83L518D Integrated Media Reader. | | 251 | Winbond W83L518D Integrated Media Reader. |
252 | .It Xr wss 4 | | 252 | .It Xr wss 4 |
253 | Windows Sound System-compatible sound cards | | 253 | Windows Sound System-compatible sound cards |
254 | .It Xr ym 4 | | 254 | .It Xr ym 4 |
255 | Yamaha OPL3-SA2 and OPL3-SA3 audio device driver. | | 255 | Yamaha OPL3-SA2 and OPL3-SA3 audio device driver. |
256 | .El | | 256 | .El |
257 | .Ss i386-dependent devices | | 257 | .Ss i386-dependent devices |
258 | .Bl -tag -width "thinkpad(4) " -offset indent -compact | | 258 | .Bl -tag -width "thinkpad(4) " -offset indent -compact |
259 | .It Xr npx 4 | | 259 | .It Xr npx 4 |
260 | i386 numeric processing extension coprocessor. | | 260 | i386 numeric processing extension coprocessor. |
261 | .It Xr pckbc 4 | | 261 | .It Xr pckbc 4 |
262 | PC keyboard controllers. | | 262 | PC keyboard controllers. |
263 | .It Xr sony 4 | | 263 | .It Xr sony 4 |
264 | Sony Miscellaneous Controller | | 264 | Sony Miscellaneous Controller |
265 | .It Xr spic 4 | | 265 | .It Xr spic 4 |
266 | Sony programmable I/O controller. | | 266 | Sony programmable I/O controller. |
267 | .El | | 267 | .El |
268 | .Sh DEBUGGING | | 268 | .Sh DEBUGGING |
269 | Although the situation has become better over the years, | | 269 | Although the situation has become better over the years, |
270 | .Tn ACPI | | 270 | .Tn ACPI |
271 | is typically prone to various errors, | | 271 | is typically prone to various errors, |
272 | ranging from blatant flaws in the firmware to bugs in the implementation. | | 272 | ranging from blatant flaws in the firmware to bugs in the implementation. |
273 | Before anything else, it is a good practice to upgrade the | | 273 | Before anything else, it is a good practice to upgrade the |
274 | .Tn BIOS | | 274 | .Tn BIOS |
275 | to the latest version available from the vendor. | | 275 | to the latest version available from the vendor. |
276 | .Pp | | 276 | .Pp |
277 | To ease the task of diagnosing and fixing different problems, the | | 277 | To ease the task of diagnosing and fixing different problems, the |
278 | .Tn ACPICA | | 278 | .Tn ACPICA |
279 | reference implementation provides a rich | | 279 | reference implementation provides a rich |
280 | facility of different debugging methods. | | 280 | facility of different debugging methods. |
281 | In | | 281 | In |
282 | .Nx | | 282 | .Nx |
283 | these are generally only available if the kernel has been compiled with the | | 283 | these are generally only available if the kernel has been compiled with the |
284 | .Tn ACPI_DEBUG | | 284 | .Tn ACPI_DEBUG |
285 | option. | | 285 | option. |
286 | .Ss Custom DSDT | | 286 | .Ss Custom DSDT |
287 | .Tn ACPI | | 287 | .Tn ACPI |
288 | interprets bytecode known as | | 288 | interprets bytecode known as |
289 | .Tn ACPI | | 289 | .Tn ACPI |
290 | Machine Language | | 290 | Machine Language |
291 | .Pq Tn AML , | | 291 | .Pq Tn AML , |
292 | provided by the | | 292 | provided by the |
293 | .Tn BIOS | | 293 | .Tn BIOS |
294 | as a memory image during the system bootstrap. | | 294 | as a memory image during the system bootstrap. |
295 | Most of the | | 295 | Most of the |
296 | .Tn AML | | 296 | .Tn AML |
297 | relevant to | | 297 | relevant to |
298 | .Nm | | 298 | .Nm |
299 | is implemented in the so-called | | 299 | is implemented in the so-called |
300 | Differentiated System Descriptor Table | | 300 | Differentiated System Descriptor Table |
301 | .Pq Tn DSDT . | | 301 | .Pq Tn DSDT . |
302 | .Nx | | 302 | .Nx |
303 | provides support for overriding the default | | 303 | provides support for overriding the default |
304 | .Tn DSDT | | 304 | .Tn DSDT |
305 | supplied by the | | 305 | supplied by the |
306 | .Tn BIOS . | | 306 | .Tn BIOS . |
307 | .Pp | | 307 | .Pp |
308 | The following steps can be used to override the | | 308 | The following steps can be used to override the |
309 | .Tn DSDT : | | 309 | .Tn DSDT : |
310 | .Bl -enum -offset indent | | 310 | .Bl -enum -offset indent |
311 | .It | | 311 | .It |
312 | Dump the raw | | 312 | Dump the raw |
313 | .Tn DSDT | | 313 | .Tn DSDT |
314 | with | | 314 | with |
315 | .Xr acpidump 8 . | | 315 | .Xr acpidump 8 . |
316 | .It | | 316 | .It |
317 | Disassemble the table with | | 317 | Disassemble the table with |
318 | .Xr iasl 8 . | | 318 | .Xr iasl 8 . |
319 | .It | | 319 | .It |
320 | Modify the disassembled table. | | 320 | Modify the disassembled table. |
321 | .It | | 321 | .It |
322 | Compile the table with | | 322 | Compile the table with |
323 | .Xr iasl 8 | | 323 | .Xr iasl 8 |
324 | using the option | | 324 | using the option |
325 | .Ar \-tc . | | 325 | .Ar \-tc . |
326 | .It | | 326 | .It |
327 | Either copy the | | 327 | Either copy the |
328 | .Pq Pa *.hex | | 328 | .Pq Pa *.hex |
329 | file to | | 329 | file to |
330 | .Bd -literal -offset indent | | 330 | .Bd -literal -offset indent |
331 | src/sys/dev/acpi/acpica/Osd/custom_dsdt.hex | | 331 | src/sys/dev/acpi/acpica/Osd/custom_dsdt.hex |
332 | .Ed | | 332 | .Ed |
333 | .Pp | | 333 | .Pp |
334 | or use the option | | 334 | or use the option |
335 | .Bd -literal -offset indent | | 335 | .Bd -literal -offset indent |
336 | ACPI_DSDT_FILE="/some/directory/custom_dsdt.hex" | | 336 | ACPI_DSDT_FILE="/some/directory/custom_dsdt.hex" |
337 | .Ed | | 337 | .Ed |
338 | .Pp | | 338 | .Pp |
339 | in the kernel configuration file. | | 339 | in the kernel configuration file. |
340 | .It | | 340 | .It |
341 | Define | | 341 | Define |
342 | .Tn ACPI_DSDT_OVERRIDE | | 342 | .Tn ACPI_DSDT_OVERRIDE |
343 | in the kernel configuration file and rebuild. | | 343 | in the kernel configuration file and rebuild. |
344 | .El | | 344 | .El |
345 | .Ss Debugger | | 345 | .Ss Debugger |
346 | The | | 346 | The |
347 | .Tn ACPICA | | 347 | .Tn ACPICA |
348 | interpreter provides its own debugger for low-level debugging. | | 348 | interpreter provides its own debugger for low-level debugging. |
349 | It can be used to display internal data structures and namespace objects, | | 349 | It can be used to display internal data structures and namespace objects, |
350 | and to debug the execution of control methods. | | 350 | and to debug the execution of control methods. |
351 | Single step and breakpoint functionality are available. | | 351 | Single step and breakpoint functionality are available. |
352 | In | | 352 | In |
353 | .Nx | | 353 | .Nx |
354 | this is integrated to the in-kernel | | 354 | this is integrated to the in-kernel |
355 | .Xr ddb 4 . | | 355 | .Xr ddb 4 . |
356 | In order to enter the | | 356 | In order to enter the |
357 | .Tn ACPICA | | 357 | .Tn ACPICA |
358 | debugger from | | 358 | debugger from |
359 | .Xr ddb 4 , | | 359 | .Xr ddb 4 , |
360 | use the command | | 360 | use the command |
361 | .Ic call | | 361 | .Ic call |
362 | with the argument | | 362 | with the argument |
363 | .Ic acpi_osd_debugger . | | 363 | .Ic acpi_osd_debugger . |
364 | .Ss Debug Output | | 364 | .Ss Debug Output |
365 | .Nx | | 365 | .Nx |
366 | provides three | | 366 | provides three |
367 | .Xr sysctl 8 | | 367 | .Xr sysctl 8 |
368 | variables that control the debug output at runtime. | | 368 | variables that control the debug output at runtime. |
369 | The | | 369 | The |
370 | .Ic hw.acpi.debug.layer | | 370 | .Ic hw.acpi.debug.layer |
371 | variable limits the output to a specific | | 371 | variable limits the output to a specific |
372 | .Tn ACPI | | 372 | .Tn ACPI |
373 | layer and the | | 373 | layer and the |
374 | .Ic hw.acpi.debug.level | | 374 | .Ic hw.acpi.debug.level |
375 | variable controls the debug level. | | 375 | variable controls the debug level. |
376 | Both | | 376 | Both |
377 | .Xr sysctl 8 | | 377 | .Xr sysctl 8 |
378 | variables are string literals. | | 378 | variables are string literals. |
379 | The third variable is | | 379 | The third variable is |
380 | .Ic hw.acpi.debug.object . | | 380 | .Ic hw.acpi.debug.object . |
381 | This is a boolean that controls whether debug messages internal to the | | 381 | This is a boolean that controls whether debug messages internal to the |
382 | .Tn AML | | 382 | .Tn AML |
383 | are enabled. | | 383 | are enabled. |
384 | .Pp | | 384 | .Pp |
385 | For the first two variables, the possible values are: | | 385 | For the first two variables, the possible values are: |
386 | .Bl -column -offset indent \ | | 386 | .Bl -column -offset indent \ |
387 | "ACPI_RESOURCE_COMPONENT " "ACPI_RESOURCE_COMPONENT " | | 387 | "ACPI_RESOURCE_COMPONENT " "ACPI_RESOURCE_COMPONENT " |
388 | .It Sy LAYER Ta Sy LEVEL | | 388 | .It Sy LAYER Ta Sy LEVEL |
389 | .It Li ACPI_DEBUG_NONE Ta ACPI_DEBUG_NONE | | 389 | .It Li ACPI_DEBUG_NONE Ta ACPI_DEBUG_NONE |
390 | .It Ta | | 390 | .It Ta |
391 | .It Li ACPI_UTILITIES Ta ACPI_LV_INIT | | 391 | .It Li ACPI_UTILITIES Ta ACPI_LV_INIT |
392 | .It Li ACPI_HARDWARE Ta ACPI_LV_DEBUG_OBJECT | | 392 | .It Li ACPI_HARDWARE Ta ACPI_LV_DEBUG_OBJECT |
393 | .It Li ACPI_EVENTS Ta ACPI_LV_INFO | | 393 | .It Li ACPI_EVENTS Ta ACPI_LV_INFO |
394 | .It Li ACPI_TABLES Ta ACPI_LV_ALL_EXCEPTIONS * | | 394 | .It Li ACPI_TABLES Ta ACPI_LV_ALL_EXCEPTIONS * |
395 | .It Li ACPI_NAMESPACE Ta | | 395 | .It Li ACPI_NAMESPACE Ta |
396 | .It Li ACPI_PARSER Ta ACPI_LV_INIT_NAMES | | 396 | .It Li ACPI_PARSER Ta ACPI_LV_INIT_NAMES |
397 | .It Li ACPI_DISPATCHER Ta ACPI_LV_PARSE | | 397 | .It Li ACPI_DISPATCHER Ta ACPI_LV_PARSE |
398 | .It Li ACPI_EXECUTER Ta ACPI_LV_LOAD | | 398 | .It Li ACPI_EXECUTER Ta ACPI_LV_LOAD |
399 | .It Li ACPI_RESOURCES Ta ACPI_LV_DISPATCH | | 399 | .It Li ACPI_RESOURCES Ta ACPI_LV_DISPATCH |
400 | .It Li ACPI_CA_DEBUGGER Ta ACPI_LV_EXEC | | 400 | .It Li ACPI_CA_DEBUGGER Ta ACPI_LV_EXEC |
401 | .It Li ACPI_OS_SERVICES Ta ACPI_LV_NAMES | | 401 | .It Li ACPI_OS_SERVICES Ta ACPI_LV_NAMES |
402 | .It Li ACPI_CA_DISASSEMBLER Ta ACPI_LV_OPREGION | | 402 | .It Li ACPI_CA_DISASSEMBLER Ta ACPI_LV_OPREGION |
403 | .It Li ACPI_COMPILER Ta ACPI_LV_BFIELD | | 403 | .It Li ACPI_COMPILER Ta ACPI_LV_BFIELD |
404 | .It Li ACPI_TOOLS Ta ACPI_LV_TABLES | | 404 | .It Li ACPI_TOOLS Ta ACPI_LV_TABLES |
405 | .It Li ACPI_EXAMPLE Ta ACPI_LV_VALUES | | 405 | .It Li ACPI_EXAMPLE Ta ACPI_LV_VALUES |
406 | .It Li ACPI_DRIVER Ta ACPI_LV_OBJECTS | | 406 | .It Li ACPI_DRIVER Ta ACPI_LV_OBJECTS |
407 | .It Li ACPI_ALL_COMPONENTS * Ta ACPI_LV_RESOURCES | | 407 | .It Li ACPI_ALL_COMPONENTS * Ta ACPI_LV_RESOURCES |
408 | .It Ta ACPI_LV_USER_REQUESTS | | 408 | .It Ta ACPI_LV_USER_REQUESTS |
409 | .It Li ACPI_BUS_COMPONENT Ta ACPI_LV_PACKAGE | | 409 | .It Li ACPI_BUS_COMPONENT Ta ACPI_LV_PACKAGE |
410 | .It Li ACPI_ACAD_COMPONENT Ta ACPI_LV_VERBOSITY1 * | | 410 | .It Li ACPI_ACAD_COMPONENT Ta ACPI_LV_VERBOSITY1 * |
411 | .It Li ACPI_BAT_COMPONENT Ta | | 411 | .It Li ACPI_BAT_COMPONENT Ta |
412 | .It Li ACPI_BUTTON_COMPONENT Ta ACPI_LV_ALLOCATIONS | | 412 | .It Li ACPI_BUTTON_COMPONENT Ta ACPI_LV_ALLOCATIONS |
413 | .It Li APCI_EC_COMPONENT Ta ACPI_LV_FUNCTIONS | | 413 | .It Li APCI_EC_COMPONENT Ta ACPI_LV_FUNCTIONS |
414 | .It Li ACPI_LID_COMPONENT Ta ACPI_LV_OPTIMIZATIONS | | 414 | .It Li ACPI_LID_COMPONENT Ta ACPI_LV_OPTIMIZATIONS |
415 | .It Li ACPI_RESOURCE_COMPONENT Ta ACPI_LV_VERBOSITY2 * | | 415 | .It Li ACPI_RESOURCE_COMPONENT Ta ACPI_LV_VERBOSITY2 * |
416 | .It Li ACPI_TZ_COMPONENT Ta | | 416 | .It Li ACPI_TZ_COMPONENT Ta |
417 | .It Li ACPI_ALL_DRIVERS * Ta ACPI_LV_MUTEX | | 417 | .It Li ACPI_ALL_DRIVERS * Ta ACPI_LV_MUTEX |
418 | .It Ta ACPI_LV_THREADS | | 418 | .It Ta ACPI_LV_THREADS |
419 | .It Ta ACPI_LV_IO | | 419 | .It Ta ACPI_LV_IO |
420 | .It Ta ACPI_LV_AML_INTERRUPTS | | 420 | .It Ta ACPI_LV_AML_INTERRUPTS |
421 | .It Li "* This is a compound" Ta ACPI_LV_VERBOSITY3 * | | 421 | .It Li "* This is a compound" Ta ACPI_LV_VERBOSITY3 * |
422 | .It Li " constant, including" Ta | | 422 | .It Li " constant, including" Ta |
423 | .It Li " all previous elements." Ta ACPI_LV_AML_DISASSEMBLE | | 423 | .It Li " all previous elements." Ta ACPI_LV_AML_DISASSEMBLE |
424 | .It Ta ACPI_LV_VERBOSE_INFO | | 424 | .It Ta ACPI_LV_VERBOSE_INFO |
425 | .It Ta ACPI_LV_FULL_TABLES | | 425 | .It Ta ACPI_LV_FULL_TABLES |
426 | .It Ta ACPI_LV_EVENTS | | 426 | .It Ta ACPI_LV_EVENTS |
427 | .It Ta ACPI_LV_VERBOSE * | | 427 | .It Ta ACPI_LV_VERBOSE * |
428 | .El | | 428 | .El |
429 | .Pp | | 429 | .Pp |
430 | In addition, there is | | 430 | In addition, there is |
431 | .Dv ACPI_DEBUG_DEFAULT | | 431 | .Dv ACPI_DEBUG_DEFAULT |
432 | that is used by | | 432 | that is used by |
433 | .Tn ACPICA | | 433 | .Tn ACPICA |
434 | as the default debug level. | | 434 | as the default debug level. |
435 | It includes | | 435 | It includes |
436 | .Dv ACPI_LV_INIT | | 436 | .Dv ACPI_LV_INIT |
437 | and | | 437 | and |
438 | .Dv ACPI_LV_DEBUG_OBJECT . | | 438 | .Dv ACPI_LV_DEBUG_OBJECT . |
439 | .Pp | | 439 | .Pp |
440 | The debug layer can be divided into two groups: | | 440 | The debug layer can be divided into two groups: |
441 | the first one is specific to the | | 441 | the first one is specific to the |
442 | .Tn ACPICA | | 442 | .Tn ACPICA |
443 | interpreter and the second one contains the internal | | 443 | interpreter and the second one contains the internal |
444 | .Tn ACPI | | 444 | .Tn ACPI |
445 | components of | | 445 | components of |
446 | .Nx . | | 446 | .Nx . |
447 | The constant | | 447 | The constant |
448 | .Dv ACPI_ALL_DRIVERS | | 448 | .Dv ACPI_ALL_DRIVERS |
449 | includes all | | 449 | includes all |
450 | .Nx | | 450 | .Nx |
451 | specific parts. | | 451 | specific parts. |
452 | .Pp | | 452 | .Pp |
453 | The | | 453 | The |
454 | .Tn ACPICA | | 454 | .Tn ACPICA |
455 | interpreter uses several debug levels internally, | | 455 | interpreter uses several debug levels internally, |
456 | but the | | 456 | but the |
457 | .Nx | | 457 | .Nx |
458 | specific parts are typically limited to | | 458 | specific parts are typically limited to |
459 | .Dv ACPI_LV_DEBUG_OBJECT | | 459 | .Dv ACPI_LV_DEBUG_OBJECT |
460 | and | | 460 | and |
461 | .Dv ACPI_LV_DEBUG_INFO . | | 461 | .Dv ACPI_LV_DEBUG_INFO . |
462 | The debug output can be stopped by setting | | 462 | The debug output can be stopped by setting |
463 | .Ic hw.acpi.debug.level | | 463 | .Ic hw.acpi.debug.level |
464 | to | | 464 | to |
465 | .Dv ACPI_DEBUG_NONE . | | 465 | .Dv ACPI_DEBUG_NONE . |
466 | .Ss Example | | 466 | .Ss Example |
467 | As an example, a driver may have defined the component it belongs to and | | 467 | As an example, a driver may have defined the component it belongs to and |
468 | the name of the module: | | 468 | the name of the module: |
469 | .Bd -literal -offset indent | | 469 | .Bd -literal -offset indent |
470 | #define _COMPONENT ACPI_BUS_COMPONENT | | 470 | #define _COMPONENT ACPI_BUS_COMPONENT |
471 | ACPI_MODULE_NAME ("acpi_example") | | 471 | ACPI_MODULE_NAME ("acpi_example") |
472 | .Ed | | 472 | .Ed |
473 | .Pp | | 473 | .Pp |
474 | The driver may also utilize the debug facility: | | 474 | The driver may also utilize the debug facility: |
475 | .Bd -literal -offset indent | | 475 | .Bd -literal -offset indent |
476 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Failed to evaluate _STA\\n")); | | 476 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Failed to evaluate _STA\\n")); |
477 | .Ed | | 477 | .Ed |
478 | .Pp | | 478 | .Pp |
479 | With these options the debug message from the | | 479 | With these options the debug message from the |
480 | .Dv ACPI_DEBUG_PRINT | | 480 | .Dv ACPI_DEBUG_PRINT |
481 | macro is only visible when | | 481 | macro is only visible when |
482 | .Ic hw.acpi.debug.layer | | 482 | .Ic hw.acpi.debug.layer |
483 | is either | | 483 | is either |
484 | .Dv ACPI_BUS_COMPONENT | | 484 | .Dv ACPI_BUS_COMPONENT |
485 | or a compound constant including it, and | | 485 | or a compound constant including it, and |
486 | .Ic hw.acpi.debug.level | | 486 | .Ic hw.acpi.debug.level |
487 | is | | 487 | is |
488 | .Dv ACPI_LV_INFO | | 488 | .Dv ACPI_LV_INFO |
489 | or some constant that includes it. | | 489 | or some constant that includes it. |
490 | Finally, it can be noted that the | | 490 | Finally, it can be noted that the |
491 | .Tn ACPI | | 491 | .Tn ACPI |
492 | implementation uses the prefix | | 492 | implementation uses the prefix |
493 | .Dv ACPI_DB , | | 493 | .Dv ACPI_DB , |
494 | whereas the debug level | | 494 | whereas the debug level |
495 | .Xr sysctl 8 | | 495 | .Xr sysctl 8 |
496 | variable is always specified with the prefix | | 496 | variable is always specified with the prefix |
497 | .Dv ACPI_LV . | | 497 | .Dv ACPI_LV . |
498 | .Pp | | 498 | .Pp |
499 | Another example can be mentioned for the use of | | 499 | Another example can be mentioned for the use of |
500 | .Ic hw.acpi.debug.object . | | 500 | .Ic hw.acpi.debug.object . |
501 | The following could appear in an | | 501 | The following could appear in an |
502 | .Tn ASL | | 502 | .Tn ASL |
503 | code: | | 503 | code: |
504 | .Bd -literal -offset indent | | 504 | .Bd -literal -offset indent |
505 | Method(_Q19, 0, NotSerialized) | | 505 | Method(_Q19, 0, NotSerialized) |
506 | { | | 506 | { |
507 | Store("_Q19 invoked", Debug) | | 507 | Store("_Q19 invoked", Debug) |
508 | Notify(ACAD, 0x80) | | 508 | Notify(ACAD, 0x80) |
509 | } | | 509 | } |
510 | .Ed | | 510 | .Ed |
511 | .Pp | | 511 | .Pp |
512 | When | | 512 | When |
513 | .Ic hw.acpi.debug.object | | 513 | .Ic hw.acpi.debug.object |
514 | is set to 1, the message stored to the debug object | | 514 | is set to 1, the message stored to the debug object |
515 | is printed every time the method is called by the interpreter. | | 515 | is printed every time the method is called by the interpreter. |
516 | .Sh SEE ALSO | | 516 | .Sh SEE ALSO |
517 | .Xr acpiacad 4 , | | | |
518 | .Xr acpibat 4 , | | | |
519 | .Xr acpibut 4 , | | | |
520 | .Xr acpicpu 4 , | | | |
521 | .Xr acpidalb 4 , | | | |
522 | .Xr acpiec 4 , | | | |
523 | .Xr acpilid 4 , | | | |
524 | .Xr acpismbus 4 , | | | |
525 | .Xr acpitz 4 , | | | |
526 | .Xr acpiwmi 4 , | | | |
527 | .Xr aibs 4 , | | | |
528 | .Xr apm 4 , | | | |
529 | .Xr attimer 4 , | | | |
530 | .Xr com 4 , | | | |
531 | .Xr fdc 4 , | | | |
532 | .Xr hpqlb 4 , | | | |
533 | .Xr joy 4 , | | | |
534 | .Xr lpt 4 , | | | |
535 | .Xr mpu 4 , | | | |
536 | .Xr npx 4 , | | | |
537 | .Xr pci 4 , | | | |
538 | .Xr pckbc 4 , | | | |
539 | .Xr pcppi 4 , | | | |
540 | .Xr sony 4 , | | | |
541 | .Xr spic 4 , | | | |
542 | .Xr thinkpad 4 , | | | |
543 | .Xr ug 4 , | | | |
544 | .Xr vald 4 , | | | |
545 | .Xr wb 4 , | | | |
546 | .Xr wss 4 , | | | |
547 | .Xr ym 4 , | | | |
548 | .Xr acpidump 8 , | | 517 | .Xr acpidump 8 , |
549 | .Xr amldb 8 , | | 518 | .Xr amldb 8 , |
550 | .Xr iasl 8 | | 519 | .Xr iasl 8 |
551 | .Rs | | 520 | .Rs |
552 | .%A Hewlett-Packard Corporation | | 521 | .%A Hewlett-Packard Corporation |
553 | .%A Intel Corporation | | 522 | .%A Intel Corporation |
554 | .%A Microsoft Corporation | | 523 | .%A Microsoft Corporation |
555 | .%A Phoenix Technologies Ltd. | | 524 | .%A Phoenix Technologies Ltd. |
556 | .%A Toshiba Corporation | | 525 | .%A Toshiba Corporation |
557 | .%T Advanced Configuration and Power Interface Specification | | 526 | .%T Advanced Configuration and Power Interface Specification |
558 | .%N Revision 4.0 | | 527 | .%N Revision 4.0 |
559 | .%D June 16, 2009 | | 528 | .%D June 16, 2009 |
560 | .%U http://www.acpi.info/spec.htm | | 529 | .%U http://www.acpi.info/spec.htm |
561 | .Re | | 530 | .Re |
562 | .Rs | | 531 | .Rs |
563 | .%A Intel Corporation | | 532 | .%A Intel Corporation |
564 | .%T ACPI Component Architecture, | | 533 | .%T ACPI Component Architecture, |
565 | .%T Programmer Reference, | | 534 | .%T Programmer Reference, |
566 | .%T OS-Independent Subsystem, Debugger, and Utilities | | 535 | .%T OS-Independent Subsystem, Debugger, and Utilities |
567 | .%N Revision 1.27 | | 536 | .%N Revision 1.27 |
568 | .%D January 20, 2010 | | 537 | .%D January 20, 2010 |
569 | .%U http://www.acpica.org/download/acpica-reference.pdf | | 538 | .%U http://www.acpica.org/download/acpica-reference.pdf |
570 | .Re | | 539 | .Re |
571 | .Rs | | 540 | .Rs |
572 | .%A Joerg Sonnenberger | | 541 | .%A Joerg Sonnenberger |
573 | .%A Jared D. McNeill | | 542 | .%A Jared D. McNeill |
574 | .%T Sleeping Beauty - NetBSD on Modern Laptops | | 543 | .%T Sleeping Beauty - NetBSD on Modern Laptops |
575 | .%D February 3, 2008 | | 544 | .%D February 3, 2008 |
576 | .%O Proceedings of AsiaBSDCon 2008 | | 545 | .%O Proceedings of AsiaBSDCon 2008 |
577 | .%P pp. 127-134 | | 546 | .%P pp. 127-134 |
578 | .Re | | 547 | .Re |
579 | .Sh HISTORY | | 548 | .Sh HISTORY |
580 | The | | 549 | The |
581 | .Nm | | 550 | .Nm |
582 | driver | | 551 | driver |
583 | appeared in | | 552 | appeared in |
584 | .Nx 1.6 . | | 553 | .Nx 1.6 . |
585 | .Sh BUGS | | 554 | .Sh BUGS |
586 | Most of the | | 555 | Most of the |
587 | .Tn ACPI | | 556 | .Tn ACPI |
588 | power management functionalities are not implemented. | | 557 | power management functionalities are not implemented. |