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