Golden logoGolden logo
Advanced Search
ACPI

ACPI

Advanced Configuration and Power Interface

ACPI (Advanced Configuration and Power Interface) is an open industry standard first released in December 1996 and co-developed by HP, Intel, Microsoft, Phoenix, and Toshiba that defines a common interface for hardware discovery, power management, and motherboard and device configuration.

The 2.0 specification was introduced in September 2000. It applies to a broader range of computers, including enterprise servers, desktops, and laptops. In addition, ACPI 2.0 added support for 64-bit microprocessors for servers, support for various types of memory, PCI and PCI-X devices.

Version 3.0b of the specification was released on October 10, 2006.

Currently, the latest version of the ACPI specification is version 6.2a, released by the UEFI Forum in September 2017.

The purpose of ACPI is to provide an interface between the operating system, the hardware, and the motherboard BIOS.

ACPI has replaced APM (Advanced Power Management) technology.

Introduction

The most famous part of the ACPI standard is power management, which has two significant improvements over previous standards. Firstly, the ACPI concept transfers power control to the operating system (OS). This is in contrast to the previous APM model, where the motherboard BIOS was responsible for power management and the OS power capabilities were severely limited. In the ACPI model, the BIOS provides the operating system with methods for direct detailed hardware control. This gives the OS almost complete control over power consumption.

Another important part of the ACPI specification is to provide power management features on servers and desktops that were previously only available on laptop computers. For example, a system can be put into an extremely low-power state in which only the RAM is powered (or possibly unpowered), but interrupts from some devices (real-time clock, keyboard, modem, etc.) can bring the system from such a state to normal operating mode fairly quickly (i.e. "wake up" the system).

Besides the software interface requirements, ACPI also requires special support from the hardware. Thus, the operating system, motherboard chipset and even the CPU must all have ACPI support.

Today, various versions of ACPI are supported by many operating systems - including all versions of Microsoft Windows since Windows 98, GNU/Linux systems, FreeBSD, OpenBSD, NetBSD, and eComStation.

Technical details

The ACPI interface is organized by putting several tables in a certain area of memory that describe hardware resources and software methods to control them. Each table type has a specific format described in the specification. Besides, the tables that contain device control methods and ACPI event handlers contain AML (ACPI Machine Language) code, which is a machine-independent instruction set presented in a compact form. An operating system that supports ACPI contains an AML interpreter that translates AML instructions into CPU instructions, thus executing methods or event handlers.

Some of these tables store all or part of the static data in the sense that it does not change from run to run of the system. Static data is usually created by the motherboard or BIOS manufacturer and described in a special language, ASL (ACPI Source Language), and then compiled into an AML representation.

Other tables store dynamic data that depends on, for example, the BIOS settings and the motherboard's configuration. These tables are generated by the BIOS during the system boot phase before control is transferred to the OS.

The role of the OS in this model is to move various hardware components from one state (e.g., normal operation) to another state (e.g., low-power mode). The transition from one state to another usually occurs by an event. For example, a drop in CPU core temperature is an event by which the OS can invoke a fan speed reduction method. Another example: a user explicitly told the system to hibernate, saving RAM to disk, and some time later the network administrator turned on the system with the Wake-on-LAN function.

States

Global states

The following basic states of the "system as a whole" are distinguished.

G0 (S0) (Working) - normal operation.

G1 (Suspend, Sleeping, Sleeping Legacy) - machine is shut down, but current system context is preserved, operation can be continued without rebooting. For each device, the "degree of information loss" in the process of falling asleep is defined, as well as where the information should be stored and from where it will be read when waking up, and the time to wake up from one state to another (for example, from sleeping to working state). Four states of sleep are distinguished:

  • S1 ("Power on Suspend" (POS) in the BIOS), a state in which all processor caches are reset and the processors have stopped executing instructions. However, power to processors and RAM is maintained; devices that are not designated to remain on may be disabled;
  • S2 is a deeper sleep state than S1, when the CPU is off, but usually not in use;
  • S3 ("Suspend to RAM" (STR in BIOS, "Standby" in Windows versions up to Windows XP and in some Linux variations, "Sleep" in Windows Vista and Mac OS X, though ACPI specifications refer only to S3 and Sleep) - in this state the RAM continues to be powered and is almost the only component consuming power. Since the state of the operating system and all applications, open documents etc. are stored in RAM, the user can resume work exactly where he left it - the state of RAM when returning from S3 is the same as it was before entering this mode. (The specification states that S3 is quite similar to S2, only slightly more components are disabled in S3.) S3 has two advantages over S4: the computer returns to operating state faster, and, second, if a running program (open documents, etc.) contains sensitive information, that information will not be forced to be written to disk. However, disk caches can be reset to disk to prevent compromising data integrity if the system does not wake up, for example due to a power failure;
  • S4 ("Hibernation" in Windows, "Safe Sleep" in Mac OS X, also known as "Suspend to disk", although the ACPI specification only mentions the term S4) - in this state all the contents of RAM are stored in non-volatile memory such as the hard disk: state of the operating system, all applications, open documents, etc. This means that after returning from S4, the user can resume work from where it was stopped, similar to the S3 mode. The difference between S4 and S3, apart from the extra time to move the contents of RAM to disk and back, is that a power failure in S3 will cause the computer to lose all data in RAM, including all unsaved documents, whereas the computer in S4 is not affected. S4 is quite different from the other S states and more strongly resembles G2 Soft Off and G3 Mechanical Off. A system in S4 can also be switched to G3 Mechanical Off and still remain in S4, saving state information so that the operating state can be restored after power-up.

G2 (S5) (soft-off) - Soft-off; the system is completely stopped but energized, ready to turn on at any time. System context is lost.

G3 (mechanical off) - mechanical system shutdown; ATX power supply is off.

CPU states

There are four states (from C0 to C3) of the CPU.

C0 - operational (working) mode.

  • C1 (known as Halt) is a state in which the processor does not execute instructions but can immediately return to an operational state. Some processors, Pentium 4 for example, also support Enhanced C1 (C1E) state for lower power consumption.
  • C2 (known as Stop-Clock) - A state where the processor is detected by applications, but it takes time to return to operating mode.
  • C3 (known as Sleep) - A state in which the processor turns off its own cache, but is ready to move to other states.

Device states

There are four different device states (monitor, modem, bus, network cards, graphics card, disks, floppies, etc) ranging from D0 to D3.

  • D0 is a fully operational state, the device is on.
  • D1 and D2 - intermediate states, activity is determined by the device.
  • D3 - device is off.

Performance states

While a processor or device is operational (C0 and D0, respectively), it may be in one or more performance states. These states depend on the particular implementation. For example, P0 is always the highest performance level; from P1 to Pn the performance level decreases sequentially, to the implementation limit, where n is less than 16.

P-states are also known as SpeedStep in Intel processors, as PowerNow! or Cool'n'Quiet in AMD processors, and as LongHaul in VIA processors.

  • P0 maximum performance and frequency
  • P1 less than P0, voltage/frequency cutoff
  • P2 less than P1, voltage/frequency cutoff
  • ...
  • Pn less than P(n-1), voltage/frequency trimmed

Timeline

Further Resources

Title
Author
Link
Type
Date
Golden logo
By using this site, you agree to our Terms of Service.