xref: /freebsd/share/man/man4/acpi.4 (revision 718a5d6abd96f26582a8119f6bb1f61656243890)
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
3509f84dd1SRuslan Ermilov.Cd "device acpi"
36b6695bd0SMike Smith.Pp
3709f84dd1SRuslan Ermilov.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
2024e3148f4SWarner LoshTo disable the
2034e3148f4SWarner Losh.Nm
2044e3148f4SWarner Loshdriver completely, set the kernel environment variable
2054e3148f4SWarner Losh.Va hint.acpi.0.disabled
20609f84dd1SRuslan Ermilovto 1.
2074e3148f4SWarner LoshSome i386 machines totally fail to operate with some or all of ACPI disabled.
2084e3148f4SWarner LoshOther i386 machines fail with ACPI enabled.
2094e3148f4SWarner LoshNon-i386 platforms do not support operating systems which do not use ACPI.
2104e3148f4SWarner LoshDisabling all or part of ACPI on non-i386 platforms may result in a
2114e3148f4SWarner Loshnon-functional system.
2124e3148f4SWarner Losh.Pp
213b6695bd0SMike SmithThe
214b6695bd0SMike Smith.Nm
215b6695bd0SMike Smithdriver comprises a set of drivers, which may be selectively disabled
216b6695bd0SMike Smithin case of problems.
217b6695bd0SMike SmithTo disable a sub-driver, list it in the kernel
218b6695bd0SMike Smithenvironment variable
219b6695bd0SMike Smith.Va debug.acpi.disable .
220b6695bd0SMike Smith.Pp
221b6695bd0SMike SmithACPI sub-devices and features that can be disabled:
222ddd74b00STom Rhodes.Bl -tag -width children
22387b6284aSRuslan Ermilov.It Li bus
224b6695bd0SMike Smith.Pq Vt feature
225b6695bd0SMike SmithProbes and attaches subdevices.
226b6695bd0SMike SmithDisabling will avoid scanning the ACPI namespace entirely.
22787b6284aSRuslan Ermilov.It Li children
228b6695bd0SMike Smith.Pq Vt feature
229b6695bd0SMike SmithAttaches standard ACPI sub-drivers and devices enumerated in the
230b6695bd0SMike SmithACPI namespace.
231b6695bd0SMike SmithDisabling this has a similar effect to disabling
23287b6284aSRuslan Ermilov.Dq Li bus ,
233b6695bd0SMike Smithexcept that the
234b6695bd0SMike SmithACPI namespace will still be scanned.
23587b6284aSRuslan Ermilov.It Li button
236b6695bd0SMike Smith.Pq Vt device
237b6695bd0SMike SmithSupports ACPI button devices (typically power and sleep buttons).
23887b6284aSRuslan Ermilov.It Li ec
239b6695bd0SMike Smith.Pq Vt device
240b6695bd0SMike SmithSupports the ACPI Embedded Controller interface, used to
241b6695bd0SMike Smithcommunicate with embedded platform controllers.
24287b6284aSRuslan Ermilov.It Li isa
243b6695bd0SMike Smith.Pq Vt device
244b6695bd0SMike SmithSupports an ISA bus bridge defined in the ACPI namespace,
245b6695bd0SMike Smithtypically as a child of a PCI bus.
24687b6284aSRuslan Ermilov.It Li lid
247b6695bd0SMike Smith.Pq Vt device
248b6695bd0SMike SmithSupports an ACPI laptop lid switch, which typically puts a
249b6695bd0SMike Smithsystem to sleep.
25087b6284aSRuslan Ermilov.It Li pci
251b6695bd0SMike Smith.Pq Vt device
252b6695bd0SMike SmithSupports Host to PCI bridges.
253ddd74b00STom Rhodes.It Li cpu
254b6695bd0SMike Smith.Pq Vt device
255b6695bd0SMike SmithSupports CPU power-saving and speed-setting functions.
25687b6284aSRuslan Ermilov.It Li thermal
257b6695bd0SMike Smith.Pq Vt device
258b6695bd0SMike SmithSupports system cooling and heat management.
25987b6284aSRuslan Ermilov.It Li timer
260b6695bd0SMike Smith.Pq Vt device
261b6695bd0SMike SmithImplements a timecounter using the ACPI fixed-frequency timer.
262b6695bd0SMike Smith.El
263b6695bd0SMike Smith.Pp
264b6695bd0SMike SmithIt is also possible to avoid portions of the ACPI namespace which
265b6695bd0SMike Smithmay be causing problems, by listing the full path of the root of
266b6695bd0SMike Smiththe region to be avoided in the kernel environment variable
267b6695bd0SMike Smith.Va debug.acpi.avoid .
268b6695bd0SMike SmithThe object and all of its children will be ignored during the
26987b6284aSRuslan Ermilovbus/children scan of the namespace.
27087b6284aSRuslan ErmilovThe ACPI CA code will still
271b6695bd0SMike Smithknow about the avoided region.
272f0da5f56STakanori Watanabe.Sh OVERRIDING YOUR BIOS BYTECODE
273f0da5f56STakanori WatanabeACPI interprets bytecode named AML, ACPI Machine Language, provided by the BIOS
274a627f55aSRuslan Ermilovvendor as a memory image at boot time.
275a627f55aSRuslan ErmilovSometimes, the AML code contains
276a627f55aSRuslan Ermilova problem that does not appear in the Microsoft implementation.
277f0da5f56STakanori WatanabeSo we provide a way to override it with your own AML code.
278f0da5f56STakanori Watanabe.Pp
279f0da5f56STakanori WatanabeIn order to load your AML code,
280f0da5f56STakanori Watanabeyou must edit
281f0da5f56STakanori Watanabe.Pa /boot/loader.conf
282f0da5f56STakanori Watanabeand
283f0da5f56STakanori Watanabeinclude the following lines.
284f0da5f56STakanori Watanabe.Bd -literal -offset indent
285f0da5f56STakanori Watanabeacpi_dsdt_load="YES"
286f0da5f56STakanori Watanabeacpi_dsdt_name="/boot/acpi_dsdt.aml" #You may change the name.
287f0da5f56STakanori Watanabe.Ed
288f0da5f56STakanori Watanabe.Pp
289a627f55aSRuslan ErmilovIn order to prepare your AML code, you will need the
290a627f55aSRuslan Ermilov.Xr acpidump 8
291a627f55aSRuslan Ermilovand
292f0da5f56STakanori Watanabe.Xr iasl 1
293a627f55aSRuslan Ermilovutilities from the
294a627f55aSRuslan Ermilov.Pa devel/acpicatools
295a627f55aSRuslan Ermilovport, and some ACPI knowledge.
2967c8cd16cSWarner Losh.Sh TUNABLES
29709f84dd1SRuslan Ermilov.Bl -tag -width indent
29809f84dd1SRuslan Ermilov.It Va acpi_dsdt_load
29909f84dd1SRuslan ErmilovEnables loading of a custom ACPI DSDT.
30009f84dd1SRuslan Ermilov.It Va acpi_dsdt_name
30191113bc8SNate LawsonName of the DSDT table to load, if loading is enabled.
30209f84dd1SRuslan Ermilov.It Va debug.acpi.disable
3037c8cd16cSWarner LoshSelectively disables portions of ACPI for debugging purposes.
30409f84dd1SRuslan Ermilov.It Va hint.acpi.0.disabled
30509f84dd1SRuslan ErmilovDisables all of ACPI.
30609f84dd1SRuslan Ermilov.It Va hw.acpi.cpu.performance_speed
3077c8cd16cSWarner LoshSets the speed of the CPU, if it supports multiple speeds, while in
3087c8cd16cSWarner Loshthe performance power profile.
30909f84dd1SRuslan Ermilov.It Va hw.acpi.cpu.economy_speed
3107c8cd16cSWarner LoshSets the speed of the CPU, if it supports multiple speeds, while in
3117c8cd16cSWarner Loshthe economy power profile.
312a329ebcaSNate Lawson.It Va hw.acpi.ec.poll_timeout
313a329ebcaSNate LawsonDelay in milliseconds to wait for the EC to respond.  Try increasing this
314a329ebcaSNate Lawsonnumber if you get the error
315a329ebcaSNate Lawson.Er AE_NO_HARDWARE_RESPONSE .
316718a5d6aSNate Lawson.It Va hw.acpi.os_name
317718a5d6aSNate LawsonSome systems' ASL may have problems because they look for names
318718a5d6aSNate Lawsonof Microsoft operating systems.  This tunable overrides the
319718a5d6aSNate Lawsondefault value of "FreeBSD".
32009f84dd1SRuslan Ermilov.It Va hw.acpi.pci.link.%d.%d.%d.irq
3217c8cd16cSWarner LoshOverride the interrupt to use.
32209f84dd1SRuslan Ermilov.It Va hw.acpi.verbose
3237c8cd16cSWarner LoshTurn on verbose debugging information about what ACPI is doing.
3247c8cd16cSWarner Losh.El
325b6695bd0SMike Smith.Sh COMPATIBILITY
3267c8cd16cSWarner LoshACPI is only found/supported on i386/ia32, ia64 and amd64.
327b6695bd0SMike Smith.Sh SEE ALSO
328f0da5f56STakanori Watanabe.Xr loader.conf 5 ,
329f64a0a56SRobert Watson.Xr acpiconf 8 ,
330f0da5f56STakanori Watanabe.Xr acpidump 8 ,
331f64a0a56SRobert Watson.Xr config 8
332f0da5f56STakanori Watanabe.Rs
333a627f55aSRuslan Ermilov.%A "Compaq Computer Corporation"
334a627f55aSRuslan Ermilov.%A "Intel Corporation"
335a627f55aSRuslan Ermilov.%A "Microsoft Corporation"
336a627f55aSRuslan Ermilov.%A "Phoenix Technologies Ltd."
337a627f55aSRuslan Ermilov.%A "Toshiba Corporation"
338f0da5f56STakanori Watanabe.%D July 27 2000
339f0da5f56STakanori Watanabe.%T "Advanced Configuration and Power Interface Specification"
340f0da5f56STakanori Watanabe.%O http://acpi.info/spec.htm
341f0da5f56STakanori Watanabe.Re
34287b6284aSRuslan Ermilov.Sh AUTHORS
34387b6284aSRuslan Ermilov.An -nosplit
344b6695bd0SMike SmithThe ACPI CA subsystem is developed and maintained by
345b6695bd0SMike SmithIntel Architecture Labs.
346b6695bd0SMike Smith.Pp
347b6695bd0SMike SmithThe following people made notable contributions to the ACPI subsystem
348b6695bd0SMike Smithin
349b6695bd0SMike Smith.Fx :
350718a5d6aSNate Lawson.An Michael Smith ,
35187b6284aSRuslan Ermilov.An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
35287b6284aSRuslan Ermilov.An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
353b6695bd0SMike Smith.An Munehiro Matsuda ,
354718a5d6aSNate Lawson.An Nate Lawson ,
355b6695bd0SMike Smiththe ACPI-jp mailing list at
35687b6284aSRuslan Ermilov.Aq acpi-jp@jp.FreeBSD.org ,
357b6695bd0SMike Smithand many other contributors.
358b6695bd0SMike Smith.Pp
359b6695bd0SMike SmithThis manual page was written by
36087b6284aSRuslan Ermilov.An Michael Smith Aq msmith@FreeBSD.org .
361b6695bd0SMike Smith.Sh BUGS
362d1f717d1SMike SmithIf the
363d1f717d1SMike Smith.Nm
364d1f717d1SMike Smithdriver is loaded as a module when it is already linked as part of the
365d1f717d1SMike Smithkernel, odd things may happen.
366