ACPI

Source: Wikipedia, the free encyclopedia.

Advanced Configuration and Power Interface
AbbreviationACPI
StatusPublished
First publishedDecember 1996
Latest version6.5
August 2022
Organization
Related standardsUEFI
Predecessor
DomainPower management firmware
Websiteuefi.org/acpi

Advanced Configuration and Power Interface (ACPI) is an

Plug and Play BIOS (PnP) Specification.[1] ACPI brings power management under the control of the operating system, as opposed to the previous BIOS-centric system that relied on platform-specific firmware to determine power management and configuration policies.[2] The specification is central to the Operating System-directed configuration and Power Management (OSPM) system. ACPI defines hardware abstraction interfaces between the device's firmware (e.g. BIOS, UEFI), the computer hardware components, and the operating systems.[3][4]

Internally, ACPI advertises the available components and their functions to the

operating system kernel using instruction lists ("methods") provided through the system firmware (UEFI or BIOS), which the kernel parses. ACPI then executes the desired operations written in ACPI Machine Language (such as the initialization of hardware components) using an embedded minimal virtual machine
.

UEFI Forum, in which all future development will take place.[5] The latest version of the standard 6.5 was released in August 2022.[6]

Architecture

The firmware-level ACPI has three main components: the ACPI tables, the ACPI BIOS, and the ACPI registers. The ACPI BIOS generates ACPI tables and loads ACPI tables into

low-level language, stored in the ACPI tables.[7] To make use of the ACPI tables, the operating system must have an interpreter for the AML bytecode. A reference AML interpreter implementation is provided by the ACPI Component Architecture (ACPICA). At the BIOS development time, AML bytecode is compiled from the ASL (ACPI Source Language) code.[8][9]

ACPI Component Architecture (ACPICA)

The ACPI Component Architecture (ACPICA), mainly written by Intel's engineers, provides an open-source platform-independent reference implementation of the operating system–related ACPI code.[10] The ACPICA code is used by Linux, Haiku, ArcaOS[11] and FreeBSD,[8] which supplement it with their operating-system specific code.

History

The first revision of the ACPI specification was released in December 1996, supporting 16, 24 and

64-bit
address support as well as support for multiprocessor workstations and servers with revision 2.0.

In 1999, then Microsoft CEO Bill Gates stated in an e-mail that Linux would benefit from ACPI without them having to do work and suggested to make it Windows-only.[12][13][14]

In September 2004, revision 3.0 was released, bringing to the ACPI specification support for

ambient light sensors
and user-presence devices, as well as extending the thermal model beyond the previous processor-centric support.

Released in June 2009, revision 4.0 of the ACPI specification added various new features to the design; most notable are the

x2APIC
support.

Revision 5.0 of the ACPI specification was released in December 2011,

ARM architecture support. The revision 5.1 was released in July 2014.[16]

The latest specification revision is 6.5, which was released in August 2022.[6]

Operating systems

The "It's now safe to turn off your computer" screen in Windows 9x. Most of the computer peripherals are offline, and the only ways to exit this screen are to power off or reset the computer.
The "It's now safe to turn off your computer" screen in Windows NT 4.0. Unlike Windows 9x and later NT releases, most of the essential computer peripherals are working normally, so the user can opt to restart instead of powering off their computer.
The "It's now safe to power off the system" screen in Windows 10 and 11.

Microsoft's

Solaris, have at least some support for ACPI.[26] Some newer operating systems, like Windows Vista, require the computer to have an ACPI-compliant BIOS, and since Windows 8, the S0ix/Modern Standby state was implemented.[27]

Windows operating systems use acpi.sys[28] to access ACPI events.

The 2.4 series of the Linux kernel had only minimal support for ACPI, with better support implemented (and enabled by default) from kernel version 2.6.0 onwards.[29] Old ACPI BIOS implementations tend to be quite buggy, and consequently are not supported by later operating systems. For example, Windows 2000, Windows XP, and Windows Server 2003 only use ACPI if the BIOS date is after January 1, 1999.[30] Similarly, Linux kernel 2.6 may not use ACPI if the BIOS date is before January 1, 2001.[29]

Linux-based operating systems can provide handling of ACPI events via acpid.[31]

OSPM responsibilities

Once an OSPM-compatible operating system activates ACPI, it takes exclusive control of all aspects of power management and device configuration. The OSPM implementation must expose an ACPI-compatible environment to device drivers, which exposes certain system, device and processor states.

Power states

Global states

The ACPI Specification defines the following four global "Gx" states and six sleep "Sx" states for an ACPI-compliant computer system:[32][33]

Gx Name Sx Description
G0 Working S0 The computer is running and the CPU executes instructions. "Awaymode" is a subset of S0, where monitor is off but background tasks are running
G1 Sleeping S0ix Modern Standby,[34] or "Low Power S0 Idle". Partial processor SoC sleep.[35][36] Known to ARM and x86 devices.
S1 Power on Suspend (POS): Processor caches are flushed, and the CPU(s) stops executing instructions. The power to the CPU(s) and RAM is maintained. Devices that do not indicate they must remain on may be powered off.
S2 CPU powered off.
Dirty cache
is flushed to RAM.
S3 Commonly referred to as Standby,
RAM
remains powered. Fans may turn off. Requires GPU drivers on Windows.
S4
hard drive
, and the system is powered down.
G2 Soft Off S5
G3 Mechanical Off The computer's power has been totally removed via a mechanical switch (as on the rear of a PSU). The power cord can be removed and the system is safe for disassembly (typically, only the real-time clock continues to run using its own small battery).

The specification also defines a Legacy state: the state of an operating system which does not support ACPI. In this state, the hardware and power are not managed via ACPI, effectively disabling ACPI.

Device states

The device states D0D3 are device dependent:

  • D0 or Fully On is the operating state.
    • As with S0ix, Intel has D0ix states for intermediate levels on the SoC.[37]
  • D1 and D2 are intermediate power-states whose definition varies by device.
  • D3: The D3 state is further divided into D3 Hot (has auxiliary power), and D3 Cold (no power provided):
    • Hot: A device can assert power management requests to transition to higher power states.
    • Cold or Off has the device powered off and unresponsive to its bus.

Processor states

The CPU power states C0C3 are defined as follows:

Performance state

While a device or processor operates (D0 and C0, respectively), it can be in one of several power-performance states. These states are implementation-dependent. P0 is always the highest-performance state, with P1 to Pn being successively lower-performance states, up to an implementation-specific limit of n no greater than 16.[41]

P-states have become known as

PowerSaver in VIA
processors.

Interfaces

Hardware

ACPI-compliant systems interact with hardware through either a "Function Fixed Hardware (FFH) Interface", or a platform-independent hardware programming model which relies on platform-specific ACPI Machine Language (AML) provided by the original equipment manufacturer (OEM).

Function Fixed Hardware interfaces are platform-specific features, provided by platform manufacturers for the purposes of performance and failure recovery. Standard

PCs have a fixed function interface defined by Intel,[43]
which provides a set of core functionality that reduces an ACPI-compliant system's need for full driver stacks for providing basic functionality during boot time or in the case of major system failure.

ACPI Platform Error Interface (APEI) is a specification for reporting of hardware errors, e.g. chipset, RAM to the operating system.

Firmware

ACPI defines many tables that provide the interface between an ACPI-compliant operating system and system firmware (BIOS or UEFI). This includes RSDP, RSDT, XSDT, FADT, FACS, DSDT, SSDT, MADT, and MCFG, for example.[44][45]

The tables allow description of system hardware in a platform-independent manner, and are presented as either fixed-formatted data structures or in AML. The main AML table is the DSDT (differentiated system description table). The AML can be decompiled by tools like Intel's iASL (open-source, part of ACPICA) for purposes like patching the tables for expanding OS compatibility.[46][47]

The Root System Description Pointer (RSDP) is located in a platform-dependent manner, and describes the rest of the tables.

A custom ACPI table called the Windows Platform Binary Table (WPBT) is used by Microsoft to allow vendors to add software into the Windows OS automatically. Some vendors, such as Lenovo, have been caught using this feature to install harmful software such as Superfish.[48] Samsung shipped PCs with Windows Update disabled.[48] Windows versions older than Windows 7 do not support this feature, but alternative techniques can be used. This behavior has been compared to rootkits.[49][50]

Tables

PHAT
Platform Health Assessment Table
SLIP
Software Licensing Description Table

Criticism

open-source, declarative firmware (ACPI or non-ACPI) as a solution.[52]

Overall design decision was not without criticism. In November 2003, Linus Torvalds—author of the Linux kernel—described ACPI as "a complete design disaster in every way".[52][53]

See also

Further reading

  • Garrett, Matthew (October 31, 2023). "Why ACPI?".

References

  1. ^ "ACPI Overview" (PDF). www.acpi.info. Archived from the original (slide show in PDF) on May 25, 2019.
  2. Microsoft Corporation. February 1996. Archived from the original
    (RTF) on February 6, 2012. Retrieved July 2, 2010.
  3. ^ "What is ACPI (Advanced Configuration and Power Interface)? - Definition from WhatIs.com". SearchWindowsServer. Retrieved September 18, 2020.
  4. ^ "ACPI Device Tree - Representation of ACPI Namespace — The Linux Kernel documentation". www.kernel.org. Retrieved September 18, 2020.
  5. ^ "The Advanced Configuration & Power Interface web page has a prominent note that links to the Preexisting ACPI Specifications page on the UEFI web site". acpi.org. July 23, 2014. Archived from the original on June 22, 2011. Retrieved January 25, 2016.
  6. ^ a b "Advanced Configuration and Power Interface Specification, Release 6.5" (PDF). UEFI.org/specifications. August 2022. Retrieved October 4, 2022.
  7. ^ Bernhard Kauer (August 2009). "ATARE: ACPI Tables and Regular Expressions" (PDF). Retrieved February 18, 2019.
  8. ^ a b ACPI implementation on FreeBSD - Usenix
  9. ^ ACPI in Linux, 2005
  10. ^ ACPICA: ACPI Component Architecture
  11. ^ "Readme for the ACPI Driver Package". arcanoae.com. Retrieved September 6, 2020.
  12. ^ "Microsoft wollte ACPI nur für Windows". Der Standard (in Austrian German). Retrieved November 6, 2022.
  13. Golem.de
    . Retrieved November 6, 2022.
  14. ^ Gates, Bill (January 24, 1999). "ACPI extensions" (PDF). Archived from the original (PDF) on February 2, 2007.
  15. (PDF) on September 14, 2012. Retrieved November 17, 2013.
  16. ^ "Advanced Configuration and Power Interface Specification (Revision 5.1)" (PDF). uefi.org. July 23, 2014. Retrieved May 24, 2015.
  17. ^ "Limitations When Using Microsoft Windows 98 on Compaq Armada Portables" (PDF). physik.hu-berlin.de. October 1998. p. 3. Retrieved January 27, 2014.[permanent dead link]
  18. ^ "Windows 98 on ThinkPad systems - ThinkPad General". Support.lenovo.com. Archived from the original on February 3, 2014. Retrieved January 27, 2014.
  19. .
  20. ^ Windows 98 Does Not Support ACPI Passive Cooling Mode
  21. ^ "Cover Story: Win98 Bugs & Fixes - December 1998". winmag.com. Archived from the original on October 13, 1999.
  22. ^ "ArcaOS Changelog". Retrieved August 24, 2020.
  23. ^ "FreeBSD 5.0-RELEASE Announcement". www.freebsd.org. Retrieved December 3, 2020.
  24. ^ "acpi(4) - NetBSD Manual Pages". man.netbsd.org. Retrieved December 3, 2020.
  25. ^ "acpi(4) - OpenBSD manual pages". man.openbsd.org. Retrieved December 3, 2020.
  26. ^ Therien, Guy (January 6, 2000). "ACPI 2.0 Specification Technical Review, Intel Developer Forum" (PPT). Intel Corporation. Archived from the original on July 21, 2011. Retrieved August 21, 2011.
  27. Microsoft Corporation
    . Retrieved July 2, 2010.
  28. Microsoft Corporation
    . June 15, 2017. Retrieved September 20, 2019.
  29. ^ a b The State of ACPI in the Linux Kernel
  30. ^ ACPI BIOS. msdn.microsoft.com.
  31. OCLC 773210086.{{cite book}}: CS1 maint: others (link
    )
  32. ^ ACPI Spec Rev 5.0 - dated December 6, 2011
  33. ^ Anand Lal Shimpi (October 5, 2012). "Intel's Haswell Architecture Analyzed". AnandTech. Retrieved October 20, 2013.
  34. ^ windows-driver-content. "Modern Standby". docs.microsoft.com. Retrieved March 20, 2020.
  35. ^ "S0ix States". software.intel.com. March 9, 2020.
  36. ^ Wang, Wendy (October 17, 2018). "How to achieve S0ix states in Linux*". 01.org.
  37. ^ "D0ix States". software.intel.com. March 9, 2020.
  38. ^ "Athlon II X2: Hardware C1E and Return of the CnQ Bug". AnandTech. Retrieved October 26, 2020.
  39. ^ Wasson, Scott (February 21, 2005). "Intel's Pentium 4 600 series processors". The Tech Report. p. 2.
  40. ^ "Processor Package and Core C-States". AnandTech. June 9, 2013. Retrieved October 20, 2013.
  41. ^ "Advanced Configuration and Power Interface Specification, Revision 3.0, Section 2.6 Device and Processor Performance State Definitions" (PDF). ACPI.info. September 2, 2004. p. 23. Archived from the original (PDF) on November 28, 2015. Retrieved August 19, 2015.
  42. ^ Link aggregation
  43. Intel Corporation (September 2006). "Intel Processor Vendor-Specific ACPI" (PDF). Archived from the original
    (PDF) on December 25, 2012. Retrieved October 5, 2014.
  44. ^ Brown, Len (July 20, 2005). "ACPI in Linux". Ottawa Linux Symposium: 3.
    CiteSeerX 10.1.1.173.2206
    .
  45. ^ "ACPI Tables — The Linux Kernel documentation". www.kernel.org. Archived from the original on October 20, 2020. Retrieved November 8, 2020.
  46. ^ "DSDT". ArchWiki.
  47. ^ "Getting Started With ACPI". GitBook.
  48. ^ a b Hoffman, Chris (August 19, 2015). "Zombie Crapware: How the Windows Platform Binary Table Works". How-To Geek.
  49. ^ "Vendors 'rootkit': 'Windows Platform Binary Table' (WPBT)". Born's Tech and Windows World. December 6, 2017.
  50. ^ Mayank Sharma (September 27, 2021). "Millions of Windows 10 PCs exposed by nasty security vulnerability". TechRadar. Retrieved November 10, 2022.
  51. ^ Mark Shuttleworth blog (March 17, 2014), "ACPI, firmware and your security"
  52. ^ a b Linux Magazine issue 162, May 2014, page 9
  53. ^ Searls, Doc (November 25, 2003). "Linus & the Lunatics, Part II". Linux Journal. Retrieved January 13, 2010.

External links

This page is based on the copyrighted Wikipedia article: ACPI. Articles is available under the CC BY-SA 3.0 license; additional terms may apply.Privacy Policy