Advanced Power Management
Encyclopedia
Advanced power management (APM) is an API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 developed by Intel and Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 and released in 1992 which enables an operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 running an IBM-compatible personal computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

 to work with the BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....

 (part of the computer's firmware
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...

) to achieve power management
Power management
Power management is a feature of some electrical appliances, especially copiers, computers and computer peripherals such as monitors and printers, that turns off the power or switches the system to a low-power state when inactive. In computing this is known as PC power management and is built...

.

Revision 1.2 was the last version of the APM specification, released in 1996. ACPI
Advanced Configuration and Power Interface
In computing, the Advanced Configuration and Power Interface specification provides an open standard for device configuration and power management by the operating system....

 is intended as the successor to APM. Microsoft dropped support for APM in Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

. The Linux Kernel
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 still mostly supports APM, with the last fully functional APM support shipping in 2.6.39.

Overview

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.

Power management events

There are 12 power events (such as standby, suspend and resume requests, and low battery notifications), plus OEM
Original Equipment Manufacturer
An original equipment manufacturer, or OEM, manufactures products or components that are purchased by a company and retailed under that purchasing company's brand name. OEM refers to the company that originally manufactured the product. When referring to automotive parts, OEM designates a...

-defined events, that can be sent from the APM BIOS to the operating system. The APM driver regularly polls
Polling (computer science)
Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity. Polling is most often used in terms of input/output , and is also referred to as polled or software driven .Polling is sometimes used...

 for event change notifications.

Power Management Events:
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


Power management functions:
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
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.

APM functions

There are 21 APM function calls defined that the APM driver can use to query power management statuses, or request power state transitions. 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.

System power states

APM defines five power states for the computer system:
  • Full On: The computer is powered on, and no devices are in a power saving mode.
  • APM Enabled: The computer is powered on, and APM is controlling device power management as needed.
  • APM Standby: Most devices are in their low-power state, the CPU is slowed or stopped, and the system state is saved. The computer can be returned to its former state quickly (in response to activity such as the user pressing a key on the keyboard).
  • APM Suspend: Most devices are powered off, but the system state is saved. The computer can be returned to its former state, but takes a relatively long time. (Hibernation is a special form of the APM Suspend state).
  • Off: The computer is turned off.

Device power states

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:
  • Device On: The device is in full power mode.
  • Device Power Managed: The device is still powered on, but some functions may not be available, or may have reduced performance.
  • Device Low Power: The device is not working. Power is maintained so that the device may be 'woken up'.
  • Device Off: The device is powered off.

CPU

The CPU core (defined in APM as the CPU clock, cache
Cache
In computer engineering, a cache is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere...

, system bus
Front side bus
A front-side bus is a computer communication interface often used in computers during the 1990s and 2000s.It typically carries data between the central processing unit and a memory controller hub, known as the northbridge....

 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.

See also

  • Active State Power Management
    Active State Power Management
    Active State Power Management or ASPM is a power management protocol used to manage PCI Express-based serial link devices as links become less active over time...

     - hardware power management protocol for PCI Express
    PCI Express
    PCI Express , officially abbreviated as PCIe, is a computer expansion card standard designed to replace the older PCI, PCI-X, and AGP bus standards...

  • Advanced Configuration and Power Interface
    Advanced Configuration and Power Interface
    In computing, the Advanced Configuration and Power Interface specification provides an open standard for device configuration and power management by the operating system....

     (ACPI) - successor to APM
  • Green computing
    Green computing
    Green computing or green IT, refers to environmentally sustainable computing or IT. In the article Harnessing Green IT: Principles and Practices, San Murugesan defines the field of green computing as "the study and practice of designing, manufacturing, using, and disposing of computers, servers,...

  • Power management
    Power management
    Power management is a feature of some electrical appliances, especially copiers, computers and computer peripherals such as monitors and printers, that turns off the power or switches the system to a low-power state when inactive. In computing this is known as PC power management and is built...

  • BatteryMax (Idle Detection)
    BatteryMax (Idle Detection)
    BatteryMax is an Idle Detection System used for computer power management developed at Digital Research, Inc.'s European Development Centre in Hungerford, UK. It was invented by British borne engineers Roger Gross and John Constant in August 1989 and was first released with...


External links

  • APM V1.2 Specification (RTF
    Rich Text Format
    The Rich Text Format is a proprietary document file format with published specification developed by Microsoft Corporation since 1987 for Microsoft products and for cross-platform document interchange....

    file).
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK