Loading AI tools
API for power management in IBM-compatible computers From Wikipedia, the free encyclopedia
Advanced power management (APM) is a technical standard for power management developed by Intel and Microsoft and released in 1992[1] which enables an operating system running an IBM-compatible personal computer to work with the BIOS (part of the computer's firmware) to achieve power management.[2]
Abbreviation | APM |
---|---|
Status | Deprecated |
First published | 1992 |
Latest version | 1.2 1996 |
Organization | Intel, Microsoft |
Successor | ACPI |
Domain | Power management |
Revision 1.2 was the last version of the APM specification, released in 1996. ACPI is the successor to APM. Microsoft dropped support for APM in Windows Vista. The Linux kernel still mostly supports APM, though support for APM CPU idle was dropped in version 3.0.
APM uses a layered approach to manage devices. APM-aware applications (which include device drivers) talk to an OS-specific APM driver. This driver communicates to the APM-aware BIOS, which controls the hardware. There is the ability to opt out of APM control on a device-by-device basis, which can be used if a driver wants to communicate directly with a hardware device.
Communication occurs both ways; power management events are sent from the BIOS to the APM driver, and the APM driver sends information and requests to the BIOS via function calls. In this way the APM driver is an intermediary between the BIOS and the operating system.
Power management happens in two ways; through the above-mentioned function calls from the APM driver to the BIOS requesting power state changes, and automatically based on device activity.
In APM 1.0 and APM 1.1, power management is almost fully controlled by the BIOS. In APM 1.2, the operating system can control PM time (e.g. suspend timeout).
There are 12 power events (such as standby, suspend and resume requests, and low battery notifications), plus OEM-defined events, that can be sent from the APM BIOS to the operating system. The APM driver regularly polls for event change notifications.
Power Management Events:[1]
Name | Code | Comment |
---|---|---|
System Standby Request Notification | 0x0001 | |
System Suspend Request Notification | 0x0002 | |
Normal Resume System Notification | 0x0003 | |
Critical Resume System Notification | 0x0004 | |
Battery Low Notification | 0x0005 | |
Power Status Change Notification | 0x0006 | |
Update Time Notification | 0x0007 | |
Critical System Suspend Notification | 0x0008 | |
User System Standby Request Notification | 0x0009 | |
User System Suspend Request Notification | 0x000A | |
System Standby Resume Notification | 0x000B | |
Capabilities Change Notification | 0x000C | Due to setup or device insertion/removal |
There are 21 APM function calls defined that the APM driver can use to query power management statuses, or request power state transitions.[1] Example function calls include letting the BIOS know about current CPU usage (the BIOS may respond to such a call by placing the CPU in a low-power state, or returning it to its full-power state), retrieving the current power state of a device, or requesting a power state change.
Name | Code | Comment |
---|---|---|
APM Installation Check | 0x00 | |
APM Real Mode Interface Connect | 0x01 | |
APM Protected Mode 16-bit Interface Connect | 0x02 | Avoids real or virtual86 mode. |
APM Protected Mode 32-bit Interface Connect | 0x03 | Avoids real or virtual86 mode. |
APM Interface Disconnect | 0x04 | |
CPU Idle | 0x05 | Requests system suspend. 0) Clock halted until timer tick interrupt. 1) Slow clock[1] |
CPU Busy | 0x06 | Driver tells system APM to restore clock speed of the CPU. |
Set Power State | 0x07 | Set system or device into Suspend/Standby/Off state. |
Enable/Disable Power Management | 0x08 | |
Restore APM BIOS Power-On Defaults | 0x09 | |
Get Power Status | 0x0A | Supports AC status "On backup power". And battery status. |
Get PM Event | 0x0B | Checks for APM events. Shall be called once per second. |
Get Power State | 0x0C | |
Enable/Disable Device Power Management | 0x0D | |
APM Driver Version | 0x0E | |
Engage/Disengage Power Management | 0x0F | APM management for a specific device. |
Get Capabilities | 0x10 | |
Get/Set/Disable Resume Timer | 0x11 | |
Enable/Disable Resume on Ring Indicator | 0x12 | |
Enable/Disable Timer Based Requests | 0x13 | |
OEM APM Installation Check | 0x80 | Tells if APM BIOS supports OEM hardware dependent functions. |
OEM APM Function | 0x80 | Access to OEM specific functions. |
The APM specification defines system power states and device power states.
APM defines five power states for the computer system:
APM also defines power states that APM-aware hardware can implement. There is no requirement that an APM-aware device implement all states.
The four states are:
The CPU core (defined in APM as the CPU clock, cache, system bus and system timers) is treated specially in APM, as it is the last device to be powered down, and the first device to be powered back up. The CPU core is always controlled through the APM BIOS (there is no option to control it through a driver). Drivers can use APM function calls to notify the BIOS about CPU usage, but it is up to the BIOS to act on this information; a driver cannot directly tell the CPU to go into a power saving state.
The ATA specification and SATA specification defines APM provisions for hard drives, which specifies a trade-off between spin-down frequency and always-on performance. Unlike the BIOS-side APM, the ATA APM and SATA APM has never been deprecated.[3]
Aggressive spin-down frequencies may reduce drive lifespan by unnecessarily accumulating load cycles; most modern drives are specified to sustain 300,000 cycles and usually last at least 600,000. On the other hand, not spinning down the drive will cause extra power draw and heat generation; high temperatures also reduce the lifespan of hard drives.[4]
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.