xref: /freebsd/share/man/man4/acpi.4 (revision 970ffdcefe89c6814f14e2dd59565346e32f8c18)
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.\"
28b57a73f8SKonstantin Belousov.Dd May 9, 2015
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.
640782e8faSChristian BruefferNote that some variables will be available only if the given hardware supports
650782e8faSChristian Bruefferthem (such as
660782e8faSChristian Brueffer.Va hw.acpi.acline ) .
67edd84e48SNate Lawson.Bl -tag -width indent
68ef47c93fSJung-uk Kim.It Va debug.acpi.enable_debug_objects
69ef47c93fSJung-uk KimEnable dumping Debug objects without
70ef47c93fSJung-uk Kim.Cd "options ACPI_DEBUG" .
71ef47c93fSJung-uk KimDefault is 0, ignore Debug objects.
72b57a73f8SKonstantin Belousov.It Va dev.cpu.N.cx_usage
73edd84e48SNate LawsonDebugging information listing the percent of total usage for each sleep state.
74edd84e48SNate LawsonThe values are reset when
75b57a73f8SKonstantin Belousov.Va dev.cpu.N.cx_lowest
76edd84e48SNate Lawsonis modified.
77b57a73f8SKonstantin Belousov.It Va dev.cpu.N.cx_lowest
78edd84e48SNate LawsonLowest Cx state to use for idling the CPU.
7903335ffbSYaroslav TykhiyA scheduling algorithm will select states between
8003335ffbSYaroslav Tykhiy.Li C1
8103335ffbSYaroslav Tykhiyand this setting
82edd84e48SNate Lawsonas system load dictates.
83edd84e48SNate LawsonTo enable ACPI CPU idling control,
84947bb4a4SAndriy Gapon.Va machdep.idle
85947bb4a4SAndriy Gaponshould be set to
86947bb4a4SAndriy Gapon.Li acpi
87947bb4a4SAndriy Gaponif it is listed in
880782e8faSChristian Brueffer.Va machdep.idle_available .
89edd84e48SNate Lawson.It Va hw.acpi.cpu.cx_supported
90edd84e48SNate LawsonList of supported CPU idle states and their transition latency
91edd84e48SNate Lawsonin microseconds.
9203335ffbSYaroslav TykhiyEach state has a type (e.g.,
9303335ffbSYaroslav Tykhiy.Li C2 ) .
9403335ffbSYaroslav Tykhiy.Li C1
9503335ffbSYaroslav Tykhiyis equivalent to the ia32
9603335ffbSYaroslav Tykhiy.Li HLT
9703335ffbSYaroslav Tykhiyinstruction,
9803335ffbSYaroslav Tykhiy.Li C2
9903335ffbSYaroslav Tykhiyprovides a deeper
10003335ffbSYaroslav Tykhiysleep with the same semantics, and
10103335ffbSYaroslav Tykhiy.Li C3
10203335ffbSYaroslav Tykhiyprovides the deepest sleep
103edd84e48SNate Lawsonbut additionally requires bus mastering to be disabled.
10403335ffbSYaroslav TykhiyStates greater than
10503335ffbSYaroslav Tykhiy.Li C3
10603335ffbSYaroslav Tykhiyprovide even more power savings with the same
10703335ffbSYaroslav Tykhiysemantics as the
10803335ffbSYaroslav Tykhiy.Li C3
10903335ffbSYaroslav Tykhiystate.
110edd84e48SNate LawsonDeeper sleeps provide more power savings but increased transition
111edd84e48SNate Lawsonlatency when an interrupt occurs.
112b57a73f8SKonstantin Belousov.It Va dev.cpu.N.cx_method
113b57a73f8SKonstantin BelousovList of supported CPU idle states and their transition methods, as
114b57a73f8SKonstantin Belousovdirected by the firmware.
115b57a73f8SKonstantin Belousov.It Va hw.acpi.acline
116b57a73f8SKonstantin BelousovAC line state (1 means online, 0 means on battery power).
11793870c05SNate Lawson.It Va hw.acpi.disable_on_reboot
11893870c05SNate LawsonDisable ACPI during the reboot process.
11993870c05SNate LawsonMost systems reboot fine with ACPI still enabled, but some require
12093870c05SNate Lawsonexiting to legacy mode first.
12193870c05SNate LawsonDefault is 0, leave ACPI enabled.
12293870c05SNate Lawson.It Va hw.acpi.handle_reboot
12393870c05SNate LawsonUse the ACPI Reset Register capability to reboot the system.
12493870c05SNate LawsonSome newer systems require use of this register, while some only work
12593870c05SNate Lawsonwith legacy rebooting support.
12693870c05SNate Lawson.It Va hw.acpi.lid_switch_state
12713a8aa9fSNate LawsonSuspend state
12803335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
129*970ffdceSYuri Pankovto enter when the lid switch (i.e., a notebook screen) is closed, or
13003335ffbSYaroslav Tykhiy.Dq Li NONE
131*970ffdceSYuri Pankov.Pq do nothing .
132*970ffdceSYuri PankovDefault is
133*970ffdceSYuri Pankov.Dq Li NONE .
13493870c05SNate Lawson.It Va hw.acpi.power_button_state
13513a8aa9fSNate LawsonSuspend state
13603335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
137*970ffdceSYuri Pankovto enter when the power button is pressed, or
138*970ffdceSYuri Pankov.Dq Li NONE
139*970ffdceSYuri Pankov.Pq do nothing .
14013a8aa9fSNate LawsonDefault is
14103335ffbSYaroslav Tykhiy.Li S5
14213a8aa9fSNate Lawson(power-off nicely).
14393870c05SNate Lawson.It Va hw.acpi.reset_video
14493870c05SNate LawsonReset the video adapter from real mode during the resume path.
14593870c05SNate LawsonSome systems need this help, others have display problems if it is enabled.
14693870c05SNate LawsonDefault is 0 (disabled).
14793870c05SNate Lawson.It Va hw.acpi.s4bios
14813a8aa9fSNate LawsonIndicate whether the system supports
14903335ffbSYaroslav Tykhiy.Li S4BIOS .
15093870c05SNate LawsonThis means that the BIOS can handle all the functions of suspending the
15193870c05SNate Lawsonsystem to disk.
15213a8aa9fSNate LawsonOtherwise, the OS is responsible for suspending to disk
15303335ffbSYaroslav Tykhiy.Pq Li S4OS .
15413a8aa9fSNate LawsonMost current systems do not support
15503335ffbSYaroslav Tykhiy.Li S4BIOS .
15693870c05SNate Lawson.It Va hw.acpi.sleep_button_state
15713a8aa9fSNate LawsonSuspend state
15803335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
15913a8aa9fSNate Lawsonto enter when the sleep button is pressed.
16093870c05SNate LawsonThis is usually a special function button on the keyboard.
16113a8aa9fSNate LawsonDefault is
16203335ffbSYaroslav Tykhiy.Li S3
16313a8aa9fSNate Lawson(suspend-to-RAM).
16493870c05SNate Lawson.It Va hw.acpi.sleep_delay
16593870c05SNate LawsonWait this number of seconds between preparing the system to suspend and
16693870c05SNate Lawsonactually entering the suspend state.
16793870c05SNate LawsonDefault is 1 second.
16893870c05SNate Lawson.It Va hw.acpi.supported_sleep_state
16913a8aa9fSNate LawsonSuspend states
17003335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
17113a8aa9fSNate Lawsonsupported by the BIOS.
17293870c05SNate Lawson.Bl -tag -width indent
17303335ffbSYaroslav Tykhiy.It Li S1
17493870c05SNate LawsonQuick suspend to RAM.
17503335ffbSYaroslav TykhiyThe CPU enters a lower power state, but most peripherals are left running.
17603335ffbSYaroslav Tykhiy.It Li S2
17713a8aa9fSNate LawsonLower power state than
17803335ffbSYaroslav Tykhiy.Li S1 ,
17913a8aa9fSNate Lawsonbut with the same basic characteristics.
18093870c05SNate LawsonNot supported by many systems.
18103335ffbSYaroslav Tykhiy.It Li S3
18293870c05SNate LawsonSuspend to RAM.
18303335ffbSYaroslav TykhiyMost devices are powered off, and the system stops running except for
18493870c05SNate Lawsonmemory refresh.
18503335ffbSYaroslav Tykhiy.It Li S4
18693870c05SNate LawsonSuspend to disk.
18703335ffbSYaroslav TykhiyAll devices are powered off, and the system stops running.
18893870c05SNate LawsonWhen resuming, the system starts as if from a cold power on.
18993870c05SNate LawsonNot yet supported by
19093870c05SNate Lawson.Fx
19113a8aa9fSNate Lawsonunless
19203335ffbSYaroslav Tykhiy.Li S4BIOS
19313a8aa9fSNate Lawsonis available.
19403335ffbSYaroslav Tykhiy.It Li S5
19593870c05SNate LawsonSystem shuts down cleanly and powers off.
19693870c05SNate Lawson.El
19793870c05SNate Lawson.It Va hw.acpi.verbose
19893870c05SNate LawsonEnable verbose printing from the various ACPI subsystems.
199edd84e48SNate Lawson.El
20044cb3ab0SHiroki Sato.Sh LOADER TUNABLES
2013184cf5aSNate LawsonTunables can be set at the
20287b6284aSRuslan Ermilov.Xr loader 8
2033184cf5aSNate Lawsonprompt before booting the kernel or stored in
2043184cf5aSNate Lawson.Pa /boot/loader.conf .
205b46f4324SNate LawsonMany of these tunables also have a matching
206b46f4324SNate Lawson.Xr sysctl 8
207b46f4324SNate Lawsonentry for access after boot.
208edd84e48SNate Lawson.Bl -tag -width indent
209edd84e48SNate Lawson.It Va acpi_dsdt_load
210edd84e48SNate LawsonEnables loading of a custom ACPI DSDT.
211edd84e48SNate Lawson.It Va acpi_dsdt_name
212edd84e48SNate LawsonName of the DSDT table to load, if loading is enabled.
213e5751426SJung-uk Kim.It Va debug.acpi.cpu_unordered
21492fa7e24SJung-uk KimDo not use the MADT to match ACPI Processor objects to CPUs.
215e5751426SJung-uk KimThis is needed on a few systems with a buggy BIOS that does not use
216e5751426SJung-uk Kimconsistent processor IDs.
217e5751426SJung-uk KimDefault is 0 (disabled).
218edd84e48SNate Lawson.It Va debug.acpi.disabled
219edd84e48SNate LawsonSelectively disables portions of ACPI for debugging purposes.
220ef47c93fSJung-uk Kim.It Va debug.acpi.interpreter_slack
221ef47c93fSJung-uk KimEnable less strict ACPI implementations.
222ef47c93fSJung-uk KimDefault is 1, ignore common BIOS mistakes.
22326db811eSNate Lawson.It Va debug.acpi.max_threads
22426db811eSNate LawsonSpecify the number of task threads that are started on boot.
22526db811eSNate LawsonLimiting this to 1 may help work around various BIOSes that cannot
22626db811eSNate Lawsonhandle parallel requests.
22726db811eSNate LawsonThe default value is 3.
22847bc6a5eSNate Lawson.It Va debug.acpi.quirks
22947bc6a5eSNate LawsonOverride any automatic quirks completely.
230b46f4324SNate Lawson.It Va debug.acpi.resume_beep
231b46f4324SNate LawsonBeep the PC speaker on resume.
232b46f4324SNate LawsonThis can help diagnose suspend/resume problems.
233b46f4324SNate LawsonDefault is 0 (disabled).
234edd84e48SNate Lawson.It Va hint.acpi.0.disabled
235edd84e48SNate LawsonSet this to 1 to disable all of ACPI.
236edd84e48SNate LawsonIf ACPI has been disabled on your system due to a blacklist entry for your
237edd84e48SNate LawsonBIOS, you can set this to 0 to re-enable ACPI for testing.
238edd84e48SNate Lawson.It Va hw.acpi.ec.poll_timeout
239edd84e48SNate LawsonDelay in milliseconds to wait for the EC to respond.
240edd84e48SNate LawsonTry increasing this number if you get the error
2412010c542SRuslan Ermilov.Qq Li AE_NO_HARDWARE_RESPONSE .
24247bc6a5eSNate Lawson.It Va hw.acpi.host_mem_start
24347bc6a5eSNate LawsonOverride the assumed memory starting address for PCI host bridges.
24466f369d0SJung-uk Kim.It Va hw.acpi.install_interface , hw.acpi.remove_interface
24566f369d0SJung-uk KimInstall or remove OS interface(s) to control return value of
24666f369d0SJung-uk Kim.Ql _OSI
2479f4fae39SAlexander Motinquery method.
2489f4fae39SAlexander MotinWhen an OS interface is specified in
24966f369d0SJung-uk Kim.Va hw.acpi.install_interface ,
25066f369d0SJung-uk Kim.Li _OSI
25166f369d0SJung-uk Kimquery for the interface returns it is
25266f369d0SJung-uk Kim.Em supported .
25366f369d0SJung-uk KimConversely, when an OS interface is specified in
25466f369d0SJung-uk Kim.Va hw.acpi.remove_interface ,
25566f369d0SJung-uk Kim.Li _OSI
25666f369d0SJung-uk Kimquery returns it is
25766f369d0SJung-uk Kim.Em not supported .
25866f369d0SJung-uk KimMultiple interfaces can be specified in a comma-separated list and
2599f4fae39SAlexander Motinany leading white spaces will be ignored.
2609f4fae39SAlexander MotinFor example,
26166f369d0SJung-uk Kim.Qq Li FreeBSD, Linux
26266f369d0SJung-uk Kimis a valid list of two interfaces
26366f369d0SJung-uk Kim.Qq Li FreeBSD
26466f369d0SJung-uk Kimand
26566f369d0SJung-uk Kim.Qq Li Linux .
266edd84e48SNate Lawson.It Va hw.acpi.reset_video
267edd84e48SNate LawsonEnables calling the VESA reset BIOS vector on the resume path.
268b46f4324SNate LawsonThis can fix some graphics cards that have problems such as LCD white-out
269b46f4324SNate Lawsonafter resume.
270b46f4324SNate LawsonDefault is 0 (disabled).
271edd84e48SNate Lawson.It Va hw.acpi.serialize_methods
272edd84e48SNate LawsonAllow override of whether methods execute in parallel or not.
2732010c542SRuslan ErmilovEnable this for serial behavior, which fixes
2742010c542SRuslan Ermilov.Qq Li AE_ALREADY_EXISTS
2752010c542SRuslan Ermiloverrors for
2762010c542SRuslan ErmilovAML that really cannot handle parallel method execution.
277edd84e48SNate LawsonIt is off by default since this breaks recursive methods and some IBMs use
278edd84e48SNate Lawsonsuch code.
279edd84e48SNate Lawson.It Va hw.acpi.verbose
280edd84e48SNate LawsonTurn on verbose debugging information about what ACPI is doing.
281e862bc66SChristian Brueffer.It Va hw.pci.link.%s.%d.irq
28293870c05SNate LawsonOverride the interrupt to use for this link and index.
28393870c05SNate LawsonThis capability should be used carefully, and only if a device is not
28493870c05SNate Lawsonworking with
28593870c05SNate Lawson.Nm
28693870c05SNate Lawsonenabled.
28793870c05SNate Lawson.Qq %s
28893870c05SNate Lawsonis the name of the link (e.g., LNKA).
28993870c05SNate Lawson.Qq %d
29093870c05SNate Lawsonis the resource index when the link supports multiple IRQs.
29193870c05SNate LawsonMost PCI links only have one IRQ resource, so the below form should be used.
292e862bc66SChristian Brueffer.It Va hw.pci.link.%s.irq
293e862bc66SChristian BruefferOverride the interrupt to use.
29493870c05SNate LawsonThis capability should be used carefully, and only if a device is not
29593870c05SNate Lawsonworking with
29693870c05SNate Lawson.Nm
29793870c05SNate Lawsonenabled.
29893870c05SNate Lawson.Qq %s
29993870c05SNate Lawsonis the name of the link (e.g., LNKA).
300b6695bd0SMike Smith.El
301edd84e48SNate Lawson.Sh DISABLING ACPI
302edd84e48SNate LawsonSince ACPI support on different platforms varies greatly, there are many
303edd84e48SNate Lawsondebugging and tuning options available.
304b6695bd0SMike Smith.Pp
30507e2d046SMark SantcroosFor machines known not to work with
30607e2d046SMark Santcroos.Nm
30755c71dc9SMark Santcroosenabled, there is a BIOS blacklist.
30855c71dc9SMark SantcroosCurrently, the blacklist only controls whether
30907e2d046SMark Santcroos.Nm
31055c71dc9SMark Santcroosshould be disabled or not.
31155c71dc9SMark SantcroosIn the future, it will have more granularity to control features (the
31255c71dc9SMark Santcroosinfrastructure for that is already there).
31307e2d046SMark Santcroos.Pp
31407e2d046SMark SantcroosTo enable
31507e2d046SMark Santcroos.Nm
31655c71dc9SMark Santcroos(for debugging purposes, etc.) on machines that are on the blacklist, set the
31755c71dc9SMark Santcrooskernel environment variable
31807e2d046SMark Santcroos.Va hint.acpi.0.disabled
31955c71dc9SMark Santcroosto 0.
32055c71dc9SMark SantcroosBefore trying this, consider updating your BIOS to a more recent version that
32155c71dc9SMark Santcroosmay be compatible with ACPI.
32207e2d046SMark Santcroos.Pp
3234e3148f4SWarner LoshTo disable the
3244e3148f4SWarner Losh.Nm
3254e3148f4SWarner Loshdriver completely, set the kernel environment variable
3264e3148f4SWarner Losh.Va hint.acpi.0.disabled
327d865f9efSWes Petersto 1.
328d865f9efSWes Peters.Pp
3294e3148f4SWarner LoshSome i386 machines totally fail to operate with some or all of ACPI disabled.
3304e3148f4SWarner LoshOther i386 machines fail with ACPI enabled.
331edd84e48SNate LawsonDisabling all or part of ACPI on non-i386 platforms (i.e., platforms where
332edd84e48SNate LawsonACPI support is mandatory) may result in a non-functional system.
3334e3148f4SWarner Losh.Pp
334b6695bd0SMike SmithThe
335b6695bd0SMike Smith.Nm
336b6695bd0SMike Smithdriver comprises a set of drivers, which may be selectively disabled
337b6695bd0SMike Smithin case of problems.
338b6695bd0SMike SmithTo disable a sub-driver, list it in the kernel
339b6695bd0SMike Smithenvironment variable
3403184cf5aSNate Lawson.Va debug.acpi.disabled .
34137c51fd9SNate LawsonMultiple entries can be listed, separated by a space.
342b6695bd0SMike Smith.Pp
343b6695bd0SMike SmithACPI sub-devices and features that can be disabled:
3442010c542SRuslan Ermilov.Bl -tag -width ".Li sysresource"
34537c51fd9SNate Lawson.It Li all
346e821c364SNate LawsonDisable all ACPI features and devices.
34718974fe8SNate Lawson.It Li acad
34818974fe8SNate Lawson.Pq Vt device
34918974fe8SNate LawsonSupports AC adapter.
35087b6284aSRuslan Ermilov.It Li bus
351b6695bd0SMike Smith.Pq Vt feature
352b6695bd0SMike SmithProbes and attaches subdevices.
353b6695bd0SMike SmithDisabling will avoid scanning the ACPI namespace entirely.
35487b6284aSRuslan Ermilov.It Li children
355b6695bd0SMike Smith.Pq Vt feature
356b6695bd0SMike SmithAttaches standard ACPI sub-drivers and devices enumerated in the
357b6695bd0SMike SmithACPI namespace.
358b6695bd0SMike SmithDisabling this has a similar effect to disabling
35987b6284aSRuslan Ermilov.Dq Li bus ,
360b6695bd0SMike Smithexcept that the
361b6695bd0SMike SmithACPI namespace will still be scanned.
36287b6284aSRuslan Ermilov.It Li button
363b6695bd0SMike Smith.Pq Vt device
364bf7f20c2SRuslan ErmilovSupports ACPI button devices (typically power and sleep buttons).
36537c51fd9SNate Lawson.It Li cmbat
36637c51fd9SNate Lawson.Pq Vt device
36737c51fd9SNate LawsonControl-method batteries device.
36837c51fd9SNate Lawson.It Li cpu
36937c51fd9SNate Lawson.Pq Vt device
37037c51fd9SNate LawsonSupports CPU power-saving and speed-setting functions.
37187b6284aSRuslan Ermilov.It Li ec
372b6695bd0SMike Smith.Pq Vt device
37337c51fd9SNate LawsonSupports the ACPI Embedded Controller interface, used to communicate
37437c51fd9SNate Lawsonwith embedded platform controllers.
37587b6284aSRuslan Ermilov.It Li isa
376b6695bd0SMike Smith.Pq Vt device
377b6695bd0SMike SmithSupports an ISA bus bridge defined in the ACPI namespace,
378b6695bd0SMike Smithtypically as a child of a PCI bus.
37987b6284aSRuslan Ermilov.It Li lid
380b6695bd0SMike Smith.Pq Vt device
381b6695bd0SMike SmithSupports an ACPI laptop lid switch, which typically puts a
382b6695bd0SMike Smithsystem to sleep.
383b57a73f8SKonstantin Belousov.It Li mwait
384b57a73f8SKonstantin Belousov.Pq Vt feature
385b57a73f8SKonstantin BelousovDo not ask firmware for available x86-vendor specific methods to enter
386b57a73f8SKonstantin Belousov.Li Cx
387b57a73f8SKonstantin Belousovsleep states.
388b57a73f8SKonstantin BelousovOnly query and use the generic I/O-based entrance method.
389b57a73f8SKonstantin BelousovThe knob is provided to work around inconsistencies in the tables
390b57a73f8SKonstantin Belousovfilled by firmware.
3914e376d58SNate Lawson.It Li quirks
3924e376d58SNate Lawson.Pq Vt feature
393bf7f20c2SRuslan ErmilovDo not honor quirks.
3944e376d58SNate LawsonQuirks automatically disable ACPI functionality based on the XSDT table's
3954e376d58SNate LawsonOEM vendor name and revision date.
39687b6284aSRuslan Ermilov.It Li pci
397b6695bd0SMike Smith.Pq Vt device
398b6695bd0SMike SmithSupports Host to PCI bridges.
39937c51fd9SNate Lawson.It Li pci_link
400e821c364SNate Lawson.Pq Vt feature
40137c51fd9SNate LawsonPerforms PCI interrupt routing.
40237c51fd9SNate Lawson.It Li sysresource
40337c51fd9SNate Lawson.Pq Vt device
40437c51fd9SNate LawsonPseudo-devices containing resources which ACPI claims.
40587b6284aSRuslan Ermilov.It Li thermal
406b6695bd0SMike Smith.Pq Vt device
407b6695bd0SMike SmithSupports system cooling and heat management.
40887b6284aSRuslan Ermilov.It Li timer
409b6695bd0SMike Smith.Pq Vt device
410b6695bd0SMike SmithImplements a timecounter using the ACPI fixed-frequency timer.
411401cdd95STom Rhodes.It Li video
412401cdd95STom Rhodes.Pq Vt device
4134f068961SRuslan ErmilovSupports
4144f068961SRuslan Ermilov.Xr acpi_video 4
4154f068961SRuslan Ermilovwhich may conflict with
4164f068961SRuslan Ermilov.Xr agp 4
4174f068961SRuslan Ermilovdevice.
418b6695bd0SMike Smith.El
419b6695bd0SMike Smith.Pp
420b6695bd0SMike SmithIt is also possible to avoid portions of the ACPI namespace which
421b6695bd0SMike Smithmay be causing problems, by listing the full path of the root of
422b6695bd0SMike Smiththe region to be avoided in the kernel environment variable
423b6695bd0SMike Smith.Va debug.acpi.avoid .
424b6695bd0SMike SmithThe object and all of its children will be ignored during the
42587b6284aSRuslan Ermilovbus/children scan of the namespace.
426401b484bSNate LawsonThe ACPI CA code will still know about the avoided region.
427edd84e48SNate Lawson.Sh DEBUGGING OUTPUT
428edd84e48SNate LawsonTo enable debugging output,
429edd84e48SNate Lawson.Nm
430edd84e48SNate Lawsonmust be compiled with
4312010c542SRuslan Ermilov.Cd "options ACPI_DEBUG" .
432edd84e48SNate LawsonDebugging output is separated between layers and levels, where a layer is
433edd84e48SNate Lawsona component of the ACPI subsystem, and a level is a particular kind
434edd84e48SNate Lawsonof debugging output.
435edd84e48SNate Lawson.Pp
436edd84e48SNate LawsonBoth layers and levels are specified as a whitespace-separated list of
437edd84e48SNate Lawsontokens, with layers listed in
438edd84e48SNate Lawson.Va debug.acpi.layer
439edd84e48SNate Lawsonand levels in
440edd84e48SNate Lawson.Va debug.acpi.level .
441401b484bSNate Lawson.Pp
442401b484bSNate LawsonThe first set of layers is for ACPI-CA components, and the second is for
443401b484bSNate Lawson.Fx
444401b484bSNate Lawsondrivers.
445401b484bSNate LawsonThe ACPI-CA layer descriptions include the prefix for the files they
446401b484bSNate Lawsonrefer to.
447edd84e48SNate LawsonThe supported layers are:
448edd84e48SNate Lawson.Pp
4492010c542SRuslan Ermilov.Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
450edd84e48SNate Lawson.It Li ACPI_UTILITIES
451401b484bSNate LawsonUtility ("ut") functions
452edd84e48SNate Lawson.It Li ACPI_HARDWARE
453401b484bSNate LawsonHardware access ("hw")
454edd84e48SNate Lawson.It Li ACPI_EVENTS
455401b484bSNate LawsonEvent and GPE ("ev")
456edd84e48SNate Lawson.It Li ACPI_TABLES
457401b484bSNate LawsonTable access ("tb")
458edd84e48SNate Lawson.It Li ACPI_NAMESPACE
459401b484bSNate LawsonNamespace evaluation ("ns")
460edd84e48SNate Lawson.It Li ACPI_PARSER
461401b484bSNate LawsonAML parser ("ps")
462edd84e48SNate Lawson.It Li ACPI_DISPATCHER
463401b484bSNate LawsonInternal representation of interpreter state ("ds")
464edd84e48SNate Lawson.It Li ACPI_EXECUTER
465401b484bSNate LawsonExecute AML methods ("ex")
466edd84e48SNate Lawson.It Li ACPI_RESOURCES
467401b484bSNate LawsonResource parsing ("rs")
468edd84e48SNate Lawson.It Li ACPI_CA_DEBUGGER
469401b484bSNate LawsonDebugger implementation ("db", "dm")
470edd84e48SNate Lawson.It Li ACPI_OS_SERVICES
471401b484bSNate LawsonUsermode support routines ("os")
472edd84e48SNate Lawson.It Li ACPI_CA_DISASSEMBLER
473401b484bSNate LawsonDisassembler implementation (unused)
474edd84e48SNate Lawson.It Li ACPI_ALL_COMPONENTS
475edd84e48SNate LawsonAll the above ACPI-CA components
476edd84e48SNate Lawson.It Li ACPI_AC_ADAPTER
477edd84e48SNate LawsonAC adapter driver
478edd84e48SNate Lawson.It Li ACPI_BATTERY
479edd84e48SNate LawsonControl-method battery driver
480edd84e48SNate Lawson.It Li ACPI_BUS
481edd84e48SNate LawsonACPI, ISA, and PCI bus drivers
482edd84e48SNate Lawson.It Li ACPI_BUTTON
483edd84e48SNate LawsonPower and sleep button driver
484edd84e48SNate Lawson.It Li ACPI_EC
485edd84e48SNate LawsonEmbedded controller driver
486edd84e48SNate Lawson.It Li ACPI_FAN
487edd84e48SNate LawsonFan driver
488edd84e48SNate Lawson.It Li ACPI_OEM
489edd84e48SNate LawsonPlatform-specific driver for hotkeys, LED, etc.
490edd84e48SNate Lawson.It Li ACPI_POWER
491edd84e48SNate LawsonPower resource driver
492edd84e48SNate Lawson.It Li ACPI_PROCESSOR
493edd84e48SNate LawsonCPU driver
494edd84e48SNate Lawson.It Li ACPI_THERMAL
495edd84e48SNate LawsonThermal zone driver
496edd84e48SNate Lawson.It Li ACPI_TIMER
497edd84e48SNate LawsonTimer driver
498edd84e48SNate Lawson.It Li ACPI_ALL_DRIVERS
499edd84e48SNate LawsonAll the above
500edd84e48SNate Lawson.Fx
501edd84e48SNate LawsonACPI drivers
502edd84e48SNate Lawson.El
503edd84e48SNate Lawson.Pp
504edd84e48SNate LawsonThe supported levels are:
505edd84e48SNate Lawson.Pp
5062010c542SRuslan Ermilov.Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
507edd84e48SNate Lawson.It Li ACPI_LV_INIT
508401b484bSNate LawsonInitialization progress
509edd84e48SNate Lawson.It Li ACPI_LV_DEBUG_OBJECT
510401b484bSNate LawsonStores to objects
511edd84e48SNate Lawson.It Li ACPI_LV_INFO
512401b484bSNate LawsonGeneral information and progress
513cc6455afSJung-uk Kim.It Li ACPI_LV_REPAIR
514cc6455afSJung-uk KimRepair a common problem with predefined methods
515edd84e48SNate Lawson.It Li ACPI_LV_ALL_EXCEPTIONS
516401b484bSNate LawsonAll the previous levels
517edd84e48SNate Lawson.It Li ACPI_LV_PARSE
518edd84e48SNate Lawson.It Li ACPI_LV_DISPATCH
519edd84e48SNate Lawson.It Li ACPI_LV_EXEC
520edd84e48SNate Lawson.It Li ACPI_LV_NAMES
521edd84e48SNate Lawson.It Li ACPI_LV_OPREGION
522edd84e48SNate Lawson.It Li ACPI_LV_BFIELD
523edd84e48SNate Lawson.It Li ACPI_LV_TABLES
524edd84e48SNate Lawson.It Li ACPI_LV_VALUES
525edd84e48SNate Lawson.It Li ACPI_LV_OBJECTS
526edd84e48SNate Lawson.It Li ACPI_LV_RESOURCES
527edd84e48SNate Lawson.It Li ACPI_LV_USER_REQUESTS
528edd84e48SNate Lawson.It Li ACPI_LV_PACKAGE
529edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY1
530401b484bSNate LawsonAll the previous levels
531edd84e48SNate Lawson.It Li ACPI_LV_ALLOCATIONS
532edd84e48SNate Lawson.It Li ACPI_LV_FUNCTIONS
533edd84e48SNate Lawson.It Li ACPI_LV_OPTIMIZATIONS
534edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY2
535240d2af5SJung-uk KimAll the previous levels
536edd84e48SNate Lawson.It Li ACPI_LV_ALL
537240d2af5SJung-uk KimSynonym for
538240d2af5SJung-uk Kim.Qq Li ACPI_LV_VERBOSITY2
539edd84e48SNate Lawson.It Li ACPI_LV_MUTEX
540edd84e48SNate Lawson.It Li ACPI_LV_THREADS
541edd84e48SNate Lawson.It Li ACPI_LV_IO
542edd84e48SNate Lawson.It Li ACPI_LV_INTERRUPTS
543edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY3
544401b484bSNate LawsonAll the previous levels
545edd84e48SNate Lawson.It Li ACPI_LV_AML_DISASSEMBLE
546edd84e48SNate Lawson.It Li ACPI_LV_VERBOSE_INFO
547edd84e48SNate Lawson.It Li ACPI_LV_FULL_TABLES
548edd84e48SNate Lawson.It Li ACPI_LV_EVENTS
549edd84e48SNate Lawson.It Li ACPI_LV_VERBOSE
550401b484bSNate LawsonAll levels after
551401b484bSNate Lawson.Qq Li ACPI_LV_VERBOSITY3
552240d2af5SJung-uk Kim.It Li ACPI_LV_INIT_NAMES
553240d2af5SJung-uk Kim.It Li ACPI_LV_LOAD
554edd84e48SNate Lawson.El
555edd84e48SNate Lawson.Pp
556edd84e48SNate LawsonSelection of the appropriate layer and level values is important
557edd84e48SNate Lawsonto avoid massive amounts of debugging output.
558401b484bSNate LawsonFor example, the following configuration is a good way to gather initial
559401b484bSNate Lawsoninformation.
560401b484bSNate LawsonIt enables debug output for both ACPI-CA and the
561401b484bSNate Lawson.Nm
562401b484bSNate Lawsondriver, printing basic information about errors, warnings, and progress.
563401b484bSNate Lawson.Bd -literal -offset indent
564401b484bSNate Lawsondebug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
565401b484bSNate Lawsondebug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
566401b484bSNate Lawson.Ed
567edd84e48SNate Lawson.Pp
568edd84e48SNate LawsonDebugging output by the ACPI CA subsystem is prefixed with the
569edd84e48SNate Lawsonmodule name in lowercase, followed by a source line number.
570edd84e48SNate LawsonOutput from the
571edd84e48SNate Lawson.Fx Ns -local
572edd84e48SNate Lawsoncode follows the same format, but
573edd84e48SNate Lawsonthe module name is uppercased.
574f0da5f56STakanori Watanabe.Sh OVERRIDING YOUR BIOS BYTECODE
575287460e8SNate LawsonACPI interprets bytecode named AML
576287460e8SNate Lawson(ACPI Machine Language)
577287460e8SNate Lawsonprovided by the BIOS vendor as a memory image at boot time.
578287460e8SNate LawsonSometimes, the AML code contains a bug that does not appear when parsed
579287460e8SNate Lawsonby the Microsoft implementation.
580287460e8SNate Lawson.Fx
581287460e8SNate Lawsonprovides a way to override it with your own AML code to work around
582287460e8SNate Lawsonor debug such problems.
583287460e8SNate LawsonNote that all AML in your DSDT and any SSDT tables is overridden.
584f0da5f56STakanori Watanabe.Pp
585287460e8SNate LawsonIn order to load your AML code, you must edit
586f0da5f56STakanori Watanabe.Pa /boot/loader.conf
587287460e8SNate Lawsonand include the following lines.
588f0da5f56STakanori Watanabe.Bd -literal -offset indent
589f0da5f56STakanori Watanabeacpi_dsdt_load="YES"
590287460e8SNate Lawsonacpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
591f0da5f56STakanori Watanabe.Ed
592f0da5f56STakanori Watanabe.Pp
593a627f55aSRuslan ErmilovIn order to prepare your AML code, you will need the
594a627f55aSRuslan Ermilov.Xr acpidump 8
595a627f55aSRuslan Ermilovand
5962010c542SRuslan Ermilov.Xr iasl 8
597297835bcSNate Lawsonutilities and some ACPI knowledge.
598b6695bd0SMike Smith.Sh COMPATIBILITY
599e7d939bdSMarcel MoolenaarACPI is only found and supported on i386/ia32 and amd64.
600b6695bd0SMike Smith.Sh SEE ALSO
6015413d9e0SWes Peters.Xr kenv 1 ,
602673fbcacSRuslan Ermilov.Xr acpi_thermal 4 ,
6035413d9e0SWes Peters.Xr device.hints 5 ,
604f0da5f56STakanori Watanabe.Xr loader.conf 5 ,
605f64a0a56SRobert Watson.Xr acpiconf 8 ,
606f0da5f56STakanori Watanabe.Xr acpidump 8 ,
607297835bcSNate Lawson.Xr config 8 ,
608297835bcSNate Lawson.Xr iasl 8
609f0da5f56STakanori Watanabe.Rs
610a627f55aSRuslan Ermilov.%A "Compaq Computer Corporation"
611a627f55aSRuslan Ermilov.%A "Intel Corporation"
612a627f55aSRuslan Ermilov.%A "Microsoft Corporation"
613a627f55aSRuslan Ermilov.%A "Phoenix Technologies Ltd."
614a627f55aSRuslan Ermilov.%A "Toshiba Corporation"
615c25a3f8aSNate Lawson.%D August 25, 2003
616f0da5f56STakanori Watanabe.%T "Advanced Configuration and Power Interface Specification"
617aa4a335bSRuslan Ermilov.%U http://acpi.info/spec.htm
618f0da5f56STakanori Watanabe.Re
61987b6284aSRuslan Ermilov.Sh AUTHORS
62087b6284aSRuslan Ermilov.An -nosplit
621b6695bd0SMike SmithThe ACPI CA subsystem is developed and maintained by
622b6695bd0SMike SmithIntel Architecture Labs.
623b6695bd0SMike Smith.Pp
624b6695bd0SMike SmithThe following people made notable contributions to the ACPI subsystem
625b6695bd0SMike Smithin
626b6695bd0SMike Smith.Fx :
627718a5d6aSNate Lawson.An Michael Smith ,
6286c899950SBaptiste Daroussin.An Takanori Watanabe Aq Mt takawata@jp.FreeBSD.org ,
6296c899950SBaptiste Daroussin.An Mitsuru IWASAKI Aq Mt iwasaki@jp.FreeBSD.org ,
630b6695bd0SMike Smith.An Munehiro Matsuda ,
631718a5d6aSNate Lawson.An Nate Lawson ,
632b6695bd0SMike Smiththe ACPI-jp mailing list at
6336c899950SBaptiste Daroussin.Aq Mt acpi-jp@jp.FreeBSD.org ,
634b6695bd0SMike Smithand many other contributors.
635b6695bd0SMike Smith.Pp
636b6695bd0SMike SmithThis manual page was written by
6376c899950SBaptiste Daroussin.An Michael Smith Aq Mt msmith@FreeBSD.org .
638b6695bd0SMike Smith.Sh BUGS
63993870c05SNate LawsonMany BIOS versions have serious bugs that may cause system instability,
64093870c05SNate Lawsonbreak suspend/resume, or prevent devices from operating properly due to
64193870c05SNate LawsonIRQ routing problems.
64293870c05SNate LawsonUpgrade your BIOS to the latest version available from the vendor before
64381ae4b8dSRuslan Ermilovdeciding it is a problem with
64493870c05SNate Lawson.Nm .
645