Bring in long-forgotten man pages for ACPI components currently available
[dragonfly.git] / share / man / man4 / acpi.4
CommitLineData
68fb0c66
YT
1.\"
2.\" Copyright (c) 2001 Michael Smith
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.50 2005/02/23 07:23:35 trhodes Exp $
27.\" $DragonFly: src/share/man/man4/acpi.4,v 1.1 2005/04/06 03:25:46 y0netan1 Exp $
28.\"
29.Dd February 13, 2005
30.Dt ACPI 4
31.Os
32.Sh NAME
33.Nm acpi
34.Nd Advanced Configuration and Power Management support
35.Sh SYNOPSIS
36.Cd "device acpi"
37.Pp
38.Cd "options ACPI_DEBUG"
39.Sh DESCRIPTION
40The
41.Nm
42driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI
43standard.
44This support includes platform hardware discovery (superseding the
45PnP and PCI BIOS), as well as power management (superseding APM) and
46other features.
47ACPI core support is provided by the ACPI CA reference implementation
48from Intel.
49.Pp
50Note that the
51.Nm
52driver is automatically loaded by the
53.Xr loader 8 ,
54and should only be
55compiled into the kernel on platforms where ACPI is mandatory.
56.Sh SYSCTLS
57The
58.Nm
59driver is intended to provide power management without user intervention.
60Thus, some of these sysctls are controlled automatically by the
61.Pa power_profile
62.Xr rc 8
63script, which can be configured via
64.Xr rc.conf 5 .
65If values are specified manually, they may be overridden.
66.Bl -tag -width indent
67.It Va hw.acpi.cpu.cx_usage
68Debugging information listing the percent of total usage for each sleep state.
69The values are reset when
70.Va hw.acpi.cpu.cx_lowest
71is modified.
72.It Va hw.acpi.cpu.cx_lowest
73Lowest Cx state to use for idling the CPU.
74A scheduling algorithm will select states between C1 and this setting
75as system load dictates.
76To enable ACPI CPU idling control,
77.Va machdep.cpu_idle_hlt
78must be set to 1.
79.It Va hw.acpi.cpu.cx_supported
80List of supported CPU idle states and their transition latency
81in microseconds.
82Each state has a type (e.g., C2).
83C1 is equivalent to the ia32 HLT instruction, C2 provides a deeper
84sleep with the same semantics, and C3 provides the deepest sleep
85but additionally requires bus mastering to be disabled.
86States greater than C3 provide even more power savings with the same
87semantics as the C3 state.
88Deeper sleeps provide more power savings but increased transition
89latency when an interrupt occurs.
90.El
91.Sh TUNABLES
92Tunables can be set at the
93.Xr loader 8
94prompt before booting the kernel or stored in
95.Pa /boot/loader.conf .
96.Bl -tag -width indent
97.It Va acpi_dsdt_load
98Enables loading of a custom ACPI DSDT.
99.It Va acpi_dsdt_name
100Name of the DSDT table to load, if loading is enabled.
101.It Va debug.acpi.disabled
102Selectively disables portions of ACPI for debugging purposes.
103.It Va debug.acpi.quirks
104Override any automatic quirks completely.
105.It Va hint.acpi.0.disabled
106Set this to 1 to disable all of ACPI.
107If ACPI has been disabled on your system due to a blacklist entry for your
108BIOS, you can set this to 0 to re-enable ACPI for testing.
109.It Va hw.acpi.ec.poll_timeout
110Delay in milliseconds to wait for the EC to respond.
111Try increasing this number if you get the error
112.Qq Li AE_NO_HARDWARE_RESPONSE .
113.It Va hw.acpi.host_mem_start
114Override the assumed memory starting address for PCI host bridges.
115.It Va hw.acpi.pci.link.%d.%d.%d.irq
116Override the interrupt to use.
117.It Va hw.acpi.reset_video
118Enables calling the VESA reset BIOS vector on the resume path.
119Some graphic chips have problems such as LCD white-out after resume.
120Try setting this to 0 if this causes problems for you.
121.It Va hw.acpi.serialize_methods
122Allow override of whether methods execute in parallel or not.
123Enable this for serial behavior, which fixes
124.Qq Li AE_ALREADY_EXISTS
125errors for
126AML that really cannot handle parallel method execution.
127It is off by default since this breaks recursive methods and some IBMs use
128such code.
129.It Va hw.acpi.verbose
130Turn on verbose debugging information about what ACPI is doing.
131.El
132.Sh DISABLING ACPI
133Since ACPI support on different platforms varies greatly, there are many
134debugging and tuning options available.
135.Pp
136For machines known not to work with
137.Nm
138enabled, there is a BIOS blacklist.
139Currently, the blacklist only controls whether
140.Nm
141should be disabled or not.
142In the future, it will have more granularity to control features (the
143infrastructure for that is already there).
144.Pp
145To enable
146.Nm
147(for debugging purposes, etc.) on machines that are on the blacklist, set the
148kernel environment variable
149.Va hint.acpi.0.disabled
150to 0.
151Before trying this, consider updating your BIOS to a more recent version that
152may be compatible with ACPI.
153.Pp
154To disable the
155.Nm
156driver completely, set the kernel environment variable
157.Va hint.acpi.0.disabled
158to 1.
159.Pp
160Some i386 machines totally fail to operate with some or all of ACPI disabled.
161Other i386 machines fail with ACPI enabled.
162Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where
163ACPI support is mandatory) may result in a non-functional system.
164.Pp
165The
166.Nm
167driver comprises a set of drivers, which may be selectively disabled
168in case of problems.
169To disable a sub-driver, list it in the kernel
170environment variable
171.Va debug.acpi.disabled .
172Multiple entries can be listed, separated by a space.
173.Pp
174ACPI sub-devices and features that can be disabled:
175.Bl -tag -width ".Li sysresource"
176.It Li all
177Disable all ACPI features and devices.
178.It Li acad
179.Pq Vt device
180Supports AC adapter.
181.It Li bus
182.Pq Vt feature
183Probes and attaches subdevices.
184Disabling will avoid scanning the ACPI namespace entirely.
185.It Li children
186.Pq Vt feature
187Attaches standard ACPI sub-drivers and devices enumerated in the
188ACPI namespace.
189Disabling this has a similar effect to disabling
190.Dq Li bus ,
191except that the
192ACPI namespace will still be scanned.
193.It Li button
194.Pq Vt device
195Supports ACPI button devices (typically power and sleep buttons).
196.It Li cmbat
197.Pq Vt device
198Control-method batteries device.
199.It Li cpu
200.Pq Vt device
201Supports CPU power-saving and speed-setting functions.
202.It Li ec
203.Pq Vt device
204Supports the ACPI Embedded Controller interface, used to communicate
205with embedded platform controllers.
206.It Li isa
207.Pq Vt device
208Supports an ISA bus bridge defined in the ACPI namespace,
209typically as a child of a PCI bus.
210.It Li lid
211.Pq Vt device
212Supports an ACPI laptop lid switch, which typically puts a
213system to sleep.
214.It Li quirks
215.Pq Vt feature
216Do not honor quirks.
217Quirks automatically disable ACPI functionality based on the XSDT table's
218OEM vendor name and revision date.
219.It Li pci
220.Pq Vt device
221Supports Host to PCI bridges.
222.It Li pci_link
223.Pq Vt feature
224Performs PCI interrupt routing.
225.It Li sysresource
226.Pq Vt device
227Pseudo-devices containing resources which ACPI claims.
228.It Li thermal
229.Pq Vt device
230Supports system cooling and heat management.
231.It Li timer
232.Pq Vt device
233Implements a timecounter using the ACPI fixed-frequency timer.
234.It Li video
235.Pq Vt device
236Supports acpi_video which may conflict with agp device.
237.El
238.Pp
239It is also possible to avoid portions of the ACPI namespace which
240may be causing problems, by listing the full path of the root of
241the region to be avoided in the kernel environment variable
242.Va debug.acpi.avoid .
243The object and all of its children will be ignored during the
244bus/children scan of the namespace.
245The ACPI CA code will still know about the avoided region.
246.Sh DEBUGGING OUTPUT
247To enable debugging output,
248.Nm
249must be compiled with
250.Cd "options ACPI_DEBUG" .
251Debugging output is separated between layers and levels, where a layer is
252a component of the ACPI subsystem, and a level is a particular kind
253of debugging output.
254.Pp
255Both layers and levels are specified as a whitespace-separated list of
256tokens, with layers listed in
257.Va debug.acpi.layer
258and levels in
259.Va debug.acpi.level .
260.Pp
261The first set of layers is for ACPI-CA components, and the second is for
262.Fx
263drivers.
264The ACPI-CA layer descriptions include the prefix for the files they
265refer to.
266The supported layers are:
267.Pp
268.Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
269.It Li ACPI_UTILITIES
270Utility ("ut") functions
271.It Li ACPI_HARDWARE
272Hardware access ("hw")
273.It Li ACPI_EVENTS
274Event and GPE ("ev")
275.It Li ACPI_TABLES
276Table access ("tb")
277.It Li ACPI_NAMESPACE
278Namespace evaluation ("ns")
279.It Li ACPI_PARSER
280AML parser ("ps")
281.It Li ACPI_DISPATCHER
282Internal representation of interpreter state ("ds")
283.It Li ACPI_EXECUTER
284Execute AML methods ("ex")
285.It Li ACPI_RESOURCES
286Resource parsing ("rs")
287.It Li ACPI_CA_DEBUGGER
288Debugger implementation ("db", "dm")
289.It Li ACPI_OS_SERVICES
290Usermode support routines ("os")
291.It Li ACPI_CA_DISASSEMBLER
292Disassembler implementation (unused)
293.It Li ACPI_ALL_COMPONENTS
294All the above ACPI-CA components
295.It Li ACPI_AC_ADAPTER
296AC adapter driver
297.It Li ACPI_BATTERY
298Control-method battery driver
299.It Li ACPI_BUS
300ACPI, ISA, and PCI bus drivers
301.It Li ACPI_BUTTON
302Power and sleep button driver
303.It Li ACPI_EC
304Embedded controller driver
305.It Li ACPI_FAN
306Fan driver
307.It Li ACPI_OEM
308Platform-specific driver for hotkeys, LED, etc.
309.It Li ACPI_POWER
310Power resource driver
311.It Li ACPI_PROCESSOR
312CPU driver
313.It Li ACPI_THERMAL
314Thermal zone driver
315.It Li ACPI_TIMER
316Timer driver
317.It Li ACPI_ALL_DRIVERS
318All the above
319.Fx
320ACPI drivers
321.El
322.Pp
323The supported levels are:
324.Pp
325.Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
326.It Li ACPI_LV_ERROR
327Fatal error conditions
328.It Li ACPI_LV_WARN
329Warnings and potential problems
330.It Li ACPI_LV_INIT
331Initialization progress
332.It Li ACPI_LV_DEBUG_OBJECT
333Stores to objects
334.It Li ACPI_LV_INFO
335General information and progress
336.It Li ACPI_LV_ALL_EXCEPTIONS
337All the previous levels
338.It Li ACPI_LV_INIT_NAMES
339.It Li ACPI_LV_PARSE
340.It Li ACPI_LV_LOAD
341.It Li ACPI_LV_DISPATCH
342.It Li ACPI_LV_EXEC
343.It Li ACPI_LV_NAMES
344.It Li ACPI_LV_OPREGION
345.It Li ACPI_LV_BFIELD
346.It Li ACPI_LV_TABLES
347.It Li ACPI_LV_VALUES
348.It Li ACPI_LV_OBJECTS
349.It Li ACPI_LV_RESOURCES
350.It Li ACPI_LV_USER_REQUESTS
351.It Li ACPI_LV_PACKAGE
352.It Li ACPI_LV_VERBOSITY1
353All the previous levels
354.It Li ACPI_LV_ALLOCATIONS
355.It Li ACPI_LV_FUNCTIONS
356.It Li ACPI_LV_OPTIMIZATIONS
357.It Li ACPI_LV_VERBOSITY2
358.It Li ACPI_LV_ALL
359.It Li ACPI_LV_MUTEX
360.It Li ACPI_LV_THREADS
361.It Li ACPI_LV_IO
362.It Li ACPI_LV_INTERRUPTS
363.It Li ACPI_LV_VERBOSITY3
364All the previous levels
365.It Li ACPI_LV_AML_DISASSEMBLE
366.It Li ACPI_LV_VERBOSE_INFO
367.It Li ACPI_LV_FULL_TABLES
368.It Li ACPI_LV_EVENTS
369.It Li ACPI_LV_VERBOSE
370All levels after
371.Qq Li ACPI_LV_VERBOSITY3
372.El
373.Pp
374Selection of the appropriate layer and level values is important
375to avoid massive amounts of debugging output.
376For example, the following configuration is a good way to gather initial
377information.
378It enables debug output for both ACPI-CA and the
379.Nm
380driver, printing basic information about errors, warnings, and progress.
381.Bd -literal -offset indent
382debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
383debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
384.Ed
385.Pp
386Debugging output by the ACPI CA subsystem is prefixed with the
387module name in lowercase, followed by a source line number.
388Output from the
389.Fx Ns -local
390code follows the same format, but
391the module name is uppercased.
392.Sh OVERRIDING YOUR BIOS BYTECODE
393ACPI interprets bytecode named AML
394(ACPI Machine Language)
395provided by the BIOS vendor as a memory image at boot time.
396Sometimes, the AML code contains a bug that does not appear when parsed
397by the Microsoft implementation.
398.Fx
399provides a way to override it with your own AML code to work around
400or debug such problems.
401Note that all AML in your DSDT and any SSDT tables is overridden.
402.Pp
403In order to load your AML code, you must edit
404.Pa /boot/loader.conf
405and include the following lines.
406.Bd -literal -offset indent
407acpi_dsdt_load="YES"
408acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
409.Ed
410.Pp
411In order to prepare your AML code, you will need the
412.Xr acpidump 8
413and
414.Xr iasl 8
415utilities and some ACPI knowledge.
416.Sh COMPATIBILITY
417ACPI is only found and supported on i386/ia32, ia64, and amd64.
418.Sh SEE ALSO
419.Xr kenv 1 ,
420.Xr acpi_thermal 4 ,
421.Xr device.hints 5 ,
422.Xr loader.conf 5 ,
423.Xr acpiconf 8 ,
424.Xr acpidump 8 ,
425.Xr config 8 ,
426.Xr iasl 8
427.Rs
428.%A "Compaq Computer Corporation"
429.%A "Intel Corporation"
430.%A "Microsoft Corporation"
431.%A "Phoenix Technologies Ltd."
432.%A "Toshiba Corporation"
433.%D August 25, 2003
434.%T "Advanced Configuration and Power Interface Specification"
435.%O http://acpi.info/spec.htm
436.Re
437.Sh AUTHORS
438.An -nosplit
439The ACPI CA subsystem is developed and maintained by
440Intel Architecture Labs.
441.Pp
442The following people made notable contributions to the ACPI subsystem
443in
444.Fx :
445.An Michael Smith ,
446.An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
447.An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
448.An Munehiro Matsuda ,
449.An Nate Lawson ,
450the ACPI-jp mailing list at
451.Aq acpi-jp@jp.FreeBSD.org ,
452and many other contributors.
453.Pp
454This manual page was written by
455.An Michael Smith Aq msmith@FreeBSD.org .
456.Sh BUGS
457If the
458.Nm
459driver is loaded as a module when it is already linked as part of the
460kernel, odd things may happen.