acpi.4 revision 138826

Copyright (c) 2001 Michael Smith
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

$FreeBSD: head/share/man/man4/acpi.4 138826 2004-12-14 01:07:44Z njl $

.Dd December 13, 2004 .Dt ACPI 4 .Os .Sh NAME .Nm acpi .Nd Advanced Configuration and Power Management support .Sh SYNOPSIS .Cd "device acpi"

p .Cd "options ACPI_DEBUG" .Sh DESCRIPTION The .Nm driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI standard. This support includes platform hardware discovery (superseding the PnP and PCI BIOS), as well as power management (superseding APM) and other features. ACPI core support is provided by the ACPI CA reference implementation from Intel.

p Note that the .Nm driver is automatically loaded by the bootloader, and should only be compiled into the kernel on platforms where ACPI is mandatory. .Sh SYSCTLS The .Nm driver is intended to provide power management without user intervention. Thus, some of these sysctls are controlled automatically by the .Nm power_profile rc script, which can be configured via .Xr rc.conf 5 . If you specify values manually, they may be overridden. l -tag -width indent t Va hw.acpi.cpu.throttle_max Maximum value for CPU throttling, equal to 100% of the clock rate. t Va hw.acpi.cpu.throttle_state Get or set the current throttling state, from 1 to .Va hw.acpi.cpu.throttle_max . This scales back the CPU clock rate and the corresponding power consumption. t Va hw.acpi.cpu.cx_usage Debugging information listing the percent of total usage for each sleep state. The values are reset when .Va hw.acpi.cpu.cx_lowest is modified. t Va hw.acpi.cpu.cx_lowest Lowest Cx state to use for idling the CPU. A scheduling algorithm will select states between C1 and this setting as system load dictates. To enable ACPI CPU idling control, .Va machdep.cpu_idle_hlt must be set to 1. t Va hw.acpi.cpu.cx_supported List of supported CPU idle states and their transition latency in microseconds. Each state has a type (e.g., C2). C1 is equivalent to the ia32 HLT instruction, C2 provides a deeper sleep with the same semantics, and C3 provides the deepest sleep but additionally requires bus mastering to be disabled. States greater than C3 provide even more power savings with the same semantics as the C3 state. Deeper sleeps provide more power savings but increased transition latency when an interrupt occurs. .El .Sh TUNABLES Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in

a /boot/loader.conf . l -tag -width indent t Va acpi_dsdt_load Enables loading of a custom ACPI DSDT. t Va acpi_dsdt_name Name of the DSDT table to load, if loading is enabled. t Va debug.acpi.disabled Selectively disables portions of ACPI for debugging purposes. t Va hint.acpi.0.disabled Set this to 1 to disable all of ACPI. If ACPI has been disabled on your system due to a blacklist entry for your BIOS, you can set this to 0 to re-enable ACPI for testing. t Va hw.acpi.ec.poll_timeout Delay in milliseconds to wait for the EC to respond. Try increasing this number if you get the error .Er AE_NO_HARDWARE_RESPONSE . t Va hw.acpi.osname Some systems' ASL may have problems because they look for names of Microsoft operating systems. This tunable overrides the value of the .Qq Li \e_OS object from its default of .Qq Li FreeBSD . t Va hw.acpi.pci.link.%d.%d.%d.irq Override the interrupt to use. t Va hw.acpi.reset_video Enables calling the VESA reset BIOS vector on the resume path. Some graphic chips have problems such as LCD white-out after resume. Try setting this to 0 if this causes problems for you. t Va hw.acpi.serialize_methods Allow override of whether methods execute in parallel or not. Enable this for serial behavior, which fixes "AE_ALREADY_EXISTS" errors for AML that really can't handle parallel method execution. It is off by default since this breaks recursive methods and some IBMs use such code. t Va hw.acpi.verbose Turn on verbose debugging information about what ACPI is doing. .El .Sh DISABLING ACPI Since ACPI support on different platforms varies greatly, there are many debugging and tuning options available.

p For machines known not to work with .Nm enabled, there is a BIOS blacklist. Currently, the blacklist only controls whether .Nm should be disabled or not. In the future, it will have more granularity to control features (the infrastructure for that is already there).

p To enable .Nm (for debugging purposes, etc.) on machines that are on the blacklist, set the kernel environment variable .Va hint.acpi.0.disabled to 0. Before trying this, consider updating your BIOS to a more recent version that may be compatible with ACPI.

p To disable the .Nm driver completely, set the kernel environment variable .Va hint.acpi.0.disabled to 1.

p Some i386 machines totally fail to operate with some or all of ACPI disabled. Other i386 machines fail with ACPI enabled. Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where ACPI support is mandatory) may result in a non-functional system.

p The .Nm driver comprises a set of drivers, which may be selectively disabled in case of problems. To disable a sub-driver, list it in the kernel environment variable .Va debug.acpi.disabled . Multiple entries can be listed, separated by a space.

p ACPI sub-devices and features that can be disabled: l -tag -width sysresource t Li all Disable all ACPI features and devices. t Li acad

q Vt device Supports AC adapter. t Li bus

q Vt feature Probes and attaches subdevices. Disabling will avoid scanning the ACPI namespace entirely. t Li children

q Vt feature Attaches standard ACPI sub-drivers and devices enumerated in the ACPI namespace. Disabling this has a similar effect to disabling .Dq Li bus , except that the ACPI namespace will still be scanned. t Li button

q Vt device Supports ACPI button devices (typically power and sleep buttons). t Li cmbat

q Vt device Control-method batteries device. t Li cpu

q Vt device Supports CPU power-saving and speed-setting functions. t Li ec

q Vt device Supports the ACPI Embedded Controller interface, used to communicate with embedded platform controllers. t Li isa

q Vt device Supports an ISA bus bridge defined in the ACPI namespace, typically as a child of a PCI bus. t Li lid

q Vt device Supports an ACPI laptop lid switch, which typically puts a system to sleep. t Li quirks

q Vt feature Do not honor quirks. Quirks automatically disable ACPI functionality based on the XSDT table's OEM vendor name and revision date. t Li pci

q Vt device Supports Host to PCI bridges. t Li pci_link

q Vt feature Performs PCI interrupt routing. t Li sysresource

q Vt device Pseudo-devices containing resources which ACPI claims. t Li thermal

q Vt device Supports system cooling and heat management. t Li timer

q Vt device Implements a timecounter using the ACPI fixed-frequency timer. .El

p It is also possible to avoid portions of the ACPI namespace which may be causing problems, by listing the full path of the root of the region to be avoided in the kernel environment variable .Va debug.acpi.avoid . The object and all of its children will be ignored during the bus/children scan of the namespace. The ACPI CA code will still know about the avoided region. .Sh DEBUGGING OUTPUT To enable debugging output, .Nm must be compiled with "options ACPI_DEBUG." Debugging output is separated between layers and levels, where a layer is a component of the ACPI subsystem, and a level is a particular kind of debugging output.

p Both layers and levels are specified as a whitespace-separated list of tokens, with layers listed in .Va debug.acpi.layer and levels in .Va debug.acpi.level . The supported layers are:

p l -tag -compact -width ACPI_CA_DISASSEMBLER t Li ACPI_UTILITIES t Li ACPI_HARDWARE t Li ACPI_EVENTS t Li ACPI_TABLES t Li ACPI_NAMESPACE t Li ACPI_PARSER t Li ACPI_DISPATCHER t Li ACPI_EXECUTER t Li ACPI_RESOURCES t Li ACPI_CA_DEBUGGER t Li ACPI_OS_SERVICES t Li ACPI_CA_DISASSEMBLER t Li ACPI_ALL_COMPONENTS All the above ACPI-CA components t Li ACPI_AC_ADAPTER AC adapter driver t Li ACPI_BATTERY Control-method battery driver t Li ACPI_BUS ACPI, ISA, and PCI bus drivers t Li ACPI_BUTTON Power and sleep button driver t Li ACPI_EC Embedded controller driver t Li ACPI_FAN Fan driver t Li ACPI_OEM Platform-specific driver for hotkeys, LED, etc. t Li ACPI_POWER Power resource driver t Li ACPI_PROCESSOR CPU driver t Li ACPI_THERMAL Thermal zone driver t Li ACPI_TIMER Timer driver t Li ACPI_ALL_DRIVERS All the above .Fx ACPI drivers .El

p The supported levels are:

p l -tag -compact -width ACPI_LV_AML_DISASSEMBLE t Li ACPI_LV_ERROR t Li ACPI_LV_WARN t Li ACPI_LV_INIT t Li ACPI_LV_DEBUG_OBJECT t Li ACPI_LV_INFO t Li ACPI_LV_ALL_EXCEPTIONS All the above errors and warnings t Li ACPI_LV_INIT_NAMES t Li ACPI_LV_PARSE t Li ACPI_LV_LOAD t Li ACPI_LV_DISPATCH t Li ACPI_LV_EXEC t Li ACPI_LV_NAMES t Li ACPI_LV_OPREGION t Li ACPI_LV_BFIELD t Li ACPI_LV_TABLES t Li ACPI_LV_VALUES t Li ACPI_LV_OBJECTS t Li ACPI_LV_RESOURCES t Li ACPI_LV_USER_REQUESTS t Li ACPI_LV_PACKAGE t Li ACPI_LV_VERBOSITY1 t Li ACPI_LV_ALLOCATIONS t Li ACPI_LV_FUNCTIONS t Li ACPI_LV_OPTIMIZATIONS t Li ACPI_LV_VERBOSITY2 t Li ACPI_LV_ALL t Li ACPI_LV_MUTEX t Li ACPI_LV_THREADS t Li ACPI_LV_IO t Li ACPI_LV_INTERRUPTS t Li ACPI_LV_VERBOSITY3 t Li ACPI_LV_AML_DISASSEMBLE t Li ACPI_LV_VERBOSE_INFO t Li ACPI_LV_FULL_TABLES t Li ACPI_LV_EVENTS t Li ACPI_LV_VERBOSE .El

p Selection of the appropriate layer and level values is important to avoid massive amounts of debugging output. Check the code to see which you need.

p Debugging output by the ACPI CA subsystem is prefixed with the module name in lowercase, followed by a source line number. Output from the .Fx Ns -local code follows the same format, but the module name is uppercased.

p .Sh OVERRIDING YOUR BIOS BYTECODE ACPI interprets bytecode named AML (ACPI Machine Language) provided by the BIOS vendor as a memory image at boot time. Sometimes, the AML code contains a bug that does not appear when parsed by the Microsoft implementation. .Fx provides a way to override it with your own AML code to workaround or debug such problems. Note that all AML in your DSDT and any SSDT tables is overridden.

p In order to load your AML code, you must edit

a /boot/loader.conf and include the following lines. d -literal -offset indent acpi_dsdt_load="YES" acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name. .Ed

p In order to prepare your AML code, you will need the .Xr acpidump 8 and .Xr iasl 1 utilities and some ACPI knowledge. .Sh COMPATIBILITY ACPI is only found and supported on i386/ia32, ia64, and amd64. .Sh SEE ALSO .Xr kenv 1 , .Xr acpi_thermal 4 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr acpiconf 8 , .Xr acpidump 8 , .Xr config 8 , .Xr iasl 8 .Rs .%A "Compaq Computer Corporation" .%A "Intel Corporation" .%A "Microsoft Corporation" .%A "Phoenix Technologies Ltd." .%A "Toshiba Corporation" .%D August 25, 2003 .%T "Advanced Configuration and Power Interface Specification" .%O http://acpi.info/spec.htm .Re .Sh AUTHORS .An -nosplit The ACPI CA subsystem is developed and maintained by Intel Architecture Labs.

p The following people made notable contributions to the ACPI subsystem in .Fx : .An Michael Smith , .An Takanori Watanabe Aq takawata@jp.FreeBSD.org , .An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org , .An Munehiro Matsuda , .An Nate Lawson , the ACPI-jp mailing list at .Aq acpi-jp@jp.FreeBSD.org , and many other contributors.

p This manual page was written by .An Michael Smith Aq msmith@FreeBSD.org . .Sh BUGS If the .Nm driver is loaded as a module when it is already linked as part of the kernel, odd things may happen.