xref: /freebsd/share/man/man4/acpi.4 (revision 81ae4b8da9920ccfb697984dbb2e8751573d183a)
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.
7403335ffbSYaroslav TykhiyA scheduling algorithm will select states between
7503335ffbSYaroslav Tykhiy.Li C1
7603335ffbSYaroslav Tykhiyand this setting
77edd84e48SNate Lawsonas system load dictates.
78edd84e48SNate LawsonTo enable ACPI CPU idling control,
79edd84e48SNate Lawson.Va machdep.cpu_idle_hlt
80edd84e48SNate Lawsonmust be set to 1.
81edd84e48SNate Lawson.It Va hw.acpi.cpu.cx_supported
82edd84e48SNate LawsonList of supported CPU idle states and their transition latency
83edd84e48SNate Lawsonin microseconds.
8403335ffbSYaroslav TykhiyEach state has a type (e.g.,
8503335ffbSYaroslav Tykhiy.Li C2 ) .
8603335ffbSYaroslav Tykhiy.Li C1
8703335ffbSYaroslav Tykhiyis equivalent to the ia32
8803335ffbSYaroslav Tykhiy.Li HLT
8903335ffbSYaroslav Tykhiyinstruction,
9003335ffbSYaroslav Tykhiy.Li C2
9103335ffbSYaroslav Tykhiyprovides a deeper
9203335ffbSYaroslav Tykhiysleep with the same semantics, and
9303335ffbSYaroslav Tykhiy.Li C3
9403335ffbSYaroslav Tykhiyprovides the deepest sleep
95edd84e48SNate Lawsonbut additionally requires bus mastering to be disabled.
9603335ffbSYaroslav TykhiyStates greater than
9703335ffbSYaroslav Tykhiy.Li C3
9803335ffbSYaroslav Tykhiyprovide even more power savings with the same
9903335ffbSYaroslav Tykhiysemantics as the
10003335ffbSYaroslav Tykhiy.Li C3
10103335ffbSYaroslav Tykhiystate.
102edd84e48SNate LawsonDeeper sleeps provide more power savings but increased transition
103edd84e48SNate Lawsonlatency when an interrupt occurs.
10493870c05SNate Lawson.It Va hw.acpi.disable_on_reboot
10593870c05SNate LawsonDisable ACPI during the reboot process.
10693870c05SNate LawsonMost systems reboot fine with ACPI still enabled, but some require
10793870c05SNate Lawsonexiting to legacy mode first.
10893870c05SNate LawsonDefault is 0, leave ACPI enabled.
10993870c05SNate Lawson.It Va hw.acpi.handle_reboot
11093870c05SNate LawsonUse the ACPI Reset Register capability to reboot the system.
11193870c05SNate LawsonDefault is 0, use legacy reboot support.
11293870c05SNate LawsonSome newer systems require use of this register, while some only work
11393870c05SNate Lawsonwith legacy rebooting support.
11493870c05SNate Lawson.It Va hw.acpi.lid_switch_state
11513a8aa9fSNate LawsonSuspend state
11603335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
11713a8aa9fSNate Lawsonto enter when the lid switch (i.e., a notebook screen) is closed.
11803335ffbSYaroslav TykhiyDefault is
11903335ffbSYaroslav Tykhiy.Dq Li NONE
12003335ffbSYaroslav Tykhiy(do nothing).
12193870c05SNate Lawson.It Va hw.acpi.power_button_state
12213a8aa9fSNate LawsonSuspend state
12303335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
12413a8aa9fSNate Lawsonto enter when the power button is pressed.
12513a8aa9fSNate LawsonDefault is
12603335ffbSYaroslav Tykhiy.Li S5
12713a8aa9fSNate Lawson(power-off nicely).
12893870c05SNate Lawson.It Va hw.acpi.reset_video
12993870c05SNate LawsonReset the video adapter from real mode during the resume path.
13093870c05SNate LawsonSome systems need this help, others have display problems if it is enabled.
13193870c05SNate LawsonDefault is 0 (disabled).
13293870c05SNate Lawson.It Va hw.acpi.s4bios
13313a8aa9fSNate LawsonIndicate whether the system supports
13403335ffbSYaroslav Tykhiy.Li S4BIOS .
13593870c05SNate LawsonThis means that the BIOS can handle all the functions of suspending the
13693870c05SNate Lawsonsystem to disk.
13713a8aa9fSNate LawsonOtherwise, the OS is responsible for suspending to disk
13803335ffbSYaroslav Tykhiy.Pq Li S4OS .
13913a8aa9fSNate LawsonMost current systems do not support
14003335ffbSYaroslav Tykhiy.Li S4BIOS .
14193870c05SNate Lawson.It Va hw.acpi.sleep_button_state
14213a8aa9fSNate LawsonSuspend state
14303335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
14413a8aa9fSNate Lawsonto enter when the sleep button is pressed.
14593870c05SNate LawsonThis is usually a special function button on the keyboard.
14613a8aa9fSNate LawsonDefault is
14703335ffbSYaroslav Tykhiy.Li S3
14813a8aa9fSNate Lawson(suspend-to-RAM).
14993870c05SNate Lawson.It Va hw.acpi.sleep_delay
15093870c05SNate LawsonWait this number of seconds between preparing the system to suspend and
15193870c05SNate Lawsonactually entering the suspend state.
15293870c05SNate LawsonDefault is 1 second.
15393870c05SNate Lawson.It Va hw.acpi.supported_sleep_state
15413a8aa9fSNate LawsonSuspend states
15503335ffbSYaroslav Tykhiy.Pq Li S1 Ns \[en] Ns Li S5
15613a8aa9fSNate Lawsonsupported by the BIOS.
15793870c05SNate Lawson.Bl -tag -width indent
15803335ffbSYaroslav Tykhiy.It Li S1
15993870c05SNate LawsonQuick suspend to RAM.
16003335ffbSYaroslav TykhiyThe CPU enters a lower power state, but most peripherals are left running.
16103335ffbSYaroslav Tykhiy.It Li S2
16213a8aa9fSNate LawsonLower power state than
16303335ffbSYaroslav Tykhiy.Li S1 ,
16413a8aa9fSNate Lawsonbut with the same basic characteristics.
16593870c05SNate LawsonNot supported by many systems.
16603335ffbSYaroslav Tykhiy.It Li S3
16793870c05SNate LawsonSuspend to RAM.
16803335ffbSYaroslav TykhiyMost devices are powered off, and the system stops running except for
16993870c05SNate Lawsonmemory refresh.
17003335ffbSYaroslav Tykhiy.It Li S4
17193870c05SNate LawsonSuspend to disk.
17203335ffbSYaroslav TykhiyAll devices are powered off, and the system stops running.
17393870c05SNate LawsonWhen resuming, the system starts as if from a cold power on.
17493870c05SNate LawsonNot yet supported by
17593870c05SNate Lawson.Fx
17613a8aa9fSNate Lawsonunless
17703335ffbSYaroslav Tykhiy.Li S4BIOS
17813a8aa9fSNate Lawsonis available.
17903335ffbSYaroslav Tykhiy.It Li S5
18093870c05SNate LawsonSystem shuts down cleanly and powers off.
18193870c05SNate Lawson.El
18293870c05SNate Lawson.It Va hw.acpi.verbose
18393870c05SNate LawsonEnable verbose printing from the various ACPI subsystems.
184edd84e48SNate Lawson.El
18544cb3ab0SHiroki Sato.Sh LOADER TUNABLES
1863184cf5aSNate LawsonTunables can be set at the
18787b6284aSRuslan Ermilov.Xr loader 8
1883184cf5aSNate Lawsonprompt before booting the kernel or stored in
1893184cf5aSNate Lawson.Pa /boot/loader.conf .
190b46f4324SNate LawsonMany of these tunables also have a matching
191b46f4324SNate Lawson.Xr sysctl 8
192b46f4324SNate Lawsonentry for access after boot.
193edd84e48SNate Lawson.Bl -tag -width indent
194edd84e48SNate Lawson.It Va acpi_dsdt_load
195edd84e48SNate LawsonEnables loading of a custom ACPI DSDT.
196edd84e48SNate Lawson.It Va acpi_dsdt_name
197edd84e48SNate LawsonName of the DSDT table to load, if loading is enabled.
198edd84e48SNate Lawson.It Va debug.acpi.disabled
199edd84e48SNate LawsonSelectively disables portions of ACPI for debugging purposes.
20026db811eSNate Lawson.It Va debug.acpi.max_threads
20126db811eSNate LawsonSpecify the number of task threads that are started on boot.
20226db811eSNate LawsonLimiting this to 1 may help work around various BIOSes that cannot
20326db811eSNate Lawsonhandle parallel requests.
20426db811eSNate LawsonThe default value is 3.
20547bc6a5eSNate Lawson.It Va debug.acpi.quirks
20647bc6a5eSNate LawsonOverride any automatic quirks completely.
207b46f4324SNate Lawson.It Va debug.acpi.resume_beep
208b46f4324SNate LawsonBeep the PC speaker on resume.
209b46f4324SNate LawsonThis can help diagnose suspend/resume problems.
210b46f4324SNate LawsonDefault is 0 (disabled).
211edd84e48SNate Lawson.It Va hint.acpi.0.disabled
212edd84e48SNate LawsonSet this to 1 to disable all of ACPI.
213edd84e48SNate LawsonIf ACPI has been disabled on your system due to a blacklist entry for your
214edd84e48SNate LawsonBIOS, you can set this to 0 to re-enable ACPI for testing.
215edd84e48SNate Lawson.It Va hw.acpi.ec.poll_timeout
216edd84e48SNate LawsonDelay in milliseconds to wait for the EC to respond.
217edd84e48SNate LawsonTry increasing this number if you get the error
2182010c542SRuslan Ermilov.Qq Li AE_NO_HARDWARE_RESPONSE .
21947bc6a5eSNate Lawson.It Va hw.acpi.host_mem_start
22047bc6a5eSNate LawsonOverride the assumed memory starting address for PCI host bridges.
221edd84e48SNate Lawson.It Va hw.acpi.reset_video
222edd84e48SNate LawsonEnables calling the VESA reset BIOS vector on the resume path.
223b46f4324SNate LawsonThis can fix some graphics cards that have problems such as LCD white-out
224b46f4324SNate Lawsonafter resume.
225b46f4324SNate LawsonDefault is 0 (disabled).
226edd84e48SNate Lawson.It Va hw.acpi.serialize_methods
227edd84e48SNate LawsonAllow override of whether methods execute in parallel or not.
2282010c542SRuslan ErmilovEnable this for serial behavior, which fixes
2292010c542SRuslan Ermilov.Qq Li AE_ALREADY_EXISTS
2302010c542SRuslan Ermiloverrors for
2312010c542SRuslan ErmilovAML that really cannot handle parallel method execution.
232edd84e48SNate LawsonIt is off by default since this breaks recursive methods and some IBMs use
233edd84e48SNate Lawsonsuch code.
234edd84e48SNate Lawson.It Va hw.acpi.verbose
235edd84e48SNate LawsonTurn on verbose debugging information about what ACPI is doing.
236e862bc66SChristian Brueffer.It Va hw.pci.link.%s.%d.irq
23793870c05SNate LawsonOverride the interrupt to use for this link and index.
23893870c05SNate LawsonThis capability should be used carefully, and only if a device is not
23993870c05SNate Lawsonworking with
24093870c05SNate Lawson.Nm
24193870c05SNate Lawsonenabled.
24293870c05SNate Lawson.Qq %s
24393870c05SNate Lawsonis the name of the link (e.g., LNKA).
24493870c05SNate Lawson.Qq %d
24593870c05SNate Lawsonis the resource index when the link supports multiple IRQs.
24693870c05SNate LawsonMost PCI links only have one IRQ resource, so the below form should be used.
247e862bc66SChristian Brueffer.It Va hw.pci.link.%s.irq
248e862bc66SChristian BruefferOverride the interrupt to use.
24993870c05SNate LawsonThis capability should be used carefully, and only if a device is not
25093870c05SNate Lawsonworking with
25193870c05SNate Lawson.Nm
25293870c05SNate Lawsonenabled.
25393870c05SNate Lawson.Qq %s
25493870c05SNate Lawsonis the name of the link (e.g., LNKA).
255b6695bd0SMike Smith.El
256edd84e48SNate Lawson.Sh DISABLING ACPI
257edd84e48SNate LawsonSince ACPI support on different platforms varies greatly, there are many
258edd84e48SNate Lawsondebugging and tuning options available.
259b6695bd0SMike Smith.Pp
26007e2d046SMark SantcroosFor machines known not to work with
26107e2d046SMark Santcroos.Nm
26255c71dc9SMark Santcroosenabled, there is a BIOS blacklist.
26355c71dc9SMark SantcroosCurrently, the blacklist only controls whether
26407e2d046SMark Santcroos.Nm
26555c71dc9SMark Santcroosshould be disabled or not.
26655c71dc9SMark SantcroosIn the future, it will have more granularity to control features (the
26755c71dc9SMark Santcroosinfrastructure for that is already there).
26807e2d046SMark Santcroos.Pp
26907e2d046SMark SantcroosTo enable
27007e2d046SMark Santcroos.Nm
27155c71dc9SMark Santcroos(for debugging purposes, etc.) on machines that are on the blacklist, set the
27255c71dc9SMark Santcrooskernel environment variable
27307e2d046SMark Santcroos.Va hint.acpi.0.disabled
27455c71dc9SMark Santcroosto 0.
27555c71dc9SMark SantcroosBefore trying this, consider updating your BIOS to a more recent version that
27655c71dc9SMark Santcroosmay be compatible with ACPI.
27707e2d046SMark Santcroos.Pp
2784e3148f4SWarner LoshTo disable the
2794e3148f4SWarner Losh.Nm
2804e3148f4SWarner Loshdriver completely, set the kernel environment variable
2814e3148f4SWarner Losh.Va hint.acpi.0.disabled
282d865f9efSWes Petersto 1.
283d865f9efSWes Peters.Pp
2844e3148f4SWarner LoshSome i386 machines totally fail to operate with some or all of ACPI disabled.
2854e3148f4SWarner LoshOther i386 machines fail with ACPI enabled.
286edd84e48SNate LawsonDisabling all or part of ACPI on non-i386 platforms (i.e., platforms where
287edd84e48SNate LawsonACPI support is mandatory) may result in a non-functional system.
2884e3148f4SWarner Losh.Pp
289b6695bd0SMike SmithThe
290b6695bd0SMike Smith.Nm
291b6695bd0SMike Smithdriver comprises a set of drivers, which may be selectively disabled
292b6695bd0SMike Smithin case of problems.
293b6695bd0SMike SmithTo disable a sub-driver, list it in the kernel
294b6695bd0SMike Smithenvironment variable
2953184cf5aSNate Lawson.Va debug.acpi.disabled .
29637c51fd9SNate LawsonMultiple entries can be listed, separated by a space.
297b6695bd0SMike Smith.Pp
298b6695bd0SMike SmithACPI sub-devices and features that can be disabled:
2992010c542SRuslan Ermilov.Bl -tag -width ".Li sysresource"
30037c51fd9SNate Lawson.It Li all
301e821c364SNate LawsonDisable all ACPI features and devices.
30218974fe8SNate Lawson.It Li acad
30318974fe8SNate Lawson.Pq Vt device
30418974fe8SNate LawsonSupports AC adapter.
30587b6284aSRuslan Ermilov.It Li bus
306b6695bd0SMike Smith.Pq Vt feature
307b6695bd0SMike SmithProbes and attaches subdevices.
308b6695bd0SMike SmithDisabling will avoid scanning the ACPI namespace entirely.
30987b6284aSRuslan Ermilov.It Li children
310b6695bd0SMike Smith.Pq Vt feature
311b6695bd0SMike SmithAttaches standard ACPI sub-drivers and devices enumerated in the
312b6695bd0SMike SmithACPI namespace.
313b6695bd0SMike SmithDisabling this has a similar effect to disabling
31487b6284aSRuslan Ermilov.Dq Li bus ,
315b6695bd0SMike Smithexcept that the
316b6695bd0SMike SmithACPI namespace will still be scanned.
31787b6284aSRuslan Ermilov.It Li button
318b6695bd0SMike Smith.Pq Vt device
319bf7f20c2SRuslan ErmilovSupports ACPI button devices (typically power and sleep buttons).
32037c51fd9SNate Lawson.It Li cmbat
32137c51fd9SNate Lawson.Pq Vt device
32237c51fd9SNate LawsonControl-method batteries device.
32337c51fd9SNate Lawson.It Li cpu
32437c51fd9SNate Lawson.Pq Vt device
32537c51fd9SNate LawsonSupports CPU power-saving and speed-setting functions.
32687b6284aSRuslan Ermilov.It Li ec
327b6695bd0SMike Smith.Pq Vt device
32837c51fd9SNate LawsonSupports the ACPI Embedded Controller interface, used to communicate
32937c51fd9SNate Lawsonwith embedded platform controllers.
33087b6284aSRuslan Ermilov.It Li isa
331b6695bd0SMike Smith.Pq Vt device
332b6695bd0SMike SmithSupports an ISA bus bridge defined in the ACPI namespace,
333b6695bd0SMike Smithtypically as a child of a PCI bus.
33487b6284aSRuslan Ermilov.It Li lid
335b6695bd0SMike Smith.Pq Vt device
336b6695bd0SMike SmithSupports an ACPI laptop lid switch, which typically puts a
337b6695bd0SMike Smithsystem to sleep.
3384e376d58SNate Lawson.It Li quirks
3394e376d58SNate Lawson.Pq Vt feature
340bf7f20c2SRuslan ErmilovDo not honor quirks.
3414e376d58SNate LawsonQuirks automatically disable ACPI functionality based on the XSDT table's
3424e376d58SNate LawsonOEM vendor name and revision date.
34387b6284aSRuslan Ermilov.It Li pci
344b6695bd0SMike Smith.Pq Vt device
345b6695bd0SMike SmithSupports Host to PCI bridges.
34637c51fd9SNate Lawson.It Li pci_link
347e821c364SNate Lawson.Pq Vt feature
34837c51fd9SNate LawsonPerforms PCI interrupt routing.
34937c51fd9SNate Lawson.It Li sysresource
35037c51fd9SNate Lawson.Pq Vt device
35137c51fd9SNate LawsonPseudo-devices containing resources which ACPI claims.
35287b6284aSRuslan Ermilov.It Li thermal
353b6695bd0SMike Smith.Pq Vt device
354b6695bd0SMike SmithSupports system cooling and heat management.
35587b6284aSRuslan Ermilov.It Li timer
356b6695bd0SMike Smith.Pq Vt device
357b6695bd0SMike SmithImplements a timecounter using the ACPI fixed-frequency timer.
358401cdd95STom Rhodes.It Li video
359401cdd95STom Rhodes.Pq Vt device
3604f068961SRuslan ErmilovSupports
3614f068961SRuslan Ermilov.Xr acpi_video 4
3624f068961SRuslan Ermilovwhich may conflict with
3634f068961SRuslan Ermilov.Xr agp 4
3644f068961SRuslan Ermilovdevice.
365b6695bd0SMike Smith.El
366b6695bd0SMike Smith.Pp
367b6695bd0SMike SmithIt is also possible to avoid portions of the ACPI namespace which
368b6695bd0SMike Smithmay be causing problems, by listing the full path of the root of
369b6695bd0SMike Smiththe region to be avoided in the kernel environment variable
370b6695bd0SMike Smith.Va debug.acpi.avoid .
371b6695bd0SMike SmithThe object and all of its children will be ignored during the
37287b6284aSRuslan Ermilovbus/children scan of the namespace.
373401b484bSNate LawsonThe ACPI CA code will still know about the avoided region.
374edd84e48SNate Lawson.Sh DEBUGGING OUTPUT
375edd84e48SNate LawsonTo enable debugging output,
376edd84e48SNate Lawson.Nm
377edd84e48SNate Lawsonmust be compiled with
3782010c542SRuslan Ermilov.Cd "options ACPI_DEBUG" .
379edd84e48SNate LawsonDebugging output is separated between layers and levels, where a layer is
380edd84e48SNate Lawsona component of the ACPI subsystem, and a level is a particular kind
381edd84e48SNate Lawsonof debugging output.
382edd84e48SNate Lawson.Pp
383edd84e48SNate LawsonBoth layers and levels are specified as a whitespace-separated list of
384edd84e48SNate Lawsontokens, with layers listed in
385edd84e48SNate Lawson.Va debug.acpi.layer
386edd84e48SNate Lawsonand levels in
387edd84e48SNate Lawson.Va debug.acpi.level .
388401b484bSNate Lawson.Pp
389401b484bSNate LawsonThe first set of layers is for ACPI-CA components, and the second is for
390401b484bSNate Lawson.Fx
391401b484bSNate Lawsondrivers.
392401b484bSNate LawsonThe ACPI-CA layer descriptions include the prefix for the files they
393401b484bSNate Lawsonrefer to.
394edd84e48SNate LawsonThe supported layers are:
395edd84e48SNate Lawson.Pp
3962010c542SRuslan Ermilov.Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
397edd84e48SNate Lawson.It Li ACPI_UTILITIES
398401b484bSNate LawsonUtility ("ut") functions
399edd84e48SNate Lawson.It Li ACPI_HARDWARE
400401b484bSNate LawsonHardware access ("hw")
401edd84e48SNate Lawson.It Li ACPI_EVENTS
402401b484bSNate LawsonEvent and GPE ("ev")
403edd84e48SNate Lawson.It Li ACPI_TABLES
404401b484bSNate LawsonTable access ("tb")
405edd84e48SNate Lawson.It Li ACPI_NAMESPACE
406401b484bSNate LawsonNamespace evaluation ("ns")
407edd84e48SNate Lawson.It Li ACPI_PARSER
408401b484bSNate LawsonAML parser ("ps")
409edd84e48SNate Lawson.It Li ACPI_DISPATCHER
410401b484bSNate LawsonInternal representation of interpreter state ("ds")
411edd84e48SNate Lawson.It Li ACPI_EXECUTER
412401b484bSNate LawsonExecute AML methods ("ex")
413edd84e48SNate Lawson.It Li ACPI_RESOURCES
414401b484bSNate LawsonResource parsing ("rs")
415edd84e48SNate Lawson.It Li ACPI_CA_DEBUGGER
416401b484bSNate LawsonDebugger implementation ("db", "dm")
417edd84e48SNate Lawson.It Li ACPI_OS_SERVICES
418401b484bSNate LawsonUsermode support routines ("os")
419edd84e48SNate Lawson.It Li ACPI_CA_DISASSEMBLER
420401b484bSNate LawsonDisassembler implementation (unused)
421edd84e48SNate Lawson.It Li ACPI_ALL_COMPONENTS
422edd84e48SNate LawsonAll the above ACPI-CA components
423edd84e48SNate Lawson.It Li ACPI_AC_ADAPTER
424edd84e48SNate LawsonAC adapter driver
425edd84e48SNate Lawson.It Li ACPI_BATTERY
426edd84e48SNate LawsonControl-method battery driver
427edd84e48SNate Lawson.It Li ACPI_BUS
428edd84e48SNate LawsonACPI, ISA, and PCI bus drivers
429edd84e48SNate Lawson.It Li ACPI_BUTTON
430edd84e48SNate LawsonPower and sleep button driver
431edd84e48SNate Lawson.It Li ACPI_EC
432edd84e48SNate LawsonEmbedded controller driver
433edd84e48SNate Lawson.It Li ACPI_FAN
434edd84e48SNate LawsonFan driver
435edd84e48SNate Lawson.It Li ACPI_OEM
436edd84e48SNate LawsonPlatform-specific driver for hotkeys, LED, etc.
437edd84e48SNate Lawson.It Li ACPI_POWER
438edd84e48SNate LawsonPower resource driver
439edd84e48SNate Lawson.It Li ACPI_PROCESSOR
440edd84e48SNate LawsonCPU driver
441edd84e48SNate Lawson.It Li ACPI_THERMAL
442edd84e48SNate LawsonThermal zone driver
443edd84e48SNate Lawson.It Li ACPI_TIMER
444edd84e48SNate LawsonTimer driver
445edd84e48SNate Lawson.It Li ACPI_ALL_DRIVERS
446edd84e48SNate LawsonAll the above
447edd84e48SNate Lawson.Fx
448edd84e48SNate LawsonACPI drivers
449edd84e48SNate Lawson.El
450edd84e48SNate Lawson.Pp
451edd84e48SNate LawsonThe supported levels are:
452edd84e48SNate Lawson.Pp
4532010c542SRuslan Ermilov.Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
454edd84e48SNate Lawson.It Li ACPI_LV_ERROR
455401b484bSNate LawsonFatal error conditions
456edd84e48SNate Lawson.It Li ACPI_LV_WARN
457401b484bSNate LawsonWarnings and potential problems
458edd84e48SNate Lawson.It Li ACPI_LV_INIT
459401b484bSNate LawsonInitialization progress
460edd84e48SNate Lawson.It Li ACPI_LV_DEBUG_OBJECT
461401b484bSNate LawsonStores to objects
462edd84e48SNate Lawson.It Li ACPI_LV_INFO
463401b484bSNate LawsonGeneral information and progress
464edd84e48SNate Lawson.It Li ACPI_LV_ALL_EXCEPTIONS
465401b484bSNate LawsonAll the previous levels
466edd84e48SNate Lawson.It Li ACPI_LV_INIT_NAMES
467edd84e48SNate Lawson.It Li ACPI_LV_PARSE
468edd84e48SNate Lawson.It Li ACPI_LV_LOAD
469edd84e48SNate Lawson.It Li ACPI_LV_DISPATCH
470edd84e48SNate Lawson.It Li ACPI_LV_EXEC
471edd84e48SNate Lawson.It Li ACPI_LV_NAMES
472edd84e48SNate Lawson.It Li ACPI_LV_OPREGION
473edd84e48SNate Lawson.It Li ACPI_LV_BFIELD
474edd84e48SNate Lawson.It Li ACPI_LV_TABLES
475edd84e48SNate Lawson.It Li ACPI_LV_VALUES
476edd84e48SNate Lawson.It Li ACPI_LV_OBJECTS
477edd84e48SNate Lawson.It Li ACPI_LV_RESOURCES
478edd84e48SNate Lawson.It Li ACPI_LV_USER_REQUESTS
479edd84e48SNate Lawson.It Li ACPI_LV_PACKAGE
480edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY1
481401b484bSNate LawsonAll the previous levels
482edd84e48SNate Lawson.It Li ACPI_LV_ALLOCATIONS
483edd84e48SNate Lawson.It Li ACPI_LV_FUNCTIONS
484edd84e48SNate Lawson.It Li ACPI_LV_OPTIMIZATIONS
485edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY2
486edd84e48SNate Lawson.It Li ACPI_LV_ALL
487edd84e48SNate Lawson.It Li ACPI_LV_MUTEX
488edd84e48SNate Lawson.It Li ACPI_LV_THREADS
489edd84e48SNate Lawson.It Li ACPI_LV_IO
490edd84e48SNate Lawson.It Li ACPI_LV_INTERRUPTS
491edd84e48SNate Lawson.It Li ACPI_LV_VERBOSITY3
492401b484bSNate LawsonAll the previous levels
493edd84e48SNate Lawson.It Li ACPI_LV_AML_DISASSEMBLE
494edd84e48SNate Lawson.It Li ACPI_LV_VERBOSE_INFO
495edd84e48SNate Lawson.It Li ACPI_LV_FULL_TABLES
496edd84e48SNate Lawson.It Li ACPI_LV_EVENTS
497edd84e48SNate Lawson.It Li ACPI_LV_VERBOSE
498401b484bSNate LawsonAll levels after
499401b484bSNate Lawson.Qq Li ACPI_LV_VERBOSITY3
500edd84e48SNate Lawson.El
501edd84e48SNate Lawson.Pp
502edd84e48SNate LawsonSelection of the appropriate layer and level values is important
503edd84e48SNate Lawsonto avoid massive amounts of debugging output.
504401b484bSNate LawsonFor example, the following configuration is a good way to gather initial
505401b484bSNate Lawsoninformation.
506401b484bSNate LawsonIt enables debug output for both ACPI-CA and the
507401b484bSNate Lawson.Nm
508401b484bSNate Lawsondriver, printing basic information about errors, warnings, and progress.
509401b484bSNate Lawson.Bd -literal -offset indent
510401b484bSNate Lawsondebug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
511401b484bSNate Lawsondebug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
512401b484bSNate Lawson.Ed
513edd84e48SNate Lawson.Pp
514edd84e48SNate LawsonDebugging output by the ACPI CA subsystem is prefixed with the
515edd84e48SNate Lawsonmodule name in lowercase, followed by a source line number.
516edd84e48SNate LawsonOutput from the
517edd84e48SNate Lawson.Fx Ns -local
518edd84e48SNate Lawsoncode follows the same format, but
519edd84e48SNate Lawsonthe module name is uppercased.
520f0da5f56STakanori Watanabe.Sh OVERRIDING YOUR BIOS BYTECODE
521287460e8SNate LawsonACPI interprets bytecode named AML
522287460e8SNate Lawson(ACPI Machine Language)
523287460e8SNate Lawsonprovided by the BIOS vendor as a memory image at boot time.
524287460e8SNate LawsonSometimes, the AML code contains a bug that does not appear when parsed
525287460e8SNate Lawsonby the Microsoft implementation.
526287460e8SNate Lawson.Fx
527287460e8SNate Lawsonprovides a way to override it with your own AML code to work around
528287460e8SNate Lawsonor debug such problems.
529287460e8SNate LawsonNote that all AML in your DSDT and any SSDT tables is overridden.
530f0da5f56STakanori Watanabe.Pp
531287460e8SNate LawsonIn order to load your AML code, you must edit
532f0da5f56STakanori Watanabe.Pa /boot/loader.conf
533287460e8SNate Lawsonand include the following lines.
534f0da5f56STakanori Watanabe.Bd -literal -offset indent
535f0da5f56STakanori Watanabeacpi_dsdt_load="YES"
536287460e8SNate Lawsonacpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
537f0da5f56STakanori Watanabe.Ed
538f0da5f56STakanori Watanabe.Pp
539a627f55aSRuslan ErmilovIn order to prepare your AML code, you will need the
540a627f55aSRuslan Ermilov.Xr acpidump 8
541a627f55aSRuslan Ermilovand
5422010c542SRuslan Ermilov.Xr iasl 8
543297835bcSNate Lawsonutilities and some ACPI knowledge.
544b6695bd0SMike Smith.Sh COMPATIBILITY
5456b74f9b7SNate LawsonACPI is only found and supported on i386/ia32, ia64, and amd64.
546b6695bd0SMike Smith.Sh SEE ALSO
5475413d9e0SWes Peters.Xr kenv 1 ,
548673fbcacSRuslan Ermilov.Xr acpi_thermal 4 ,
5495413d9e0SWes Peters.Xr device.hints 5 ,
550f0da5f56STakanori Watanabe.Xr loader.conf 5 ,
551f64a0a56SRobert Watson.Xr acpiconf 8 ,
552f0da5f56STakanori Watanabe.Xr acpidump 8 ,
553297835bcSNate Lawson.Xr config 8 ,
554297835bcSNate Lawson.Xr iasl 8
555f0da5f56STakanori Watanabe.Rs
556a627f55aSRuslan Ermilov.%A "Compaq Computer Corporation"
557a627f55aSRuslan Ermilov.%A "Intel Corporation"
558a627f55aSRuslan Ermilov.%A "Microsoft Corporation"
559a627f55aSRuslan Ermilov.%A "Phoenix Technologies Ltd."
560a627f55aSRuslan Ermilov.%A "Toshiba Corporation"
561c25a3f8aSNate Lawson.%D August 25, 2003
562f0da5f56STakanori Watanabe.%T "Advanced Configuration and Power Interface Specification"
563f0da5f56STakanori Watanabe.%O http://acpi.info/spec.htm
564f0da5f56STakanori Watanabe.Re
56587b6284aSRuslan Ermilov.Sh AUTHORS
56687b6284aSRuslan Ermilov.An -nosplit
567b6695bd0SMike SmithThe ACPI CA subsystem is developed and maintained by
568b6695bd0SMike SmithIntel Architecture Labs.
569b6695bd0SMike Smith.Pp
570b6695bd0SMike SmithThe following people made notable contributions to the ACPI subsystem
571b6695bd0SMike Smithin
572b6695bd0SMike Smith.Fx :
573718a5d6aSNate Lawson.An Michael Smith ,
57487b6284aSRuslan Ermilov.An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
57587b6284aSRuslan Ermilov.An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
576b6695bd0SMike Smith.An Munehiro Matsuda ,
577718a5d6aSNate Lawson.An Nate Lawson ,
578b6695bd0SMike Smiththe ACPI-jp mailing list at
57987b6284aSRuslan Ermilov.Aq acpi-jp@jp.FreeBSD.org ,
580b6695bd0SMike Smithand many other contributors.
581b6695bd0SMike Smith.Pp
582b6695bd0SMike SmithThis manual page was written by
58387b6284aSRuslan Ermilov.An Michael Smith Aq msmith@FreeBSD.org .
584b6695bd0SMike Smith.Sh BUGS
58593870c05SNate LawsonMany BIOS versions have serious bugs that may cause system instability,
58693870c05SNate Lawsonbreak suspend/resume, or prevent devices from operating properly due to
58793870c05SNate LawsonIRQ routing problems.
58893870c05SNate LawsonUpgrade your BIOS to the latest version available from the vendor before
58981ae4b8dSRuslan Ermilovdeciding it is a problem with
59093870c05SNate Lawson.Nm .
59113a8aa9fSNate Lawson.Pp
59213a8aa9fSNate LawsonThe
59313a8aa9fSNate Lawson.Nm
59413a8aa9fSNate LawsonCPU idle power management drive conflicts with the local APIC (LAPIC)
59513a8aa9fSNate Lawsontimer.
59613a8aa9fSNate LawsonDisable APIC mode with
59713a8aa9fSNate Lawson.Va hint.apic.0.disabled
59881ae4b8dSRuslan Ermilovor do not use the
59903335ffbSYaroslav Tykhiy.Li C2
60013a8aa9fSNate Lawsonand
60103335ffbSYaroslav Tykhiy.Li C3
60213a8aa9fSNate Lawsonstates if APIC mode is enabled.
603