xref: /freebsd/share/man/man4/acpi.4 (revision f64a0a56d49a94d0f8fbe94add3432468f15c6fb)
1b6695bd0SMike Smith.\"
2b6695bd0SMike Smith.\" Copyright (c) 2001 Michael Smith
3b6695bd0SMike Smith.\" All rights reserved.
4b6695bd0SMike Smith.\"
5b6695bd0SMike Smith.\" Redistribution and use in source and binary forms, with or without
6b6695bd0SMike Smith.\" modification, are permitted provided that the following conditions
7b6695bd0SMike Smith.\" are met:
8b6695bd0SMike Smith.\" 1. Redistributions of source code must retain the above copyright
9b6695bd0SMike Smith.\"    notice, this list of conditions and the following disclaimer.
10b6695bd0SMike Smith.\" 2. Redistributions in binary form must reproduce the above copyright
11b6695bd0SMike Smith.\"    notice, this list of conditions and the following disclaimer in the
12b6695bd0SMike Smith.\"    documentation and/or other materials provided with the distribution.
13b6695bd0SMike Smith.\"
14b6695bd0SMike Smith.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15b6695bd0SMike Smith.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16b6695bd0SMike Smith.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17b6695bd0SMike Smith.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18b6695bd0SMike Smith.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19b6695bd0SMike Smith.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20b6695bd0SMike Smith.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21b6695bd0SMike Smith.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22b6695bd0SMike Smith.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23b6695bd0SMike Smith.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24b6695bd0SMike Smith.\" SUCH DAMAGE.
25b6695bd0SMike Smith.\"
26b6695bd0SMike Smith.\" $FreeBSD$
27b6695bd0SMike Smith.\"
28b6695bd0SMike Smith.Dd July 2, 2001
29b6695bd0SMike Smith.Dt ACPI 4
30b6695bd0SMike Smith.Os
31b6695bd0SMike Smith.Sh NAME
32b6695bd0SMike Smith.Nm acpi
33b6695bd0SMike Smith.Nd Advanced Configuration and Power Management support
34b6695bd0SMike Smith.Sh SYNOPSIS
35b6695bd0SMike Smith.Cd device acpica
36b6695bd0SMike Smith.Pp
37b6695bd0SMike Smith.Cd options ACPI_DEBUG
38b6695bd0SMike Smith.Sh DESCRIPTION
39b6695bd0SMike SmithThe
40b6695bd0SMike Smith.Nm
41b6695bd0SMike Smithdriver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI
42b6695bd0SMike Smithstandard.
43b6695bd0SMike SmithThis support includes platform hardware discovery (superseding the
44b6695bd0SMike SmithPnP and PCI BIOS), as well as power management (superseding APM) and
45b6695bd0SMike Smithother features.
46b6695bd0SMike SmithACPI core support is provided by the ACPI CA reference implementation
47b6695bd0SMike Smithfrom Intel.
48d1f717d1SMike Smith.Pp
49d1f717d1SMike SmithNote that the
50d1f717d1SMike Smith.Nm
51d1f717d1SMike Smithdriver is automatically loaded by the bootloader, and should not normally
52d1f717d1SMike Smithbe compiled into the kernel.
53b6695bd0SMike Smith.Sh ENVIRONMENT
54b6695bd0SMike SmithThis support is still experimental, and thus there are many debugging
55b6695bd0SMike Smithand tuning options which are managed via the kernel environment
5687b6284aSRuslan Ermilovspace, and set in the
5787b6284aSRuslan Ermilov.Xr loader 8
5887b6284aSRuslan Ermilovbefore booting the kernel.
59b6695bd0SMike Smith.Pp
60b6695bd0SMike SmithDebugging is separated between layers and levels, where a layer is
61b6695bd0SMike Smitha portion of the ACPI subsystem, and a level is a particular kind
62b6695bd0SMike Smithof debugging output.
63b6695bd0SMike Smith.Pp
64b6695bd0SMike SmithBoth layers and levels are specified as a whitespace-separated list of
65b6695bd0SMike Smithtokens, with layers listed in
66b6695bd0SMike Smith.Va debug.acpi.layer
67b6695bd0SMike Smithand levels in
68b6695bd0SMike Smith.Va debug.acpi.level .
69b6695bd0SMike SmithThe supported layers are:
7087b6284aSRuslan Ermilov.Pp
7187b6284aSRuslan Ermilov.Bl -item -offset indent -compact
72b6695bd0SMike Smith.It
7387b6284aSRuslan Ermilov.Li ACPI_UTILITIES
74b6695bd0SMike Smith.It
7587b6284aSRuslan Ermilov.Li ACPI_HARDWARE
76b6695bd0SMike Smith.It
7787b6284aSRuslan Ermilov.Li ACPI_EVENTS
78b6695bd0SMike Smith.It
7987b6284aSRuslan Ermilov.Li ACPI_TABLES
80b6695bd0SMike Smith.It
8187b6284aSRuslan Ermilov.Li ACPI_NAMESPACE
82b6695bd0SMike Smith.It
8387b6284aSRuslan Ermilov.Li ACPI_PARSER
84b6695bd0SMike Smith.It
8587b6284aSRuslan Ermilov.Li ACPI_DISPATCHER
86b6695bd0SMike Smith.It
8787b6284aSRuslan Ermilov.Li ACPI_EXECUTER
88b6695bd0SMike Smith.It
8987b6284aSRuslan Ermilov.Li ACPI_RESOURCES
90b6695bd0SMike Smith.It
91d1f717d1SMike Smith.Li ACPI_DEBUGGER
92d1f717d1SMike Smith.It
93d1f717d1SMike Smith.Li ACPI_OS_SERVICES
94b6695bd0SMike Smith.It
9587b6284aSRuslan Ermilov.Li ACPI_BUS
96b6695bd0SMike Smith.It
97d1f717d1SMike Smith.Li ACPI_SYSTEM
98d1f717d1SMike Smith.It
9987b6284aSRuslan Ermilov.Li ACPI_POWER
100b6695bd0SMike Smith.It
10187b6284aSRuslan Ermilov.Li ACPI_EC
102b6695bd0SMike Smith.It
10387b6284aSRuslan Ermilov.Li ACPI_AC_ADAPTER
104b6695bd0SMike Smith.It
10587b6284aSRuslan Ermilov.Li ACPI_BATTERY
106b6695bd0SMike Smith.It
10787b6284aSRuslan Ermilov.Li ACPI_BUTTON
108b6695bd0SMike Smith.It
109d1f717d1SMike Smith.Li ACPI_PROCESSOR
110b6695bd0SMike Smith.It
11187b6284aSRuslan Ermilov.Li ACPI_THERMAL
112b6695bd0SMike Smith.It
113d1f717d1SMike Smith.Li ACPI_FAN
114b6695bd0SMike Smith.It
11587b6284aSRuslan Ermilov.Li ACPI_ALL_COMPONENTS
116b6695bd0SMike Smith.El
11787b6284aSRuslan Ermilov.Pp
118b6695bd0SMike SmithThe supported levels are:
11987b6284aSRuslan Ermilov.Pp
12087b6284aSRuslan Ermilov.Bl -item -offset indent -compact
121b6695bd0SMike Smith.It
122d1f717d1SMike Smith.Li ACPI_LV_OK
123b6695bd0SMike Smith.It
124d1f717d1SMike Smith.Li ACPI_LV_INFO
125b6695bd0SMike Smith.It
126d1f717d1SMike Smith.Li ACPI_LV_WARN
127b6695bd0SMike Smith.It
128d1f717d1SMike Smith.Li ACPI_LV_ERROR
129b6695bd0SMike Smith.It
130d1f717d1SMike Smith.Li ACPI_LV_FATAL
131b6695bd0SMike Smith.It
132d1f717d1SMike Smith.Li ACPI_LV_DEBUG_OBJECT
133b6695bd0SMike Smith.It
134d1f717d1SMike Smith.Li ACPI_LV_ALL_EXCEPTIONS
135b6695bd0SMike Smith.It
136d1f717d1SMike Smith.Li ACPI_LV_THREADS
137b6695bd0SMike Smith.It
138d1f717d1SMike Smith.Li ACPI_LV_PARSE
139b6695bd0SMike Smith.It
140d1f717d1SMike Smith.Li ACPI_LV_DISPATCH
141b6695bd0SMike Smith.It
142d1f717d1SMike Smith.Li ACPI_LV_LOAD
143b6695bd0SMike Smith.It
144d1f717d1SMike Smith.Li ACPI_LV_EXEC
145b6695bd0SMike Smith.It
146d1f717d1SMike Smith.Li ACPI_LV_NAMES
147b6695bd0SMike Smith.It
148d1f717d1SMike Smith.Li ACPI_LV_OPREGION
149b6695bd0SMike Smith.It
150d1f717d1SMike Smith.Li ACPI_LV_BFIELD
151b6695bd0SMike Smith.It
152d1f717d1SMike Smith.Li ACPI_LV_TRASH
153b6695bd0SMike Smith.It
154d1f717d1SMike Smith.Li ACPI_LV_TABLES
155b6695bd0SMike Smith.It
156d1f717d1SMike Smith.Li ACPI_LV_FUNCTIONS
157b6695bd0SMike Smith.It
158d1f717d1SMike Smith.Li ACPI_LV_VALUES
159b6695bd0SMike Smith.It
160d1f717d1SMike Smith.Li ACPI_LV_OBJECTS
161b6695bd0SMike Smith.It
162d1f717d1SMike Smith.Li ACPI_LV_ALLOCATIONS
163b6695bd0SMike Smith.It
164d1f717d1SMike Smith.Li ACPI_LV_RESOURCES
165b6695bd0SMike Smith.It
166d1f717d1SMike Smith.Li ACPI_LV_IO
167b6695bd0SMike Smith.It
168d1f717d1SMike Smith.Li ACPI_LV_INTERRUPTS
169b6695bd0SMike Smith.It
170d1f717d1SMike Smith.Li ACPI_LV_USER_REQUESTS
171b6695bd0SMike Smith.It
172d1f717d1SMike Smith.Li ACPI_LV_PACKAGE
173b6695bd0SMike Smith.It
174d1f717d1SMike Smith.Li ACPI_LV_MUTEX
175b6695bd0SMike Smith.It
176d1f717d1SMike Smith.Li ACPI_LV_INIT
177b6695bd0SMike Smith.It
178d1f717d1SMike Smith.Li ACPI_LV_ALL
179b6695bd0SMike Smith.It
180d1f717d1SMike Smith.Li ACPI_DB_AML_DISASSEMBLE
181b6695bd0SMike Smith.It
182d1f717d1SMike Smith.Li ACPI_DB_VERBOSE_INFO
183b6695bd0SMike Smith.It
184d1f717d1SMike Smith.Li ACPI_DB_FULL_TABLES
185b6695bd0SMike Smith.It
186d1f717d1SMike Smith.Li ACPI_DB_EVENTS
187b6695bd0SMike Smith.It
188d1f717d1SMike Smith.Li ACPI_DB_VERBOSE
189b6695bd0SMike Smith.El
190b6695bd0SMike Smith.Pp
191b6695bd0SMike SmithSelection of the appropriate layer and level values is important
192b6695bd0SMike Smithto avoid massive amounts of debugging output.
193b6695bd0SMike SmithCheck the code to see which you need.
194b6695bd0SMike Smith.Pp
195b6695bd0SMike SmithDebugging output by the ACPI CA subsystem is prefixed with the
196b6695bd0SMike Smithmodule name in lowercase, followed by a source line number.
19787b6284aSRuslan ErmilovOutput from the
19887b6284aSRuslan Ermilov.Fx Ns -local
19987b6284aSRuslan Ermilovcode follows the same format, but
200b6695bd0SMike Smiththe module name is uppercased.
201b6695bd0SMike Smith.Pp
202b6695bd0SMike SmithThe
203b6695bd0SMike Smith.Nm
204b6695bd0SMike Smithdriver comprises a set of drivers, which may be selectively disabled
205b6695bd0SMike Smithin case of problems.
206b6695bd0SMike SmithTo disable a sub-driver, list it in the kernel
207b6695bd0SMike Smithenvironment variable
208b6695bd0SMike Smith.Va debug.acpi.disable .
209b6695bd0SMike Smith.Pp
210b6695bd0SMike SmithACPI sub-devices and features that can be disabled:
211b6695bd0SMike Smith.Bl -tag -width processor
21287b6284aSRuslan Ermilov.It Li bus
213b6695bd0SMike Smith.Pq Vt feature
214b6695bd0SMike SmithProbes and attaches subdevices.
215b6695bd0SMike SmithDisabling will avoid scanning the ACPI namespace entirely.
21687b6284aSRuslan Ermilov.It Li children
217b6695bd0SMike Smith.Pq Vt feature
218b6695bd0SMike SmithAttaches standard ACPI sub-drivers and devices enumerated in the
219b6695bd0SMike SmithACPI namespace.
220b6695bd0SMike SmithDisabling this has a similar effect to disabling
22187b6284aSRuslan Ermilov.Dq Li bus ,
222b6695bd0SMike Smithexcept that the
223b6695bd0SMike SmithACPI namespace will still be scanned.
22487b6284aSRuslan Ermilov.It Li button
225b6695bd0SMike Smith.Pq Vt device
226b6695bd0SMike SmithSupports ACPI button devices (typically power and sleep buttons).
22787b6284aSRuslan Ermilov.It Li ec
228b6695bd0SMike Smith.Pq Vt device
229b6695bd0SMike SmithSupports the ACPI Embedded Controller interface, used to
230b6695bd0SMike Smithcommunicate with embedded platform controllers.
23187b6284aSRuslan Ermilov.It Li isa
232b6695bd0SMike Smith.Pq Vt device
233b6695bd0SMike SmithSupports an ISA bus bridge defined in the ACPI namespace,
234b6695bd0SMike Smithtypically as a child of a PCI bus.
23587b6284aSRuslan Ermilov.It Li lid
236b6695bd0SMike Smith.Pq Vt device
237b6695bd0SMike SmithSupports an ACPI laptop lid switch, which typically puts a
238b6695bd0SMike Smithsystem to sleep.
23987b6284aSRuslan Ermilov.It Li pci
240b6695bd0SMike Smith.Pq Vt device
241b6695bd0SMike SmithSupports Host to PCI bridges.
24287b6284aSRuslan Ermilov.It Li processor
243b6695bd0SMike Smith.Pq Vt device
244b6695bd0SMike SmithSupports CPU power-saving and speed-setting functions.
24587b6284aSRuslan Ermilov.It Li thermal
246b6695bd0SMike Smith.Pq Vt device
247b6695bd0SMike SmithSupports system cooling and heat management.
24887b6284aSRuslan Ermilov.It Li timer
249b6695bd0SMike Smith.Pq Vt device
250b6695bd0SMike SmithImplements a timecounter using the ACPI fixed-frequency timer.
251b6695bd0SMike Smith.El
252b6695bd0SMike Smith.Pp
253b6695bd0SMike SmithIt is also possible to avoid portions of the ACPI namespace which
254b6695bd0SMike Smithmay be causing problems, by listing the full path of the root of
255b6695bd0SMike Smiththe region to be avoided in the kernel environment variable
256b6695bd0SMike Smith.Va debug.acpi.avoid .
257b6695bd0SMike SmithThe object and all of its children will be ignored during the
25887b6284aSRuslan Ermilovbus/children scan of the namespace.
25987b6284aSRuslan ErmilovThe ACPI CA code will still
260b6695bd0SMike Smithknow about the avoided region.
261f0da5f56STakanori Watanabe.Sh OVERRIDING YOUR BIOS BYTECODE
262f0da5f56STakanori WatanabeACPI interprets bytecode named AML, ACPI Machine Language, provided by the BIOS
263a627f55aSRuslan Ermilovvendor as a memory image at boot time.
264a627f55aSRuslan ErmilovSometimes, the AML code contains
265a627f55aSRuslan Ermilova problem that does not appear in the Microsoft implementation.
266f0da5f56STakanori WatanabeSo we provide a way to override it with your own AML code.
267f0da5f56STakanori Watanabe.Pp
268f0da5f56STakanori WatanabeIn order to load your AML code,
269f0da5f56STakanori Watanabeyou must edit
270f0da5f56STakanori Watanabe.Pa /boot/loader.conf
271f0da5f56STakanori Watanabeand
272f0da5f56STakanori Watanabeinclude the following lines.
273f0da5f56STakanori Watanabe.Bd -literal -offset indent
274f0da5f56STakanori Watanabeacpi_dsdt_load="YES"
275f0da5f56STakanori Watanabeacpi_dsdt_name="/boot/acpi_dsdt.aml" #You may change the name.
276f0da5f56STakanori Watanabe.Ed
277f0da5f56STakanori Watanabe.Pp
278a627f55aSRuslan ErmilovIn order to prepare your AML code, you will need the
279a627f55aSRuslan Ermilov.Xr acpidump 8
280a627f55aSRuslan Ermilovand
281f0da5f56STakanori Watanabe.Xr iasl 1
282a627f55aSRuslan Ermilovutilities from the
283a627f55aSRuslan Ermilov.Pa devel/acpicatools
284a627f55aSRuslan Ermilovport, and some ACPI knowledge.
285b6695bd0SMike Smith.Sh COMPATIBILITY
286b6695bd0SMike SmithACPI is only found/supported on Intel platforms (i386/IA32 and IA64).
287b6695bd0SMike Smith.Sh SEE ALSO
288f0da5f56STakanori Watanabe.Xr loader.conf 5 ,
289f64a0a56SRobert Watson.Xr acpiconf 8 ,
290f0da5f56STakanori Watanabe.Xr acpidump 8 ,
291f64a0a56SRobert Watson.Xr config 8
292f0da5f56STakanori Watanabe.Rs
293a627f55aSRuslan Ermilov.%A "Compaq Computer Corporation"
294a627f55aSRuslan Ermilov.%A "Intel Corporation"
295a627f55aSRuslan Ermilov.%A "Microsoft Corporation"
296a627f55aSRuslan Ermilov.%A "Phoenix Technologies Ltd."
297a627f55aSRuslan Ermilov.%A "Toshiba Corporation"
298f0da5f56STakanori Watanabe.%D July 27 2000
299f0da5f56STakanori Watanabe.%T "Advanced Configuration and Power Interface Specification"
300f0da5f56STakanori Watanabe.%O http://acpi.info/spec.htm
301f0da5f56STakanori Watanabe.Re
30287b6284aSRuslan Ermilov.Sh AUTHORS
30387b6284aSRuslan Ermilov.An -nosplit
304b6695bd0SMike SmithThe ACPI CA subsystem is developed and maintained by
305b6695bd0SMike SmithIntel Architecture Labs.
306b6695bd0SMike Smith.Pp
307b6695bd0SMike SmithThe following people made notable contributions to the ACPI subsystem
308b6695bd0SMike Smithin
309b6695bd0SMike Smith.Fx :
31087b6284aSRuslan Ermilov.An Michael Smith Aq msmith@FreeBSD.org ,
31187b6284aSRuslan Ermilov.An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
31287b6284aSRuslan Ermilov.An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
313b6695bd0SMike Smith.An Munehiro Matsuda ,
314b6695bd0SMike Smiththe ACPI-jp mailing list at
31587b6284aSRuslan Ermilov.Aq acpi-jp@jp.FreeBSD.org ,
316b6695bd0SMike Smithand many other contributors.
317b6695bd0SMike Smith.Pp
318b6695bd0SMike SmithThis manual page was written by
31987b6284aSRuslan Ermilov.An Michael Smith Aq msmith@FreeBSD.org .
320b6695bd0SMike Smith.Sh BUGS
321d1f717d1SMike SmithIf the
322d1f717d1SMike Smith.Nm
323d1f717d1SMike Smithdriver is loaded as a module when it is already linked as part of the
324d1f717d1SMike Smithkernel, odd things may happen.
325