xref: /netbsd-src/share/man/man4/acpi.4 (revision 7f21db1c0118155e0dd40b75182e30c589d9f63e)
1.\" $NetBSD: acpi.4,v 1.40 2010/02/09 06:49:41 wiz Exp $
2.\"
3.\" Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
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
17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
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
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
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd February 9, 2010
28.Dt ACPI 4
29.Os
30.Sh NAME
31.Nm acpi
32.Nd Advanced Configuration and Power Interface
33.Sh SYNOPSIS
34.Cd "acpi0     at mainbus0"
35.Cd "acpiacad* at acpi?"
36.Cd "acpibat*  at acpi?"
37.Cd "acpibut*  at acpi?"
38.Cd "acpidalb* at acpi?"
39.Cd "acpiec*   at acpi?"
40.Cd "acpiecdt* at acpi?"
41.Cd "acpilid*  at acpi?"
42.Cd "acpismbus* at acpi?"
43.Cd "acpitz*   at acpi?"
44.Cd "aiboost*  at acpi?"
45.Cd "aibs*     at acpi?"
46.Cd "asus*     at acpi?"
47.Cd "attimer*  at acpi?"
48.Cd "com*      at acpi?"
49.Cd "fdc*      at acpi?"
50.Cd "hpet*     at acpi?"
51.Cd "hpqlb*    at acpi?"
52.Cd "joy*      at acpi?"
53.Cd "lpt*      at acpi?"
54.Cd "mpu*      at acpi?"
55.Cd "npx*      at acpi?"
56.Cd "pckbc*    at acpi?"
57.Cd "pcppi*    at acpi?"
58.Cd "sony*     at acpi?"
59.Cd "spic*     at acpi?"
60.Cd "thinkpad* at acpi?"
61.Cd "ug*       at acpi?"
62.Cd "vald*     at acpi?"
63.Cd "wb*       at acpi?"
64.Cd "wss*      at acpi?"
65.Cd "ym*       at acpi?"
66.Pp
67.Cd "options   ACPI_DEBUG"
68.Cd "options   ACPIVERBOSE"
69.Cd "options   ACPI_ACTIVATE_DEV"
70.Cd "options   ACPI_DSDT_OVERRIDE"
71.Sh DESCRIPTION
72.Nx
73provides machine-independent bus support for
74Advanced Configuration and Power Interface
75.Pq Tn ACPI
76devices and includes several
77.Tn ACPI
78device drivers.
79.Pp
80The
81.Nx
82implementation of
83.Tn ACPI
84integrates Intel's ACPI Component Architecture
85.Pq Tn ACPI-CA
86for the OS-independent part.
87The
88.Tn ACPI-CA
89provides OS-neutral
90.Tn ACPI
91functionalities such as
92.Tn ACPI
93.Tn BIOS
94table support,
95an
96.Tn ACPI
97event framework and an ACPI Machine Language
98.Pq Tn AML
99interpreter.
100.Pp
101Options:
102.Bl -tag -width ACPI_DSDT_FILE__filename_XX -offset 3n
103.It Dv ACPI_DEBUG
104Enable
105.Tn ACPI
106debugging message outputs.
107.It Dv ACPI_ACTIVATE_DEV
108Determine if the
109.Tn ACPI
110driver should attempt to activate inactive devices.
111The default is off.
112.It Dv ACPI_DSDT_OVERRIDE
113Force a given Differentiated System Description Table
114.Pq Tn DSDT
115instead of the BIOS-supplied version.
116Use
117.Dv ACPI_DSDT_FILE
118to specify a
119.Tn DSDT .
120.It Dv ACPI_DSDT_FILE="filename"
121If
122.Dv ACPI_DSDT_FILE
123is not specified, default to
124.Dq dsdt.hex
125in the build directory.
126.El
127.Sh SYSCTL SUPPORT
128Few
129.Xr sysctl 8
130variables are directly relevant for
131.Nm :
132.Bl -inset -width hw.acpi.supported_state -offset 3n
133.It Ic hw.acpi.root
134is the
135.Tn ACPI
136root pointer.
137.It Ic hw.acpi.supported_states
138is a list of the supported
139.Tn ACPI
140states (see
141.Xr sysctl 7 ) .
142.It Ic machdep.acpi_vbios_reset
143defines the handling of the graphics card.
144The supported values are:
145.Bl -tag -width '2' -offset indent
146.It 0
147No attempt to reset the
148.Tn VGA
149controller will be made.
150.It 1
151Call the
152.Tn VGA
153.Tn BIOS
154when still in real mode.
155This can result in direct reboots.
156In that case, use
157.Sq 2
158or
159.Ic vbetool post
160from the
161.Pa pkgsrc/sysutils/vbetool
162package.
163.It 2
164Call the
165.Tn VGA
166.Tn BIOS
167using the in-kernel x86 emulator.
168.El
169.El
170.Sh SUPPORTED DEVICES
171.Nx
172.Tn ACPI
173supports several machine-dependent and machine-independent devices:
174.Ss Machine-independent devices
175.Bl -tag -width pcdisplay -offset indent -compact
176.It acpiacad
177.Tn ACPI
178AC adapters.
179.It acpibat
180.Tn ACPI
181Control Method Batteries.
182.It acpibut
183.Tn ACPI
184power and sleep buttons.
185.It acpidalb
186.Tn ACPI
187Direction Application Launch Buttons.
188.It acpiec
189.Tn ACPI
190Embedded Controllers.
191.It acpiecdt
192.Tn ACPI
193Embedded Controller Boot Resource Table.
194.It acpilid
195.Tn ACPI
196lid switches.
197.It acpismbus
198.Tn ACPI
199SMBus via Control Method Interface.
200.It acpitz
201.Tn ACPI
202thermal zones.
203.It aiboost
204ASUS AI Booster Hardware monitor.
205.It aibs
206ASUSTeK AI Booster ACPI ATK0110 voltage, temperature and fan sensor.
207.It asus
208ASUS laptop hotkeys.
209.It attimer
210AT Timer.
211.It com
212NS8250-, NS16450-, and NS16550-based serial ports.
213.It fdc
214Floppy disk controllers.
215.It hpet
216High Precision Event Timer.
217.It hpqlb
218HP Quick Launch Buttons.
219.It joy
220Joystick/Game port interface.
221.It lpt
222Standard ISA parallel port interface.
223.It mpu
224Roland MPU-401 (compatible) MIDI UART.
225.It pcppi
226AT-style speaker sound.
227.It thinkpad
228IBM/Lenovo ThinkPad laptop device driver.
229.It ug
230Abit uGuru Hardware monitor.
231.It wb
232Winbond W83L518D Integrated Media Reader.
233.It wss
234Windows Sound System-compatible sound cards based on the AD1848 and compatible chips.
235.It ym
236Yamaha OPL3-SA2 and OPL3-SA3 audio device driver.
237.El
238.Ss i386-dependent devices
239.Bl -tag -width pcdisplay -offset indent -compact
240.It npx
241i386 numeric processing extension coprocessor.
242.It pckbc
243PC keyboard controllers.
244.It sony
245Sony Miscellaneous Controller
246.It spic
247Sony programmable I/O controller.
248.It vald
249Toshiba Libretto device.
250.El
251.Sh DEBUGGING
252The
253.Tn ACPICA
254reference implementation provides a rich
255facility of different debugging methods.
256To ease the use of these,
257.Nx
258provides two
259.Xr sysctl 7
260variables that control the debug output at runtime.
261These are only available if the running kernel has been compiled with the
262.Tn ACPI_DEBUG
263option.
264.Pp
265The
266.Ic hw.acpi.debug_layer
267limits the output to a specific
268.Tn ACPI
269layer and the
270.Ic hw.acpi.debug_level
271controls the debug level.
272Both
273.Xr sysctl 7
274variables are string literals.
275The possible values are:
276.Bl -column -offset indent \
277"ACPI_RESOURCE_COMPONENT     " "ACPI_RESOURCE_COMPONENT     "
278.It Sy LAYER Ta Sy LEVEL
279.It Li ACPI_DEBUG_NONE Ta ACPI_DEBUG_NONE
280.It Li Ta
281.It Li ACPI_UTILITIES Ta ACPI_LV_INIT
282.It Li ACPI_HARDWARE Ta ACPI_LV_DEBUG_OBJECT
283.It Li ACPI_EVENTS Ta ACPI_LV_INFO
284.It Li ACPI_TABLES Ta ACPI_LV_ALL_EXCEPTIONS *
285.It Li ACPI_NAMESPACE Ta
286.It Li ACPI_PARSER Ta ACPI_LV_INIT_NAMES
287.It Li ACPI_DISPATCHER Ta ACPI_LV_PARSE
288.It Li ACPI_EXECUTER Ta ACPI_LV_LOAD
289.It Li ACPI_RESOURCES Ta ACPI_LV_DISPATCH
290.It Li ACPI_CA_DEBUGGER Ta ACPI_LV_EXEC
291.It Li ACPI_OS_SERVICES Ta ACPI_LV_NAMES
292.It Li ACPI_CA_DISASSEMBLER Ta ACPI_LV_OPREGION
293.It Li ACPI_COMPILER Ta ACPI_LV_BFIELD
294.It Li ACPI_TOOLS Ta ACPI_LV_TABLES
295.It Li ACPI_EXAMPLE Ta ACPI_LV_VALUES
296.It Li ACPI_DRIVER Ta ACPI_LV_OBJECTS
297.It Li ACPI_ALL_COMPONENTS * Ta ACPI_LV_RESOURCES
298.It Li Ta ACPI_LV_USER_REQUESTS
299.It Li ACPI_BUS_COMPONENT Ta ACPI_LV_PACKAGE
300.It Li ACPI_ACAD_COMPONENT Ta ACPI_LV_VERBOSITY1 *
301.It Li ACPI_BAT_COMPONENT Ta
302.It Li ACPI_BUTTON_COMPONENT Ta ACPI_LV_ALLOCATIONS
303.It Li APCI_EC_COMPONENT Ta ACPI_LV_FUNCTIONS
304.It Li ACPI_LID_COMPONENT Ta ACPI_LV_OPTIMIZATIONS
305.It Li ACPI_RESOURCE_COMPONENT Ta ACPI_LV_VERBOSITY2 *
306.It Li ACPI_TZ_COMPONENT Ta
307.It Li ACPI_ALL_DRIVERS * Ta ACPI_LV_MUTEX
308.It Li Ta ACPI_LV_THREADS
309.It Li Ta ACPI_LV_IO
310.It Li Ta ACPI_LV_AML_INTERRUPTS
311.It Li "* This is a compound" Ta ACPI_LV_VERBOSITY3 *
312.It Li "  constant, including" Ta
313.It Li "  all previous elements." Ta ACPI_LV_AML_DISASSEMBLE
314.It Li Ta ACPI_LV_VERBOSE_INFO
315.It Li Ta ACPI_LV_FULL_TABLES
316.It Li Ta ACPI_LV_EVENTS
317.It Li Ta ACPI_LV_VERBOSE *
318.El
319.Pp
320In addition, there is
321.Dv ACPI_DEBUG_DEFAULT
322that is used by
323.Tn ACPICA
324as the default debug level.
325It includes
326.Dv ACPI_LV_INIT
327and
328.Dv ACPI_LV_DEBUG_OBJECT .
329.Pp
330The debug layer can be divided into two groups:
331the first one is specific to the
332.Tn ACPICA
333interpreter and the second one contains the internal
334.Tn ACPI
335components of
336.Nx .
337The constant
338.Dv ACPI_ALL_DRIVERS
339includes all
340.Nx
341specific parts.
342.Pp
343The
344.Tn ACPICA
345interpreter uses several debug levels internally,
346but the
347.Nx
348specific parts are typically limited to
349.Dv ACPI_LV_DEBUG_OBJECT
350and
351.Dv ACPI_LV_DEBUG_INFO .
352The debug output can be stopped by setting
353.Ic hw.acpi.debug_level
354to
355.Dv ACPI_DEBUG_NONE .
356.Ss EXAMPLE
357As an example, a driver may have defined the component it belongs to and
358the name of the module:
359.Bd -literal -offset indent
360#define _COMPONENT	ACPI_BUS_COMPONENT
361ACPI_MODULE_NAME	("acpi_example")
362.Ed
363.Pp
364The driver may also utilize the debug facility:
365.Bd -literal -offset indent
366ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Failed to evaluate _STA\\n"));
367.Ed
368.Pp
369With these options the debug message from the
370.Dv ACPI_DEBUG_PRINT
371macro is only visible when
372.Ic hw.acpi.debug_layer
373is either
374.Dv ACPI_BUS_COMPONENT
375or a compound constant including it, and
376.Ic hw.acpi.debug_level
377is
378.Dv ACPI_LV_INFO
379or some constant that includes it.
380Finally, it can be noted that the
381.Tn ACPI
382implementation uses the prefix
383.Dv ACPI_DB ,
384whereas the debug level
385.Xr sysctl 7
386variable is always specified with the prefix
387.Dv ACPI_LV .
388.Sh SEE ALSO
389.Xr acpiacad 4 ,
390.Xr acpibat 4 ,
391.Xr acpibut 4 ,
392.Xr acpidalb 4 ,
393.Xr acpiec 4 ,
394.Xr acpilid 4 ,
395.Xr acpismbus 4 ,
396.Xr acpitz 4 ,
397.Xr aiboost 4 ,
398.Xr aibs 4 ,
399.Xr apm 4 ,
400.Xr attimer 4 ,
401.Xr com 4 ,
402.Xr fdc 4 ,
403.Xr hpqlb 4 ,
404.Xr joy 4 ,
405.Xr lpt 4 ,
406.Xr mpu 4 ,
407.Xr npx 4 ,
408.Xr pci 4 ,
409.Xr pckbc 4 ,
410.Xr pcppi 4 ,
411.Xr sony 4 ,
412.Xr spic 4 ,
413.Xr thinkpad 4 ,
414.Xr ug 4 ,
415.Xr vald 4 ,
416.Xr wb 4 ,
417.Xr wss 4 ,
418.Xr ym 4 ,
419.Xr acpidump 8 ,
420.Xr amldb 8
421.Rs
422.%A Hewlett-Packard Corporation
423.%A Intel Corporation
424.%A Microsoft Corporation
425.%A Phoenix Technologies Ltd.
426.%A Toshiba Corporation
427.%T Advanced Configuration and Power Interface Specification
428.%N Revision 4.0
429.%D June 16, 2009
430.%U http://www.acpi.info/spec.htm
431.Re
432.Rs
433.%A Intel Corporation
434.%T ACPI Component Architecture,
435.%T Programmer Reference,
436.%T OS-Independent Subsystem, Debugger, and Utilities
437.%N Revision 1.27
438.%D January 20, 2010
439.%U http://www.acpica.org/download/acpica-reference.pdf
440.Re
441.Rs
442.%A Joerg Sonnenberger
443.%A Jared D. McNeill
444.%T Sleeping Beauty - NetBSD on Modern Laptops
445.%D February 3, 2008
446.%O Proceedings of AsiaBSDCon 2008
447.%P pp. 127-134
448.Re
449.Sh HISTORY
450The
451.Nm
452driver
453appeared in
454.Nx 1.6 .
455.Sh BUGS
456Most of the
457.Tn ACPI
458power management functionalities are not implemented.
459