ACPI Overview

最近有些时间,重温了一下ACPI SPEC Rev4.0,发现之前无法理解的东西,现在也不是那么难懂了。现整理一下笔记。

 

先来明确两个概念:ACPI,OSPM

ACPI:Advanced Configuration and Power Interface 高级配置和电源接口

OSPM:Operation System directed configuration and Power Management 操作系统直接电源管理

在ACPI SPEC中,随处可见OSPM,那么OSPM到底是什么呢?

原来,在早期的电脑中,电源管理完全是由通过APM(Advanced Power Management)来实现的,OS对此一无所知也无从干预。这种管理方式存在很多的缺陷,且BIOS维护APM代码和功能需要非常大的精力。ACPI规范就是为了解决APM的缺陷而问世的,它允许操作系统来控制电源管理,从而解放了BIOS。但是ACPI只是一个接口规范,除了硬件Support、BIOS support之外,OS 也需要support。支持ACPI的OS就可以叫做OSPM。 OSPM的最低要求如下:

1). 在Intel架构的系统上使用system address map reporting interface来得到system address map

      a. INT15H,E820H

       b. EFI GetMemoryMap() Boot Service Function

2).Find and consume the ACPI System Description Tables.

3). 安装启用一个支持所有已定义的AML语法元素的AML interpreter(翻译器)。

4). 支持ACPI Event programming model,包含handing SCI interrupt,managing fixed events/general-propose events/embedded controller interrupt /dynamic device support.

5). 枚举和配置ACPI Namespace中描述的主板设备。

6). 实现以下ACPI devices的支持:Embedded Controller Device/GPE Block Device/Module Device。

7). 安装ACPI Thermal Model。

8). 支持acquisition(获得) and release(释放) Global Lock。

9).  支持OS-directed power management.(设备驱动负责维护device context)。

 

ACPI的结构

ACPI包含三个run-time Components:

1.       ACPI Tables

         主要描述一个Platform上的硬件界面资讯,这些描述包含了一些固定的寄存器的位置,或是说明一些Register Blocks,另外ACPI Tables还包含了一些OS可以执行的AML Code,OS会透过自己的AML Interpreter来执行这些AML Code。

2.       ACPI Registers

        在ACPI Register中是实体的硬件界面,这些寄存器就是被描述在ACPI Tables中的那些。

3.       ACPI BIOS

        符合ACPI规范的BIOS,典型情况下,他会做系统开关机的动作以及实做Sleep界面的支援(BIOS支援S3/S4/…)。

 

ACPI可以实现的功能

1. 系统电源管理 System Power Management

     Global Power State:

          G0: Working –S0

          G1: Sleeping --S1/S3/S4

          G2: Soft off –S5

          G3: Mechanical off        

      

2. 设备电源管理 Device Power Management

              PCI, PCI Express, CardBus, USB, IEEE 1394

       Device Power State:

           D0: fully on 设备可以完全回应,正常工作

           D1: 不同Device Class有不同规范,一般会节省一些电源

           D2: 不同Device Class有不同规范,但并非大多数设备都有支援,比D1更省电,通常会关闭一些设备上的功能来达到省电的目的。

           D3hot: 不同Device Class有不同规范,当要转到D0 状态是,OS SW要重新初始化该设备

           D3: off 电源完全从设备移除

3. 处理器电源管理 Processor Power Management

       在G0状态下,Processor Power State:C0, C1, C2, C3…

4. 设备和处理器性能管理 Device and Processor Performance Management

       在C0/D0状态下,Device/Processor Performance State: P0, P1, P2, P3…

5. 配置/即插即用 Configuration/Plug and Play

6. 系统事件 System Events

7. 电池管理 Battery Management

8. 温度管理 Thermal Management

9. 嵌入式控制器 Embedded Controller

10. SMBus控制器 SMBus Controller

 

 

 

 

 

 

 

 

 

 

 

  • 4
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
ACPI表示高级配置和电源管理接口(Advanced Configuration and Power Management Interface)。ACPI(Advanced Configuration Management)是由 惠普/INTEL/MICROSOFT/TOSHIBA提出的新型电源管理规范,意图是让系统而不是BIOS来全面控制电源管理,使系统更加省电。 其特点主要有:提供立刻开机功能,即开机后可立即恢复到上次关机时的状态,光驱、软驱和硬盘在未使用时会自动关掉电源,使用时再打开;支持在开电状态下既插即拔,随时更换功能。 ACPI主要支持三种节电方式,1、(suspend即挂起)显示屏自动断电;只是主机通电。这时敲任意键即可恢复原来状态。2、(save to ram 或suspend to ram 即挂起到内存)系统把当前信息储存在内存中,只有内存等几个关键部件通电,这时计算机处在高度节电状态,按任意键后,计算机从内存中读取信息很快恢复到原来状态。3、(save to disk或suspend to disk即挂起到硬盘)计算机自动关机,关机前将当前数据存储在硬盘上,用户下次按开关键开机时计算机将无须启动系统,直接从硬盘读取数据,恢复原来状态。   ACPI可实现以下功能:   1、用户可以使外设在指定时间开关;   2、使用笔记本电脑的用户可以指定计算机在低电压的情况下进入低功耗状态,以保证重要的应用程序运行;   3、操作系统可以在应用程序对时间要求不高的情况下降低时钟频率;   4、操作系统可以根据外设和主板的具体需求为它分配能源;   5、在无人使用计算机时可以使计算机进入休眠状态,但保证一些通信设备打开;   6、即插即用设备在插入时能够由ACPI来控制。
The Advanced Configuration and Power Interface (ACPI) specification was developed to establish industry common interfaces enabling robust operating system (OS)-directed motherboard device configuration and power management of both devices and entire systems. ACPI is the key element in Operating System-directed configuration and Power Management (OSPM). ACPI evolved the existing pre-ACPI collection of power management BIOS code, Advanced Power Management (APM) application programming interfaces (APIs, PNPBIOS APIs, Multiprocessor Specification (MPS) tables and so on into a well-defined power management and configuration interface specification. ACPI provides the means for an orderly transition from existing (legacy) hardware to ACPI hardware, and it allows for both ACPI and legacy mechanisms to exist in a single machine and to be used as needed. Further, system architectures being built at the time of the original ACPI specification’s inception, stretched the limits of historical “Plug and Play” interfaces. ACPI evolved existing motherboard configuration interfaces to support advanced architectures in a more robust, and potentially more efficient manner. The interfaces and OSPM concepts defined within this specification are suitable to all classes of computers including (but not limited to) desktop, mobile, workstation, and server machines. From a power management perspective, OSPM/ACPI promotes the concept that systems should conserve energy by transitioning unused devices into lower power states including placing the entire system in a low-power state (sleeping state) when possible. This document describes ACPI hardware interfaces, ACPI software interfaces and ACPI data structures that, when implemented, enable support for robust OS-directed configuration and power management (OSPM)

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值