Implement the OEM Power Management on Windows CE
2010-05-13 17:02
344 查看
With basic power support, a platform, the core OEM Adaptation Layer (OAL), gets called under the following conditions:
OEMInit When power is first applied (first transition from NO POWER to ON).
OEMIdle When the kernel determines that no threads are scheduled to run.
OEMPowerOff Called to request that the system be put into the SUSPEND state. In spite of the name, this function does not actually turn the system power completely off.
Interrupt Handlers Some interrupts are wake-enabled.
The platform code, in the form of the OAL, gets notified and plays a role in some of the key power management state transitions. But basic power management, that is, decision making about when to change the system power state, is not actually done by the OAL. Instead, that job falls to the system's GWES module, which maintains a set of activity timers. This is the module that watches user activity, and which puts the system into a SUSPEND state when no user activity has been seen for a specified duration.
The OEMInit function gets called during the "cold boot" of a system. This refers to the first time that power is applied to a platform. This function gets called pretty early in the system startup process, and handles important tasks like initializing system memory, setting up debugging support, and setting up system interrupts.
The OEMIdle function gets called when the scheduler has no threads to schedule. This gives the OAL the chance to put the CPU in the lowest possible energy state from which it can quickly return to normal operation.
OEMPowerOff is an OAL function that is used to request that the OAL put the system into a SUSPEND state. As such, it is both the last function called before entering a suspend state, and the first function—outside the interrupt handler—to run when leaving a suspend state.
When an interrupt occurs, the kernel first calls interrupt handlers in the OAL. Some of these interrupts can be wake-enabled. This means that they are the interrupts that cause the system to return from a suspend state. They obviously play a key role in power management, but because they are called at interrupt time there is a limited number of things that can be done. In particular, the vast majority of the Microsoft Win32® API functions are not callable at interrupt time because the state of the system at interrupt time cannot be guaranteed.
Source code:
OEMInit: PLATFORM\Mini2440\SRC\OAL\OALLIB\init.c
OEMIdle: PLATFORM\Mini2440\SRC\COMMON\Timer_dvs\timer.c
OEMPowerOff: PLATFORM\Mini2440\SRC\COMMON\Power\off.c
OEMInit When power is first applied (first transition from NO POWER to ON).
OEMIdle When the kernel determines that no threads are scheduled to run.
OEMPowerOff Called to request that the system be put into the SUSPEND state. In spite of the name, this function does not actually turn the system power completely off.
Interrupt Handlers Some interrupts are wake-enabled.
The platform code, in the form of the OAL, gets notified and plays a role in some of the key power management state transitions. But basic power management, that is, decision making about when to change the system power state, is not actually done by the OAL. Instead, that job falls to the system's GWES module, which maintains a set of activity timers. This is the module that watches user activity, and which puts the system into a SUSPEND state when no user activity has been seen for a specified duration.
The OEMInit function gets called during the "cold boot" of a system. This refers to the first time that power is applied to a platform. This function gets called pretty early in the system startup process, and handles important tasks like initializing system memory, setting up debugging support, and setting up system interrupts.
The OEMIdle function gets called when the scheduler has no threads to schedule. This gives the OAL the chance to put the CPU in the lowest possible energy state from which it can quickly return to normal operation.
OEMPowerOff is an OAL function that is used to request that the OAL put the system into a SUSPEND state. As such, it is both the last function called before entering a suspend state, and the first function—outside the interrupt handler—to run when leaving a suspend state.
When an interrupt occurs, the kernel first calls interrupt handlers in the OAL. Some of these interrupts can be wake-enabled. This means that they are the interrupts that cause the system to return from a suspend state. They obviously play a key role in power management, but because they are called at interrupt time there is a limited number of things that can be done. In particular, the vast majority of the Microsoft Win32® API functions are not callable at interrupt time because the state of the system at interrupt time cannot be guaranteed.
Source code:
OEMInit: PLATFORM\Mini2440\SRC\OAL\OALLIB\init.c
OEMIdle: PLATFORM\Mini2440\SRC\COMMON\Timer_dvs\timer.c
OEMPowerOff: PLATFORM\Mini2440\SRC\COMMON\Power\off.c
相关文章推荐
- Power Management under Windows CE
- How to fix the USB root hub power management issue in Windows 7
- 转.Buffer Management by the Camera Driver (Windows Embedded CE 6.0)
- How can I disable the User Account Control (UAC) feature on my Windows Vista computer?
- What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memor
- How to prevent the Program Compatibility Assistant from appearing on Windows Vista
- Get all running services on Windows CE
- How to Install the Latest GCC on Windows
- How to Delete and Recreate the _msdcs DNS zone on a Windows DNS Server
- [翻译图书] Moving Applications to the Cloud on the Microsoft Windows Azure Platform - 3
- Customizing the Windows CE .NET User Interface, Part 2
- What 's the meaning of "Windows-on-Windows" layer?
- Power Management - Windows & RHEL
- WampDeveloper Pro is the best (and fastest) way to create and run multiple websites on Windows, usin
- Platform Invoke and Marshaling Data: [2/3] Calling the Windows CE API
- virtualbox on windows store vdi on ndfs due the file will bigger than 4gb
- use googletest on windows ce
- Setting Up the Development Environment for SharePoint 2010 on Windows Vista,
- Windows 2000 Loader What Goes On Inside Windows 2000: Solving the Mysteries of the Loader