Please refer to http://blogs.sun.com/randyf/entry/more_power_to_you for original post.
More Power to You
Typically, I wonder if my posts are more small snippits of tidbits (ahhh, Kibbles and Bits!!!!), but here is a bit more.
The Solaris operating environment supports various aspects of power
management, including Suspend and Resumve (a.k.a. CheckPoint and
Resume, or CPR), and soon, so will Solaris on x86 (much of which will
go through the ACPI interfaces). It is, therefore, important that your
drivers support the Solaris power management interfaces:
-
DDI_SUSPEND
(a flag passed to detatch(9e))
-
DDI_RESUME
(a flag passed to attach(9e))
-
power(9e)
(a driver entry point)
Much on these interfaces can be found at http://docs.sun.com
, or on the relevant man pages for the attach(9e)
, detatch(9e)
, and power(9d)
man pages.
But in a nutshell, DDI_SUSPEND
and DDI_RESUME
cases should handle the saving and restoring of hardware state before a device is shutdown or restored after a shutdown. And power(9e)
is the procedure that Power Management framework functions will call
when it wants to manage components that provide power management
facilities in the hardware.
the power(9e)
entry point also works in conjunction with:
-
pm_lower_power(9f)
- Lower power on a component
-
pm_raise_power(9f)
- Raise power on a component
-
pm_busy_component(9f)
- Indicate that the component is busy
-
pm_idle_component(9f)
- Indicate that the component is idle
-
pm_create_components(9f)
- Create manageble components
-
pm_destroy_components(9f)
- Destroy manageble components
So are you writing a driver, and expect it to work with Solaris Power Management. Well, the first and most important
part of this equasion is that you MUST
implement the DDI_SUSPEND
and DDI_RESUME
commands to
the attach and detach routines in your driver. And in this section of
the code, it is important to take information from the hardware, and
save it into kernel memory (maybe a pointer within the driver soft
state). On resume, all that is necessary, is to take this saved state,
and put it back in the hardware:
xxx_detach() [
switch (cmd) {
case DDI_SUSPEND:
/* Save hardware state */
if (OK)
return (DDI_SUCCESS);
else
return (DDI_FAILURE);
break;
case DDI_DETACH:
/* Do attach processing */
if (OK)
return (DDI_SUCCESS);
else
return (DDI_FAILURE);
break;
default:
/* Shouldn't be here */
return (DDI_VAILURE);
}
xxxattach() {
case DDI_RESUME:
/* Restore hardware state */
/* See the return related information in detach */
break;
case DDI_DETACH:
/* Do attach processing */
default:
/* Shouldn't be here */
return (DDI_FAILURE);
}
Of course, the relevent hardware information needed to save and/or restore the driver after a suspend/resume
needs to be put inside the DDI_SUSPEND/DDI_RESUME case, and cannot really be presented here. However, if a
the driver is written well, it can very well have a drv_suspend()
function, (or even a save_state
or
restore_state
function), and the attach/detach routines become very easy to manage.
And should your driver be able to handle various power states, say a laptop framebuffer that allows for the backligh
to be at lower intensity, or a disk driver that allows for the drive to spin down, then you must also implement the power(9e)
entry point and
many of the pm_*
routines above (gotta register the components, and let the Solaris power management framework know when they are idle).
But alas, this may be a lot of thinking for a day, so maybe it is time for a California Pale Ale!
OK, there really isn't a category for a California Pale Ale, but one of the classic Pale Ales from California,
is the Sierra Nevada Pale Ale
. Light and crisp, with a hit of hop fruitiness. A great ale for
a fine fall day.
And sometime later, I will add some more details to Power Mangement
Do you have some questions or suggestions, just add a comment, I will happily elaborate more!
分享到:
相关推荐
• Unified memory map for Slave Device. • Command acknowledgement (ACK/NACK) for Write commands where required. • System behavior upon detection of a parity error in an RCS Device-initiated Command ...
通过理解和应用《PCI Bus Power Management Interface Specification》,硬件开发者可以设计出更加节能、高效的PCI设备,而系统集成商则可以构建出对电源管理友好的计算机平台。同时,这也为用户提供了更好的能源...
手机和其他便携式电子设备的复杂性和性能要求呈指数级增长。随着对新的高性能、高数据速率功能的需求增加,系统级电源管理变得至关重要。使用先进的电源管理技术来降低功耗并延长电池寿命比以往任何时候都更加重要。...
MIPI SPMI(System Power Management Interface)是MIPI联盟制定的一种系统电源管理接口标准,主要目的是为了在移动设备和便携式电子设备中连接电源管理集成电路(PMIC)和系统级芯片(SoC),从而实现对SoC内部供电...
PCIE Power Management的实现可以分为两个方面:Link Power State和Device Power State。 Link Power State是指PCIE总线的电源状态。PCIE总线可以处于不同的电源状态,例如L0、L1、L2等。 Link Power State是通过...
Android Power Management Framework是Android操作系统中的关键组件,它专注于优化移动设备的电源消耗,以确保电池寿命和用户体验。在移动设备上,尤其是智能手机,电源管理至关重要,因为电池容量有限。如果电源...
This paper presents power management guidelines for PCI Express links on Intel-based Mobile platforms. It describes the mapping from platform sleeping states and device power states to link power ...
ACPI表示高级配置和电源管理接口(Advanced Configuration and Power Management Interface)。ACPI(Advanced Configuration Management)是由 惠普/INTEL/MICROSOFT/TOSHIBA提出的新型电源管理规范,意图是让系统...
标题中提到的"IHI0068C_low_power_interface_spec.pdf"指的是一份关于AMBA低功耗接口规范的技术文档。AMBA(Advanced Microcontroller Bus Architecture)是由ARM公司开发的一套片上总线标准,广泛应用于移动终端和...
TinkPad Power Management是一款专为ThinkPad笔记本电脑设计的电源管理软件,旨在帮助用户优化系统性能,同时延长电池使用时间。这款软件的6.65版本提供了更精细的控制选项,以适应不同用户的需求。 1. **TinkPad ...
Power Management from Linux Kernel to Android Introduction to Linux Power Management Concepts behind Android Power Management Design and Implementation Room for Improvements
above issues in power management for energy-harvesting sensor networks.We develop abstractions to characterize the complex time varying nature of such sources with analytically tractable models and ...
### Runtime Power Management Framework #### 动机与必要性 运行时电源管理(Runtime Power Management,简称Runtime PM)框架是Linux内核中一个重要的组件,它主要用于优化设备在空闲状态下的电源消耗。随着移动...
通过阅读《Oracle Solaris 8 Using Power Management》,系统管理员和IT专业人员可以学习如何在保持高性能的同时,最大化Oracle Solaris 8环境下的电源效率,这对于数据中心和服务器群集尤其重要,因为它可以帮助...
<uses-permission android:name="android.permission.DEVICE_POWER" /> ``` - 所有唤醒锁必须正确配对使用,未及时释放会导致系统故障。 **在Android Framework层**,电源管理的核心组件主要包括以下几个文件: -...
《MathWorks® Simulink Interface for Power PMAC详解》 MathWorks® Simulink Interface for Power PMAC是一款专为电力运动控制设计的软件工具,它为用户提供了将Power PMAC控制器与Simulink模型集成的能力。这个...
JEDEC JESD301-1A.02-2023 PMIC50x0 Power Management IC Standard是JEDEC(Joint Electron Device Engineering Council)组织制定的半导体器件标准之一,旨在规范Power Management IC(电源管理集成电路)的设计、...
Driver implementation for power management functions of Power Management Controller (PMC) on SPARCstation-Voyager.
lenovo电源管理驱动power management win10版是一款特别针对windows10系统而开发的联想电源管理驱动程序,英文全称为lenovo power management driver。软件可以轻松解决用户在安装win10时联想电源管理驱动不通过的...