xref: /freebsd/share/man/man4/acpi.4 (revision 93870c05501aa34738a874fa5e6c50d44dc2b854)
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.\"
2893870c05SNate Lawson.Dd July 29, 2006
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"
38ba526146SWojciech A. Koszek.Cd "options DDB"
39b6695bd0SMike Smith.Sh DESCRIPTION
40b6695bd0SMike SmithThe
41b6695bd0SMike Smith.Nm
42b6695bd0SMike Smithdriver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI
43b6695bd0SMike Smithstandard.
44b6695bd0SMike SmithThis support includes platform hardware discovery (superseding the
45b6695bd0SMike SmithPnP and PCI BIOS), as well as power management (superseding APM) and
46b6695bd0SMike Smithother features.
47b6695bd0SMike SmithACPI core support is provided by the ACPI CA reference implementation
48b6695bd0SMike Smithfrom Intel.
49d1f717d1SMike Smith.Pp
50d1f717d1SMike SmithNote that the
51d1f717d1SMike Smith.Nm
522010c542SRuslan Ermilovdriver is automatically loaded by the
532010c542SRuslan Ermilov.Xr loader 8 ,
542010c542SRuslan Ermilovand should only be
55edd84e48SNate Lawsoncompiled into the kernel on platforms where ACPI is mandatory.
5644cb3ab0SHiroki Sato.Sh SYSCTL VARIABLES
57edd84e48SNate LawsonThe
58edd84e48SNate Lawson.Nm
59edd84e48SNate Lawsondriver is intended to provide power management without user intervention.
6093870c05SNate LawsonIf the default settings are not optimal, the following sysctls can be
6193870c05SNate Lawsonused to modify or monitor
6293870c05SNate Lawson.Nm
6393870c05SNate Lawsonbehavior.
64edd84e48SNate Lawson.Bl -tag -width indent
6593870c05SNate Lawson.It Va hw.acpi.acline
6693870c05SNate LawsonAC line state (1 means online, 0 means on battery power).
67edd84e48SNate Lawson.It Va hw.acpi.cpu.cx_usage
68edd84e48SNate LawsonDebugging information listing the percent of total usage for each sleep state.
69edd84e48SNate LawsonThe values are reset when
70edd84e48SNate Lawson.Va hw.acpi.cpu.cx_lowest
71edd84e48SNate Lawsonis modified.
72edd84e48SNate Lawson.It Va hw.acpi.cpu.cx_lowest
73edd84e48SNate LawsonLowest Cx state to use for idling the CPU.
74edd84e48SNate LawsonA scheduling algorithm will select states between C1 and this setting
75edd84e48SNate Lawsonas system load dictates.
76edd84e48SNate LawsonTo enable ACPI CPU idling control,
77edd84e48SNate Lawson.Va machdep.cpu_idle_hlt
78edd84e48SNate Lawsonmust be set to 1.
79edd84e48SNate Lawson.It Va hw.acpi.cpu.cx_supported
80edd84e48SNate LawsonList of supported CPU idle states and their transition latency
81edd84e48SNate Lawsonin microseconds.
82edd84e48SNate LawsonEach state has a type (e.g., C2).
83edd84e48SNate LawsonC1 is equivalent to the ia32 HLT instruction, C2 provides a deeper
84edd84e48SNate Lawsonsleep with the same semantics, and C3 provides the deepest sleep
85edd84e48SNate Lawsonbut additionally requires bus mastering to be disabled.
86edd84e48SNate LawsonStates greater than C3 provide even more power savings with the same
87edd84e48SNate Lawsonsemantics as the C3 state.
88edd84e48SNate LawsonDeeper sleeps provide more power savings but increased transition
89edd84e48SNate Lawsonlatency when an interrupt occurs.
9093870c05SNate Lawson.It Va hw.acpi.disable_on_reboot
9193870c05SNate LawsonDisable ACPI during the reboot process.
9293870c05SNate LawsonMost systems reboot fine with ACPI still enabled, but some require
9393870c05SNate Lawsonexiting to legacy mode first.
9493870c05SNate LawsonDefault is 0, leave ACPI enabled.
9593870c05SNate Lawson.It Va hw.acpi.handle_reboot
9693870c05SNate LawsonUse the ACPI Reset Register capability to reboot the system.
9793870c05SNate LawsonDefault is 0, use legacy reboot support.
9893870c05SNate LawsonSome newer systems require use of this register, while some only work
9993870c05SNate Lawsonwith legacy rebooting support.
10093870c05SNate Lawson.It Va hw.acpi.lid_switch_state
10193870c05SNate LawsonSuspend state (S1-S5) to enter when the lid switch (i.e., a notebook screen)
10293870c05SNate Lawsonis closed.
10393870c05SNate LawsonDefault is NONE (do nothing).
10493870c05SNate Lawson.It Va hw.acpi.power_button_state
10593870c05SNate LawsonSuspend state (S1-S5) to enter when the power button is pressed.
10693870c05SNate LawsonDefault is S5 (power-off nicely).
10793870c05SNate Lawson.It Va hw.acpi.reset_video
10893870c05SNate LawsonReset the video adapter from real mode during the resume path.
10993870c05SNate LawsonSome systems need this help, others have display problems if it is enabled.
11093870c05SNate LawsonDefault is 0 (disabled).
11193870c05SNate Lawson.It Va hw.acpi.s4bios
11293870c05SNate LawsonIndicate whether the system supports S4BIOS.
11393870c05SNate LawsonThis means that the BIOS can handle all the functions of suspending the
11493870c05SNate Lawsonsystem to disk.
11593870c05SNate LawsonOtherwise, the OS is responsible for suspending to disk (S4OS).
11693870c05SNate LawsonMost current systems do not support S4BIOS.
11793870c05SNate Lawson.It Va hw.acpi.sleep_button_state
11893870c05SNate LawsonSuspend state (S1-S5) to enter when the sleep button is pressed.
11993870c05SNate LawsonThis is usually a special function button on the keyboard.
12093870c05SNate LawsonDefault is S3 (suspend-to-RAM).
12193870c05SNate Lawson.It Va hw.acpi.sleep_delay
12293870c05SNate LawsonWait this number of seconds between preparing the system to suspend and
12393870c05SNate Lawsonactually entering the suspend state.
12493870c05SNate LawsonDefault is 1 second.
12593870c05SNate Lawson.It Va hw.acpi.supported_sleep_state
12693870c05SNate LawsonSuspend states (S1-S5) supported by the BIOS.
12793870c05SNate Lawson.Bl -tag -width indent
12893870c05SNate Lawson.It Va S1
12993870c05SNate LawsonQuick suspend to RAM.
13093870c05SNate LawsonThe CPU enters a lower power state but most peripherals are left running.
13193870c05SNate Lawson.It Va S2
13293870c05SNate LawsonLower power state than S1, but with the same basic characteristics.
13393870c05SNate LawsonNot supported by many systems.
13493870c05SNate Lawson.It Va S3
13593870c05SNate LawsonSuspend to RAM.
13693870c05SNate LawsonMost devices are powered off and the system stops running except for
13793870c05SNate Lawsonmemory refresh.
13893870c05SNate Lawson.It Va S4
13993870c05SNate LawsonSuspend to disk.
14093870c05SNate LawsonAll devices are powered off and the system stops running.
14193870c05SNate LawsonWhen resuming, the system starts as if from a cold power on.
14293870c05SNate LawsonNot yet supported by
14393870c05SNate Lawson.Fx
14493870c05SNate Lawsonunless S4BIOS is available.
14593870c05SNate Lawson.It Va S5
14693870c05SNate LawsonSystem shuts down cleanly and powers off.
14793870c05SNate Lawson.El
14893870c05SNate Lawson.It Va hw.acpi.verbose
14993870c05SNate LawsonEnable verbose printing from the various ACPI subsystems.
150edd84e48SNate Lawson.El
15144cb3ab0SHiroki Sato.Sh LOADER TUNABLES
1523184cf5aSNate LawsonTunables can be set at the
15387b6284aSRuslan Ermilov.Xr loader 8
1543184cf5aSNate Lawsonprompt before booting the kernel or stored in
1553184cf5aSNate Lawson.Pa /boot/loader.conf .
156b46f4324SNate LawsonMany of these tunables also have a matching
157b46f4324SNate Lawson.Xr sysctl 8
158b46f4324SNate Lawsonentry for access after boot.
159edd84e48SNate Lawson.Bl -tag -width indent
160edd84e48SNate Lawson.It Va acpi_dsdt_load
161edd84e48SNate LawsonEnables loading of a custom ACPI DSDT.
162edd84e48SNate Lawson.It Va acpi_dsdt_name
163edd84e48SNate LawsonName of the DSDT table to load, if loading is enabled.
164edd84e48SNate Lawson.It Va debug.acpi.disabled
165edd84e48SNate LawsonSelectively disables portions of ACPI for debugging purposes.
16626db811eSNate Lawson.It Va debug.acpi.max_threads
16726db811eSNate LawsonSpecify the number of task threads that are started on boot.
16826db811eSNate LawsonLimiting this to 1 may help work around various BIOSes that cannot
16926db811eSNate Lawsonhandle parallel requests.
17026db811eSNate LawsonThe default value is 3.
17147bc6a5eSNate Lawson.It Va debug.acpi.quirks
17247bc6a5eSNate LawsonOverride any automatic quirks completely.
173b46f4324SNate Lawson.It Va debug.acpi.resume_beep
174b46f4324SNate LawsonBeep the PC speaker on resume.
175b46f4324SNate LawsonThis can help diagnose suspend/resume problems.
176b46f4324SNate LawsonDefault is 0 (disabled).
177edd84e48SNate Lawson.It Va hint.acpi.0.disabled
178edd84e48SNate LawsonSet this to 1 to disable all of ACPI.
179edd84e48SNate LawsonIf ACPI has been disabled on your system due to a blacklist entry for your
180edd84e48SNate LawsonBIOS, you can set this to 0 to re-enable ACPI for testing.
181edd84e48SNate Lawson.It Va hw.acpi.ec.poll_timeout
182edd84e48SNate LawsonDelay in milliseconds to wait for the EC to respond.
183edd84e48SNate LawsonTry increasing this number if you get the error
1842010c542SRuslan Ermilov.Qq Li AE_NO_HARDWARE_RESPONSE .
18547bc6a5eSNate Lawson.It Va hw.acpi.host_mem_start
18647bc6a5eSNate LawsonOverride the assumed memory starting address for PCI host bridges.
187edd84e48SNate Lawson.It Va hw.acpi.reset_video
188edd84e48SNate LawsonEnables calling the VESA reset BIOS vector on the resume path.
189b46f4324SNate LawsonThis can fix some graphics cards that have problems such as LCD white-out
190b46f4324SNate Lawsonafter resume.
191b46f4324SNate LawsonDefault is 0 (disabled).
192edd84e48SNate Lawson.It Va hw.acpi.serialize_methods
193edd84e48SNate LawsonAllow override of whether methods execute in parallel or not.
1942010c542SRuslan ErmilovEnable this for serial behavior, which fixes
1952010c542SRuslan Ermilov.Qq Li AE_ALREADY_EXISTS
1962010c542SRuslan Ermiloverrors for
1972010c542SRuslan ErmilovAML that really cannot handle parallel method execution.
198edd84e48SNate LawsonIt is off by default since this breaks recursive methods and some IBMs use
199edd84e48SNate Lawsonsuch code.
200edd84e48SNate Lawson.It Va hw.acpi.verbose
201edd84e48SNate LawsonTurn on verbose debugging information about what ACPI is doing.
202e862bc66SChristian Brueffer.It Va hw.pci.link.%s.%d.irq
20393870c05SNate LawsonOverride the interrupt to use for this link and index.
20493870c05SNate LawsonThis capability should be used carefully, and only if a device is not
20593870c05SNate Lawsonworking with
20693870c05SNate Lawson.Nm
20793870c05SNate Lawsonenabled.
20893870c05SNate Lawson.Qq %s
20993870c05SNate Lawsonis the name of the link (e.g., LNKA).
21093870c05SNate Lawson.Qq %d
21193870c05SNate Lawsonis the resource index when the link supports multiple IRQs.
21293870c05SNate LawsonMost PCI links only have one IRQ resource, so the below form should be used.
213e862bc66SChristian Brueffer.It Va hw.pci.link.%s.irq
214e862bc66SChristian BruefferOverride the interrupt to use.
21593870c05SNate LawsonThis capability should be used carefully, and only if a device is not
21693870c05SNate Lawsonworking with
21793870c05SNate Lawson.Nm
21893870c05SNate Lawsonenabled.
21993870c05SNate Lawson.Qq %s
22093870c05SNate Lawsonis the name of the link (e.g., LNKA).
221b6695bd0SMike Smith.El
222edd84e48SNate Lawson.Sh DISABLING ACPI
223edd84e48SNate LawsonSince ACPI support on different platforms varies greatly, there are many
224edd84e48SNate Lawsondebugging and tuning options available.
225b6695bd0SMike Smith.Pp
22607e2d046SMark SantcroosFor machines known not to work with
22707e2d046SMark Santcroos.Nm
22855c71dc9SMark Santcroosenabled, there is a BIOS blacklist.
22955c71dc9SMark SantcroosCurrently, the blacklist only controls whether
23007e2d046SMark Santcroos.Nm
23155c71dc9SMark Santcroosshould be disabled or not.
23255c71dc9SMark SantcroosIn the future, it will have more granularity to control features (the
23355c71dc9SMark Santcroosinfrastructure for that is already there).
23407e2d046SMark Santcroos.Pp
23507e2d046SMark SantcroosTo enable
23607e2d046SMark Santcroos.Nm
23755c71dc9SMark Santcroos(for debugging purposes, etc.) on machines that are on the blacklist, set the
23855c71dc9SMark Santcrooskernel environment variable
23907e2d046SMark Santcroos.Va hint.acpi.0.disabled
24055c71dc9SMark Santcroosto 0.
24155c71dc9SMark SantcroosBefore trying this, consider updating your BIOS to a more recent version that
24255c71dc9SMark Santcroosmay be compatible with ACPI.
24307e2d046SMark Santcroos.Pp
2444e3148f4SWarner LoshTo disable the
2454e3148f4SWarner Losh.Nm
2464e3148f4SWarner Loshdriver completely, set the kernel environment variable
2474e3148f4SWarner Losh.Va hint.acpi.0.disabled
248d865f9efSWes Petersto 1.
249d865f9efSWes Peters.Pp
2504e3148f4SWarner LoshSome i386 machines totally fail to operate with some or all of ACPI disabled.
2514e3148f4SWarner LoshOther i386 machines fail with ACPI enabled.
252edd84e48SNate LawsonDisabling all or part of ACPI on non-i386 platforms (i.e., platforms where
253edd84e48SNate LawsonACPI support is mandatory) may result in a non-functional system.
2544e3148f4SWarner Losh.Pp
255b6695bd0SMike SmithThe
256b6695bd0SMike Smith.Nm
257b6695bd0SMike Smithdriver comprises a set of drivers, which may be selectively disabled
258b6695bd0SMike Smithin case of problems.
259b6695bd0SMike SmithTo disable a sub-driver, list it in the kernel
260b6695bd0SMike Smithenvironment variable
2613184cf5aSNate Lawson.Va debug.acpi.disabled .
26237c51fd9SNate LawsonMultiple entries can be listed, separated by a space.
263b6695bd0SMike Smith.Pp
264b6695bd0SMike SmithACPI sub-devices and features that can be disabled:
2652010c542SRuslan Ermilov.Bl -tag -width ".Li sysresource"
26637c51fd9SNate Lawson.It Li all
267e821c364SNate LawsonDisable all ACPI features and devices.
26818974fe8SNate Lawson.It Li acad
26918974fe8SNate Lawson.Pq Vt device
27018974fe8SNate LawsonSupports AC adapter.
27187b6284aSRuslan Ermilov.It Li bus
272b6695bd0SMike Smith.Pq Vt feature
273b6695bd0SMike SmithProbes and attaches subdevices.
274b6695bd0SMike SmithDisabling will avoid scanning the ACPI namespace entirely.
27587b6284aSRuslan Ermilov.It Li children
276b6695bd0SMike Smith.Pq Vt feature
277b6695bd0SMike SmithAttaches standard ACPI sub-drivers and devices enumerated in the
278b6695bd0SMike SmithACPI namespace.
279b6695bd0SMike SmithDisabling this has a similar effect to disabling
28087b6284aSRuslan Ermilov.Dq Li bus ,
281b6695bd0SMike Smithexcept that the
282b6695bd0SMike SmithACPI namespace will still be scanned.
28387b6284aSRuslan Ermilov.It Li button
284b6695bd0SMike Smith.Pq Vt device
285bf7f20c2SRuslan ErmilovSupports ACPI button devices (typically power and sleep buttons).
28637c51fd9SNate Lawson.It Li cmbat
28737c51fd9SNate Lawson.Pq Vt device
28837c51fd9SNate LawsonControl-method batteries device.
28937c51fd9SNate Lawson.It Li cpu
29037c51fd9SNate Lawson.Pq Vt device
29137c51fd9SNate LawsonSupports CPU power-saving and speed-setting functions.
29287b6284aSRuslan Ermilov.It Li ec
293b6695bd0SMike Smith.Pq Vt device
29437c51fd9SNate LawsonSupports the ACPI Embedded Controller interface, used to communicate
29537c51fd9SNate Lawsonwith embedded platform controllers.
29687b6284aSRuslan Ermilov.It Li isa
297b6695bd0SMike Smith.Pq Vt device
298b6695bd0SMike SmithSupports an ISA bus bridge defined in the ACPI namespace,
299b6695bd0SMike Smithtypically as a child of a PCI bus.
30087b6284aSRuslan Ermilov.It Li lid
301b6695bd0SMike Smith.Pq Vt device
302b6695bd0SMike SmithSupports an ACPI laptop lid switch, which typically puts a
303b6695bd0SMike Smithsystem to sleep.
3044e376d58SNate Lawson.It Li quirks
3054e376d58SNate Lawson.Pq Vt feature
306bf7f20c2SRuslan ErmilovDo not honor quirks.
3074e376d58SNate LawsonQuirks automatically disable ACPI functionality based on the XSDT table's
3084e376d58SNate LawsonOEM vendor name and revision date.
30987b6284aSRuslan Ermilov.It Li pci
310b6695bd0SMike Smith.Pq Vt device
311b6695bd0SMike SmithSupports Host to PCI bridges.
31237c51fd9SNate Lawson.It Li pci_link
313e821c364SNate Lawson.Pq Vt feature
31437c51fd9SNate LawsonPerforms PCI interrupt routing.
31537c51fd9SNate Lawson.It Li sysresource
31637c51fd9SNate Lawson.Pq Vt device
31737c51fd9SNate LawsonPseudo-devices containing resources which ACPI claims.
31887b6284aSRuslan Ermilov.It Li thermal
319b6695bd0SMike Smith.Pq Vt device
320b6695bd0SMike SmithSupports system cooling and heat management.
32187b6284aSRuslan Ermilov.It Li timer
322b6695bd0SMike Smith.Pq Vt device
323b6695bd0SMike SmithImplements a timecounter using the ACPI fixed-frequency timer.
324401cdd95STom Rhodes.It Li video
325401cdd95STom Rhodes.Pq Vt device
3264f068961SRuslan ErmilovSupports
3274f068961SRuslan Ermilov.Xr acpi_video 4
3284f068961SRuslan Ermilovwhich may conflict with
3294f068961SRuslan Ermilov.Xr agp 4
3304f068961SRuslan Ermilovdevice.
331b6695bd0SMike Smith.El
332b6695bd0SMike Smith.Pp
333b6695bd0SMike SmithIt is also possible to avoid portions of the ACPI namespace which
334b6695bd0SMike Smithmay be causing problems, by listing the full path of the root of
335b6695bd0SMike Smiththe region to be avoided in the kernel environment variable
336b6695bd0SMike Smith.Va debug.acpi.avoid .
337b6695bd0SMike SmithThe object and all of its children will be ignored during the
33887b6284aSRuslan Ermilovbus/children scan of the namespace.
339401b484bSNate LawsonThe ACPI CA code will still know about the avoided region.
340edd84e48SNate Lawson.Sh DEBUGGING OUTPUT
341edd84e48SNate LawsonTo enable debugging output,
342edd84e48SNate Lawson.Nm
343edd84e48SNate Lawsonmust be compiled with
3442010c542SRuslan Ermilov.Cd "options ACPI_DEBUG" .
345edd84e48SNate LawsonDebugging output is separated between layers and levels, where a layer is
346edd84e48SNate Lawsona component of the ACPI subsystem, and a level is a particular kind
347edd84e48SNate Lawsonof debugging output.
348edd84e48SNate Lawson.Pp
349edd84e48SNate LawsonBoth layers and levels are specified as a whitespace-separated list of
350edd84e48SNate Lawsontokens, with layers listed in
351edd84e48SNate Lawson.Va debug.acpi.layer
352edd84e48SNate Lawsonand levels in
353edd84e48SNate Lawson.Va debug.acpi.level .
354401b484bSNate Lawson.Pp
355401b484bSNate LawsonThe first set of layers is for ACPI-CA components, and the second is for
356401b484bSNate Lawson.Fx
357401b484bSNate Lawsondrivers.
358401b484bSNate LawsonThe ACPI-CA layer descriptions include the prefix for the files they
359401b484bSNate Lawsonrefer to.
360edd84e48SNate LawsonThe supported layers are:
361edd84e48SNate Lawson.Pp
3622010c542SRuslan Ermilov.Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
363edd84e48SNate Lawson.It Li ACPI_UTILITIES
364401b484bSNate LawsonUtility ("ut") functions
365edd84e48SNate Lawson.It Li ACPI_HARDWARE
366401b484bSNate LawsonHardware access ("hw")
367edd84e48SNate Lawson.It Li ACPI_EVENTS
368401b484bSNate LawsonEvent and GPE ("ev")
369edd84e48SNate Lawson.It Li ACPI_TABLES
370401b484bSNate LawsonTable access ("tb")
371edd84e48SNate Lawson.It Li ACPI_NAMESPACE
372401b484bSNate LawsonNamespace evaluation ("ns")
373edd84e48SNate Lawson.It Li ACPI_PARSER
374401b484bSNate LawsonAML parser ("ps")
375edd84e48SNate Lawson.It Li ACPI_DISPATCHER
376401b484bSNate LawsonInternal representation of interpreter state ("ds")
377edd84e48SNate Lawson.It Li ACPI_EXECUTER
378401b484bSNate LawsonExecute AML methods ("ex")
379edd84e48SNate Lawson.It Li ACPI_RESOURCES
380401b484bSNate LawsonResource parsing ("rs")
381edd84e48SNate Lawson.It Li ACPI_CA_DEBUGGER
382401b484bSNate LawsonDebugger implementation ("db", "dm")
383edd84e48SNate Lawson.It Li ACPI_OS_SERVICES
384401b484bSNate LawsonUsermode support routines ("os")
385edd84e48SNate Lawson.It Li ACPI_CA_DISASSEMBLER
386401b484bSNate LawsonDisassembler implementation (unused)
387edd84e48SNate Lawson.It Li ACPI_ALL_COMPONENTS
388edd84e48SNate LawsonAll the above ACPI-CA components
389edd84e48SNate Lawson.It Li ACPI_AC_ADAPTER
390edd84e48SNate LawsonAC adapter driver
391edd84e48SNate Lawson.It Li ACPI_BATTERY
392edd84e48SNate LawsonControl-method battery driver
393edd84e48SNate Lawson.It Li ACPI_BUS
394edd84e48SNate LawsonACPI, ISA, and PCI bus drivers
395edd84e48SNate Lawson.It Li ACPI_BUTTON
396edd84e48SNate LawsonPower and sleep button driver
397edd84e48SNate Lawson.It Li ACPI_EC
398edd84e48SNate LawsonEmbedded controller driver
399edd84e48SNate Lawson.It Li ACPI_FAN
400edd84e48SNate LawsonFan driver
401edd84e48SNate Lawson.It Li ACPI_OEM
402edd84e48SNate LawsonPlatform-specific driver for hotkeys, LED, etc.
403edd84e48SNate Lawson.It Li ACPI_POWER
404edd84e48SNate LawsonPower resource driver
405edd84e48SNate Lawson.It Li ACPI_PROCESSOR
406edd84e48SNate LawsonCPU driver
407edd84e48SNate Lawson.It Li ACPI_THERMAL
408edd84e48SNate LawsonThermal zone driver
409edd84e48SNate Lawson.It Li ACPI_TIMER
410edd84e48SNate LawsonTimer driver
411edd84e48SNate Lawson.It Li ACPI_ALL_DRIVERS
412edd84e48SNate LawsonAll the above
413edd84e48SNate Lawson.Fx
414edd84e48SNate LawsonACPI drivers
415edd84e48SNate Lawson.El
416edd84e48SNate Lawson.Pp
417edd84e48SNate LawsonThe supported levels are:
418edd84e48SNate Lawson.Pp
4192010c542SRuslan Ermilov.Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
420edd84e48SNate Lawson.It Li ACPI_LV_ERROR
421401b484bSNate LawsonFatal error conditions
422edd84e48SNate Lawson.It Li ACPI_LV_WARN
423401b484bSNate LawsonWarnings and potential problems
424edd84e48SNate Lawson.It Li ACPI_LV_INIT
425401b484bSNate LawsonInitialization progress
426edd84e48SNate Lawson.It Li ACPI_LV_DEBUG_OBJECT
427401b484bSNate LawsonStores to objects
428edd84e48SNate Lawson.It Li ACPI_LV_INFO
429401b484bSNate LawsonGeneral information and progress
430edd84e48SNate Lawson.It Li ACPI_LV_ALL_EXCEPTIONS
431401b484bSNate LawsonAll the previous levels
432edd84e48SNate Lawson.It Li ACPI_LV_INIT_NAMES
433edd84e48SNate Lawson.It Li ACPI_LV_PARSE
434edd84e48SNate Lawson.It Li ACPI_LV_LOAD
435edd84e48SNate Lawson.It Li ACPI_LV_DISPATCH
436edd84e48SNate Lawson.It Li ACPI_LV_EXEC
437edd84e48SNate Lawson.It Li ACPI_LV_NAMES
438edd84e48SNate Lawson.It Li ACPI_LV_OPREGION
439edd84e48SNate Lawson.It Li ACPI_LV_BFIELD
440edd84e48SNate Lawson.It Li ACPI_LV_TABLES
441edd84e48SNate Lawson.It Li ACPI_LV_VALUES
442edd84e48SNate Lawson.It Li ACPI_LV_OBJECTS
443edd84e48SNate Lawson.It Li ACPI_LV_RESOURCES
444edd84e48SNate Lawson.It Li ACPI_LV_USER_REQUESTS
445edd84e48SNate Lawson.It Li ACPI_LV_PACKAGE
446edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY1
447401b484bSNate LawsonAll the previous levels
448edd84e48SNate Lawson.It Li ACPI_LV_ALLOCATIONS
449edd84e48SNate Lawson.It Li ACPI_LV_FUNCTIONS
450edd84e48SNate Lawson.It Li ACPI_LV_OPTIMIZATIONS
451edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY2
452edd84e48SNate Lawson.It Li ACPI_LV_ALL
453edd84e48SNate Lawson.It Li ACPI_LV_MUTEX
454edd84e48SNate Lawson.It Li ACPI_LV_THREADS
455edd84e48SNate Lawson.It Li ACPI_LV_IO
456edd84e48SNate Lawson.It Li ACPI_LV_INTERRUPTS
457edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY3
458401b484bSNate LawsonAll the previous levels
459edd84e48SNate Lawson.It Li ACPI_LV_AML_DISASSEMBLE
460edd84e48SNate Lawson.It Li ACPI_LV_VERBOSE_INFO
461edd84e48SNate Lawson.It Li ACPI_LV_FULL_TABLES
462edd84e48SNate Lawson.It Li ACPI_LV_EVENTS
463edd84e48SNate Lawson.It Li ACPI_LV_VERBOSE
464401b484bSNate LawsonAll levels after
465401b484bSNate Lawson.Qq Li ACPI_LV_VERBOSITY3
466edd84e48SNate Lawson.El
467edd84e48SNate Lawson.Pp
468edd84e48SNate LawsonSelection of the appropriate layer and level values is important
469edd84e48SNate Lawsonto avoid massive amounts of debugging output.
470401b484bSNate LawsonFor example, the following configuration is a good way to gather initial
471401b484bSNate Lawsoninformation.
472401b484bSNate LawsonIt enables debug output for both ACPI-CA and the
473401b484bSNate Lawson.Nm
474401b484bSNate Lawsondriver, printing basic information about errors, warnings, and progress.
475401b484bSNate Lawson.Bd -literal -offset indent
476401b484bSNate Lawsondebug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
477401b484bSNate Lawsondebug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
478401b484bSNate Lawson.Ed
479edd84e48SNate Lawson.Pp
480edd84e48SNate LawsonDebugging output by the ACPI CA subsystem is prefixed with the
481edd84e48SNate Lawsonmodule name in lowercase, followed by a source line number.
482edd84e48SNate LawsonOutput from the
483edd84e48SNate Lawson.Fx Ns -local
484edd84e48SNate Lawsoncode follows the same format, but
485edd84e48SNate Lawsonthe module name is uppercased.
486f0da5f56STakanori Watanabe.Sh OVERRIDING YOUR BIOS BYTECODE
487287460e8SNate LawsonACPI interprets bytecode named AML
488287460e8SNate Lawson(ACPI Machine Language)
489287460e8SNate Lawsonprovided by the BIOS vendor as a memory image at boot time.
490287460e8SNate LawsonSometimes, the AML code contains a bug that does not appear when parsed
491287460e8SNate Lawsonby the Microsoft implementation.
492287460e8SNate Lawson.Fx
493287460e8SNate Lawsonprovides a way to override it with your own AML code to work around
494287460e8SNate Lawsonor debug such problems.
495287460e8SNate LawsonNote that all AML in your DSDT and any SSDT tables is overridden.
496f0da5f56STakanori Watanabe.Pp
497287460e8SNate LawsonIn order to load your AML code, you must edit
498f0da5f56STakanori Watanabe.Pa /boot/loader.conf
499287460e8SNate Lawsonand include the following lines.
500f0da5f56STakanori Watanabe.Bd -literal -offset indent
501f0da5f56STakanori Watanabeacpi_dsdt_load="YES"
502287460e8SNate Lawsonacpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
503f0da5f56STakanori Watanabe.Ed
504f0da5f56STakanori Watanabe.Pp
505a627f55aSRuslan ErmilovIn order to prepare your AML code, you will need the
506a627f55aSRuslan Ermilov.Xr acpidump 8
507a627f55aSRuslan Ermilovand
5082010c542SRuslan Ermilov.Xr iasl 8
509297835bcSNate Lawsonutilities and some ACPI knowledge.
510b6695bd0SMike Smith.Sh COMPATIBILITY
5116b74f9b7SNate LawsonACPI is only found and supported on i386/ia32, ia64, and amd64.
512b6695bd0SMike Smith.Sh SEE ALSO
5135413d9e0SWes Peters.Xr kenv 1 ,
514673fbcacSRuslan Ermilov.Xr acpi_thermal 4 ,
5155413d9e0SWes Peters.Xr device.hints 5 ,
516f0da5f56STakanori Watanabe.Xr loader.conf 5 ,
517f64a0a56SRobert Watson.Xr acpiconf 8 ,
518f0da5f56STakanori Watanabe.Xr acpidump 8 ,
519297835bcSNate Lawson.Xr config 8 ,
520297835bcSNate Lawson.Xr iasl 8
521f0da5f56STakanori Watanabe.Rs
522a627f55aSRuslan Ermilov.%A "Compaq Computer Corporation"
523a627f55aSRuslan Ermilov.%A "Intel Corporation"
524a627f55aSRuslan Ermilov.%A "Microsoft Corporation"
525a627f55aSRuslan Ermilov.%A "Phoenix Technologies Ltd."
526a627f55aSRuslan Ermilov.%A "Toshiba Corporation"
527c25a3f8aSNate Lawson.%D August 25, 2003
528f0da5f56STakanori Watanabe.%T "Advanced Configuration and Power Interface Specification"
529f0da5f56STakanori Watanabe.%O http://acpi.info/spec.htm
530f0da5f56STakanori Watanabe.Re
53187b6284aSRuslan Ermilov.Sh AUTHORS
53287b6284aSRuslan Ermilov.An -nosplit
533b6695bd0SMike SmithThe ACPI CA subsystem is developed and maintained by
534b6695bd0SMike SmithIntel Architecture Labs.
535b6695bd0SMike Smith.Pp
536b6695bd0SMike SmithThe following people made notable contributions to the ACPI subsystem
537b6695bd0SMike Smithin
538b6695bd0SMike Smith.Fx :
539718a5d6aSNate Lawson.An Michael Smith ,
54087b6284aSRuslan Ermilov.An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
54187b6284aSRuslan Ermilov.An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
542b6695bd0SMike Smith.An Munehiro Matsuda ,
543718a5d6aSNate Lawson.An Nate Lawson ,
544b6695bd0SMike Smiththe ACPI-jp mailing list at
54587b6284aSRuslan Ermilov.Aq acpi-jp@jp.FreeBSD.org ,
546b6695bd0SMike Smithand many other contributors.
547b6695bd0SMike Smith.Pp
548b6695bd0SMike SmithThis manual page was written by
54987b6284aSRuslan Ermilov.An Michael Smith Aq msmith@FreeBSD.org .
550b6695bd0SMike Smith.Sh BUGS
551d1f717d1SMike SmithIf the
552d1f717d1SMike Smith.Nm
553d1f717d1SMike Smithdriver is loaded as a module when it is already linked as part of the
554d1f717d1SMike Smithkernel, odd things may happen.
55593870c05SNate Lawson.Pp
55693870c05SNate LawsonMany BIOS versions have serious bugs that may cause system instability,
55793870c05SNate Lawsonbreak suspend/resume, or prevent devices from operating properly due to
55893870c05SNate LawsonIRQ routing problems.
55993870c05SNate LawsonUpgrade your BIOS to the latest version available from the vendor before
56093870c05SNate Lawsondeciding it's a problem with
56193870c05SNate Lawson.Nm .
562