Remove traces of ACPI_QUIRK_VMWARE, should be no longer needed.
[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 $
edb30af9 27.\" $DragonFly: src/share/man/man4/acpi.4,v 1.8 2008/08/28 16:38:59 swildner Exp $
68fb0c66 28.\"
2c027bcb 29.Dd September 29, 2007
68fb0c66 30.Dt ACPI 4
5aa5f05b 31.Os
68fb0c66
YT
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
0961d6d8
MD
102Selectively disables portions of ACPI that are enabled by default, for
103debugging purposes.
104.It Va debug.acpi.enabled
105Selectively enables portions of ACPI that are disabled by default, for
106debugging purposes.
68fb0c66
YT
107.It Va debug.acpi.quirks
108Override any automatic quirks completely.
109.It Va hint.acpi.0.disabled
110Set this to 1 to disable all of ACPI.
111If ACPI has been disabled on your system due to a blacklist entry for your
112BIOS, you can set this to 0 to re-enable ACPI for testing.
113.It Va hw.acpi.ec.poll_timeout
114Delay in milliseconds to wait for the EC to respond.
115Try increasing this number if you get the error
116.Qq Li AE_NO_HARDWARE_RESPONSE .
117.It Va hw.acpi.host_mem_start
118Override the assumed memory starting address for PCI host bridges.
119.It Va hw.acpi.pci.link.%d.%d.%d.irq
120Override the interrupt to use.
121.It Va hw.acpi.reset_video
122Enables calling the VESA reset BIOS vector on the resume path.
123Some graphic chips have problems such as LCD white-out after resume.
124Try setting this to 0 if this causes problems for you.
125.It Va hw.acpi.serialize_methods
126Allow override of whether methods execute in parallel or not.
127Enable this for serial behavior, which fixes
128.Qq Li AE_ALREADY_EXISTS
129errors for
130AML that really cannot handle parallel method execution.
131It is off by default since this breaks recursive methods and some IBMs use
132such code.
133.It Va hw.acpi.verbose
134Turn on verbose debugging information about what ACPI is doing.
135.El
136.Sh DISABLING ACPI
137Since ACPI support on different platforms varies greatly, there are many
138debugging and tuning options available.
139.Pp
140For machines known not to work with
141.Nm
142enabled, there is a BIOS blacklist.
143Currently, the blacklist only controls whether
144.Nm
145should be disabled or not.
146In the future, it will have more granularity to control features (the
147infrastructure for that is already there).
148.Pp
149To enable
150.Nm
151(for debugging purposes, etc.) on machines that are on the blacklist, set the
152kernel environment variable
153.Va hint.acpi.0.disabled
154to 0.
155Before trying this, consider updating your BIOS to a more recent version that
156may be compatible with ACPI.
157.Pp
158To disable the
159.Nm
160driver completely, set the kernel environment variable
161.Va hint.acpi.0.disabled
162to 1.
163.Pp
164Some i386 machines totally fail to operate with some or all of ACPI disabled.
165Other i386 machines fail with ACPI enabled.
166Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where
167ACPI support is mandatory) may result in a non-functional system.
168.Pp
169The
170.Nm
171driver comprises a set of drivers, which may be selectively disabled
172in case of problems.
173To disable a sub-driver, list it in the kernel
174environment variable
175.Va debug.acpi.disabled .
176Multiple entries can be listed, separated by a space.
177.Pp
178ACPI sub-devices and features that can be disabled:
179.Bl -tag -width ".Li sysresource"
180.It Li all
181Disable all ACPI features and devices.
182.It Li acad
183.Pq Vt device
184Supports AC adapter.
185.It Li bus
186.Pq Vt feature
187Probes and attaches subdevices.
188Disabling will avoid scanning the ACPI namespace entirely.
189.It Li children
190.Pq Vt feature
191Attaches standard ACPI sub-drivers and devices enumerated in the
192ACPI namespace.
193Disabling this has a similar effect to disabling
194.Dq Li bus ,
195except that the
196ACPI namespace will still be scanned.
197.It Li button
198.Pq Vt device
199Supports ACPI button devices (typically power and sleep buttons).
200.It Li cmbat
201.Pq Vt device
202Control-method batteries device.
203.It Li cpu
204.Pq Vt device
205Supports CPU power-saving and speed-setting functions.
cc6e2b6e
SZ
206.It Li cpu_cst
207.Pq Vt device
208Supports CPU power-saving.
209Diabling
210.Dq Li cpu ,
211will also disable this device.
c3a2c0df
SZ
212.It Li cpu_pst
213.Pq Vt device
214Supports CPU speed-setting.
215Diabling
216.Dq Li cpu ,
217will also disable this device.
68fb0c66
YT
218.It Li ec
219.Pq Vt device
220Supports the ACPI Embedded Controller interface, used to communicate
221with embedded platform controllers.
222.It Li isa
223.Pq Vt device
224Supports an ISA bus bridge defined in the ACPI namespace,
225typically as a child of a PCI bus.
226.It Li lid
227.Pq Vt device
228Supports an ACPI laptop lid switch, which typically puts a
229system to sleep.
230.It Li quirks
231.Pq Vt feature
232Do not honor quirks.
233Quirks automatically disable ACPI functionality based on the XSDT table's
234OEM vendor name and revision date.
235.It Li pci
236.Pq Vt device
237Supports Host to PCI bridges.
238.It Li pci_link
239.Pq Vt feature
240Performs PCI interrupt routing.
241.It Li sysresource
242.Pq Vt device
243Pseudo-devices containing resources which ACPI claims.
244.It Li thermal
245.Pq Vt device
246Supports system cooling and heat management.
247.It Li timer
248.Pq Vt device
249Implements a timecounter using the ACPI fixed-frequency timer.
250.It Li video
251.Pq Vt device
252Supports acpi_video which may conflict with agp device.
253.El
254.Pp
06c22ed3
SZ
255The
256.Nm
257driver comprises a set of drivers,
258which may be selectively enabled in case of testing.
259To enable a sub-driver,
260list it in the kernel environment variable
261.Va debug.acpi.enabled .
262Multiple entries can be listed,
263separated by a space.
264.Pp
265ACPI sub-devices and features that can be enabled:
266.Bl -tag -width ".Li sysresource"
267.It Li hpet
268.Pq Vt device
269Supports HPET.
270.El
271.Pp
68fb0c66
YT
272It is also possible to avoid portions of the ACPI namespace which
273may be causing problems, by listing the full path of the root of
274the region to be avoided in the kernel environment variable
7beeeb16
YT
275.Va debug.acpi.avoid.paths ,
276or
68fb0c66 277.Va debug.acpi.avoid .
7beeeb16
YT
278The latter also disables initialization of ACPI namespace as a
279workaround for systems where not doing so crashes interpreter.
68fb0c66
YT
280The object and all of its children will be ignored during the
281bus/children scan of the namespace.
282The ACPI CA code will still know about the avoided region.
283.Sh DEBUGGING OUTPUT
284To enable debugging output,
285.Nm
286must be compiled with
287.Cd "options ACPI_DEBUG" .
288Debugging output is separated between layers and levels, where a layer is
289a component of the ACPI subsystem, and a level is a particular kind
290of debugging output.
291.Pp
292Both layers and levels are specified as a whitespace-separated list of
293tokens, with layers listed in
294.Va debug.acpi.layer
295and levels in
296.Va debug.acpi.level .
297.Pp
298The first set of layers is for ACPI-CA components, and the second is for
494e572f 299.Dx
68fb0c66
YT
300drivers.
301The ACPI-CA layer descriptions include the prefix for the files they
302refer to.
303The supported layers are:
304.Pp
305.Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
306.It Li ACPI_UTILITIES
307Utility ("ut") functions
308.It Li ACPI_HARDWARE
309Hardware access ("hw")
310.It Li ACPI_EVENTS
311Event and GPE ("ev")
312.It Li ACPI_TABLES
313Table access ("tb")
314.It Li ACPI_NAMESPACE
315Namespace evaluation ("ns")
316.It Li ACPI_PARSER
317AML parser ("ps")
318.It Li ACPI_DISPATCHER
319Internal representation of interpreter state ("ds")
320.It Li ACPI_EXECUTER
321Execute AML methods ("ex")
322.It Li ACPI_RESOURCES
323Resource parsing ("rs")
324.It Li ACPI_CA_DEBUGGER
325Debugger implementation ("db", "dm")
326.It Li ACPI_OS_SERVICES
327Usermode support routines ("os")
328.It Li ACPI_CA_DISASSEMBLER
329Disassembler implementation (unused)
330.It Li ACPI_ALL_COMPONENTS
331All the above ACPI-CA components
332.It Li ACPI_AC_ADAPTER
333AC adapter driver
334.It Li ACPI_BATTERY
335Control-method battery driver
336.It Li ACPI_BUS
337ACPI, ISA, and PCI bus drivers
338.It Li ACPI_BUTTON
339Power and sleep button driver
340.It Li ACPI_EC
341Embedded controller driver
342.It Li ACPI_FAN
343Fan driver
344.It Li ACPI_OEM
345Platform-specific driver for hotkeys, LED, etc.
346.It Li ACPI_POWER
347Power resource driver
348.It Li ACPI_PROCESSOR
349CPU driver
350.It Li ACPI_THERMAL
351Thermal zone driver
352.It Li ACPI_TIMER
353Timer driver
354.It Li ACPI_ALL_DRIVERS
355All the above
494e572f 356.Dx
68fb0c66
YT
357ACPI drivers
358.El
359.Pp
360The supported levels are:
361.Pp
362.Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
363.It Li ACPI_LV_ERROR
364Fatal error conditions
365.It Li ACPI_LV_WARN
366Warnings and potential problems
367.It Li ACPI_LV_INIT
368Initialization progress
369.It Li ACPI_LV_DEBUG_OBJECT
370Stores to objects
371.It Li ACPI_LV_INFO
372General information and progress
373.It Li ACPI_LV_ALL_EXCEPTIONS
374All the previous levels
375.It Li ACPI_LV_INIT_NAMES
376.It Li ACPI_LV_PARSE
377.It Li ACPI_LV_LOAD
378.It Li ACPI_LV_DISPATCH
379.It Li ACPI_LV_EXEC
380.It Li ACPI_LV_NAMES
381.It Li ACPI_LV_OPREGION
382.It Li ACPI_LV_BFIELD
383.It Li ACPI_LV_TABLES
384.It Li ACPI_LV_VALUES
385.It Li ACPI_LV_OBJECTS
386.It Li ACPI_LV_RESOURCES
387.It Li ACPI_LV_USER_REQUESTS
388.It Li ACPI_LV_PACKAGE
389.It Li ACPI_LV_VERBOSITY1
390All the previous levels
391.It Li ACPI_LV_ALLOCATIONS
392.It Li ACPI_LV_FUNCTIONS
393.It Li ACPI_LV_OPTIMIZATIONS
394.It Li ACPI_LV_VERBOSITY2
395.It Li ACPI_LV_ALL
396.It Li ACPI_LV_MUTEX
397.It Li ACPI_LV_THREADS
398.It Li ACPI_LV_IO
399.It Li ACPI_LV_INTERRUPTS
400.It Li ACPI_LV_VERBOSITY3
401All the previous levels
402.It Li ACPI_LV_AML_DISASSEMBLE
403.It Li ACPI_LV_VERBOSE_INFO
404.It Li ACPI_LV_FULL_TABLES
405.It Li ACPI_LV_EVENTS
406.It Li ACPI_LV_VERBOSE
407All levels after
408.Qq Li ACPI_LV_VERBOSITY3
409.El
410.Pp
411Selection of the appropriate layer and level values is important
412to avoid massive amounts of debugging output.
413For example, the following configuration is a good way to gather initial
414information.
415It enables debug output for both ACPI-CA and the
416.Nm
417driver, printing basic information about errors, warnings, and progress.
418.Bd -literal -offset indent
419debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
420debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
421.Ed
422.Pp
423Debugging output by the ACPI CA subsystem is prefixed with the
424module name in lowercase, followed by a source line number.
425Output from the
494e572f 426.Dx Ns -local
68fb0c66
YT
427code follows the same format, but
428the module name is uppercased.
429.Sh OVERRIDING YOUR BIOS BYTECODE
430ACPI interprets bytecode named AML
431(ACPI Machine Language)
432provided by the BIOS vendor as a memory image at boot time.
433Sometimes, the AML code contains a bug that does not appear when parsed
434by the Microsoft implementation.
494e572f 435.Dx
68fb0c66
YT
436provides a way to override it with your own AML code to work around
437or debug such problems.
438Note that all AML in your DSDT and any SSDT tables is overridden.
439.Pp
440In order to load your AML code, you must edit
441.Pa /boot/loader.conf
442and include the following lines.
443.Bd -literal -offset indent
444acpi_dsdt_load="YES"
445acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
446.Ed
447.Pp
448In order to prepare your AML code, you will need the
449.Xr acpidump 8
450and
451.Xr iasl 8
452utilities and some ACPI knowledge.
453.Sh COMPATIBILITY
b2b3ffcd 454ACPI is only found and supported on i386/ia32, ia64, and x86_64.
68fb0c66
YT
455.Sh SEE ALSO
456.Xr kenv 1 ,
457.Xr acpi_thermal 4 ,
edb30af9
SW
458.Xr acpi_thinkpad 4 ,
459.Xr acpi_toshiba 4 ,
68fb0c66
YT
460.Xr loader.conf 5 ,
461.Xr acpiconf 8 ,
462.Xr acpidump 8 ,
463.Xr config 8 ,
464.Xr iasl 8
465.Rs
466.%A "Compaq Computer Corporation"
467.%A "Intel Corporation"
468.%A "Microsoft Corporation"
469.%A "Phoenix Technologies Ltd."
470.%A "Toshiba Corporation"
471.%D August 25, 2003
472.%T "Advanced Configuration and Power Interface Specification"
473.%O http://acpi.info/spec.htm
474.Re
475.Sh AUTHORS
476.An -nosplit
477The ACPI CA subsystem is developed and maintained by
478Intel Architecture Labs.
479.Pp
480The following people made notable contributions to the ACPI subsystem
481in
494e572f 482.Dx :
68fb0c66
YT
483.An Michael Smith ,
484.An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
485.An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
486.An Munehiro Matsuda ,
487.An Nate Lawson ,
488the ACPI-jp mailing list at
489.Aq acpi-jp@jp.FreeBSD.org ,
490and many other contributors.
491.Pp
492This manual page was written by
493.An Michael Smith Aq msmith@FreeBSD.org .
494.Sh BUGS
495If the
496.Nm
497driver is loaded as a module when it is already linked as part of the
498kernel, odd things may happen.