CPU_CState_PState and then ACPI on Wiki
http://wenku.baidu.com/link?url=eHbdT4EjdJx3dsQETGUIL8q1K3_EyuzGLWT0G103AEca0vs0gHR_v_3c0oaUL2gbkrr8mTeUkXON9KfGKTqYXRK4yHGtx_dSz63ButPsrUO
http://en.wikipedia.org/wiki/Operating_System-directed_configuration_and_Power_Management
Advanced Configuration and Power Interface
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (July 2010) |
In computing, the Advanced Configuration and Power Interface (ACPI) specification provides an open standard for device configuration and power managementby the operating system.
First released in December 1996, ACPI defines platform-independent interfaces for hardware discovery, configuration, power management and monitoring. With the intention of replacing Advanced Power Management, the MultiProcessor Specification and the Plug and Play BIOS Specification,[1] the standard brings power management under the control of the operating system, as opposed to the previous BIOS-central system which relied on platform-specific firmware to determine power management and configuration policy.[2] The specification is central to Operating System-directed configuration and Power Management (OSPM), a system implementing ACPI which removes device management responsibilities from legacy firmware interfaces.
The standard was originally developed by Intel, Microsoft and Toshiba, and was later joined by HP and Phoenix. The latest version is "Revision 5.0", which was published on 6 December 2011.[3] As the ACPI technology gained wider adoption with many operating systems and processor architectures, the desire to improve the governance model of the specification has increased significantly. In October 2013, original developers of the ACPI standard agreed to transfer all assets to the UEFI Forum, where all future development will be taking place.[4]
Contents
[hide]
Architecture[edit]
The firmware-level ACPI has three main components: the ACPI tables, the ACPI BIOS and the ACPI registers. Unlike its predecessors, like the APM or PnP BIOS, the ACPI implements little of its functionality in the ACPI BIOS code, whose main role is to load the ACPI tables in system memory. Instead, most of the firmware ACPI functionality is provided in ACPI Machine Language (AML) bytecode stored in the ACPI tables. To make use of these tables, the operating system must have aninterpreter for the AML bytecode. A reference AML interpreter implementation is provided by the ACPI Component Architecture (ACPICA). At the BIOS development time, AML code is compiled from the ASL (ACPI Source Language) code.[5][6]
As ACPI also replaces PnP BIOS, it also provides a hardware enumerator, mostly implemented in the DSDT (Differentiated System Description Table) ACPI table. The advantage of a bytecode approach is that unlike PnP BIOS code (which was 16-bit), the ACPI bytecode may be used in any operating system, even in 64-bit long mode.[6]
Overall design decision was not without criticism. In November 2003, Linus Torvalds, initial creator of the Linux kernel, described ACPI as "a complete design disaster in every way".[7][8] In 2001, other senior Linux software developers like Alan Cox expressed concerns about the requirements that bytecode from an external source must be run by the kernel with full privileges, as well as the overall complexity of the ACPI specification.[9] In 2014, Mark Shuttleworth, founder of the Ubuntu Linux distribution, compared ACPI with trojan horses.[10]
ACPI Component Architecture (ACPICA)[edit]
The ACPI Component Architecture (ACPICA) provides an open-source OS-independent reference implementation of the OS-related ACPI code;[11] it is mainly written by Intel's engineers. The ACPICA code is used by Linux and FreeBSD, which supplement it with their OS-specific code.[5]
History[edit]
The first revision of the ACPI specification was released in December 1996, supporting 16 and 32-bit addressing spaces. It was not until August 2000 that ACPI received 64-bit address support as well as support for multiprocessor workstations and servers with revision 2.0. In September 2004, revision 3.0 gave the ACPI specification support for SATA connectors, PCI Express bus, >256 multiprocessor support, ambient light sensors and user-presence devices, as well as extending the Thermal model beyond the previous processor-centric support. In June 2009, the 4.0 specification added many new features to the design; most notable are USB 3.0 support, logical processor idling support, and x2APIC support.[3] The latest of the major publications is revision 5.0, released in November 2011.[3]
Operating systems[edit]
Microsoft's Windows 98 was the first operating system to implement ACPI,[12][13] but its implementation was somewhat buggy or incomplete,[14][15] although some of the problems associated with it were caused by the first-generation ACPI hardware.[16] Other operating systems, including later versions of Windows, eComStation,FreeBSD, NetBSD, OpenBSD, HP-UX, OpenVMS, Linux, and PC versions of SunOS, have at least some support for ACPI.[17] Some newer operating systems like Windows Vista require ACPI-compliant BIOS to work at all[18] (in particular, Vista requires a BIOS with ACPI 2.0 or later).[19]
The 2.4 series of the Linux kernel had only minimal support for ACPI, with better support implemented (and enabled by default) from kernel version 2.6.0 onwards.[20] Old ACPI BIOS implementations tend to be quite buggy, and consequently are not supported by later operating systems. For example, Windows 2000,Windows XP, and Windows Server 2003 only use ACPI if the BIOS date is after January 1, 1999.[21] Similarly, Linux kernel 2.6 blacklisted any ACPI BIOS from before January 1, 2001.[20]
OSPM responsibilities[edit]
Once an OSPM-compatible operating system activates ACPI, it takes over and has exclusive control of all aspects of power management and device configuration. The OSPM implementation must expose an ACPI-compatible environment to device drivers, which exposes certain system, device and processor states.
Power states[edit]
Global states[edit]
The ACPI specification defines the following four Global "Gx" states and six Sleep "Sx" states for an ACPI-compliant computer-system:[22][23]
- G0 (S0), Working: "Awaymode" is a subset of S0, where monitor is off but background tasks are running.
- G1, Sleeping: Divided into four states, S1 through S4:
- S1, Power on Suspend (POS): All the processor caches are flushed, and the CPU(s) stops executing instructions. The power to the CPU(s) and RAM is maintained. Devices that do not indicate they must remain on, may be powered off.
- S2: CPU powered off. Dirty cache is flushed to RAM.
- S3, commonly referred to as Standby, Sleep, or Suspend to RAM (STR): RAM remains powered.
- S4, Hibernation or Suspend to Disk: All content of the main memory is saved to non-volatile memory such as a hard drive, and is powered down.
- G2 (S5), Soft Off: G2/S5 is almost the same as G3 Mechanical Off, except that the power supply unit (PSU) still supplies power, at a minimum, to the power button to allow return to S0. A full reboot is required. No previous content is retained. Other components may remain powered so the computer can "wake" on input from the keyboard, clock, modem, LAN, or USB device.
- G3, Mechanical Off: The computer's power has been totally removed via a mechanical switch (as on the rear of a PSU). The power cord can be removed and the system is safe for disassembly (typically, only the real-time clock continues to run - using its own small battery).
Furthermore, the specification defines a Legacy state: the state on an operating system which does not support ACPI. In this state, the hardware and power are not managed via ACPI, effectively disabling ACPI.
Device states[edit]
The device states D0–D3 are device-dependent:
- D0 Fully On is the operating state.
- D1 and D2 are intermediate power-states whose definition varies by device.
- D3 Off has the device powered off and unresponsive to its bus.
- D3 Hot & Cold: The D3 state is further divided into D3 Hot (has aux power), and D3 Cold (no power provided). A device in D3 Hot state can assert power management requests to transition to higher power states.
Processor states[edit]
The CPU power states C0–C3 are defined as follows:
- C0 is the operating state.
- C1 (often known as Halt) is a state where the processor is not executing instructions, but can return to an executing state essentially instantaneously. All ACPI-conformant processors must support this power state. Some processors, such as the Pentium 4, also support an Enhanced C1 state (C1E or Enhanced Halt State) for lower power consumption.[24]
- C2 (often known as Stop-Clock) is a state where the processor maintains all software-visible state, but may take longer to wake up. This processor state is optional.
- C3 (often known as Sleep) is a state where the processor does not need to keep its cache coherent, but maintains other state. Some processors have variations on the C3 state (Deep Sleep, Deeper Sleep, etc.) that differ in how long it takes to wake the processor. This processor state is optional.
- Additional states are defined by manufacturers for some processors. For example, Intel's Haswell platform has states up to C10, where it distinguishescore states and package states.[25]
Performance states[edit]
While a device or processor operates (D0 and C0, respectively), it can be in one of several power-performance states. These states are implementation-dependent. Though, P0 is always the highest-performance state; with P1 to Pn being successively lower-performance states, up to an implementation-specific limit of n no greater than 16.
P-states have become known as SpeedStep in Intel processors, as PowerNow! or Cool'n'Quiet in AMD processors, and as PowerSaver in VIA processors.
- P0 max power and frequency
- P1 less than P0, voltage/frequency scaled
- P2 less than P1, voltage/frequency scaled
- ...
- Pn less than P(n-1), voltage/frequency scaled
Hardware interface[edit]
ACPI-compliant systems interact with hardware through either a "Function Fixed Hardware (FFH) Interface", or a platform-independent hardware programming model which relies on platform-specific ACPI Machine Language (AML) provided by the original equipment manufacturer (OEM).
Function Fixed Hardware interfaces are platform-specific features, provided by platform manufacturers for the purposes of performance and failure recovery. Standard Intel-based PCs have a fixed function interface defined by Intel,[26] which provides a set of core functionality that reduces an ACPI-compliant system's need for full driver stacks for providing basic functionality during boot time or in the case of major system failure.
Firmware interface[edit]
ACPI defines a large number of tables that provide the interface between an ACPI-compliant operating system, and system firmware. For example:[27]
- DSDT – Differentiated System Description Table
- SSDT – Secondary System Description Table
- SRAT – Static Resource Affinity Table
The tables allow description of system hardware in a platform-independent manner, and are presented as either fixed-formatted data structures or in AML. The main AML table is the DSDT (differentiated system description table).
The Root System Description Pointer is located in a platform-dependent manner, and describes the rest of the tables.
ACPI Platform Error Interface (APEI)[edit]
A specification for reporting of hardware errors e.g. from the chipset, to the operating system.
Security Risk[edit]
This section may stray from the topic of the article into the topic of another article, Firmware. Please helpimprove this section or discuss this issue on the talk page. (April 2014) |
Ubuntu Linux founder Mark Shuttleworth has likened ACPI to Trojan horses.[28] He has described proprietary firmware (firmware ACPI or any other firmware) as a security risk, saying that "firmware on your device is the NSA's best friend" and calling firmware (ACPI or non-ACPI) a Trojan horse of monumental proportions". He has pointed out that low quality, closed source firmware is a major threat to system security:[7] "Your biggest mistake is to assume that the NSA is the only institution abusing this position of trust — in fact, it's reasonable to assume that all firmware is a cesspool of insecurity, courtesy of incompetence of the highest degree from manufacturers, and competence of the highest degree from a very wide range of such agencies".
As a solution to this problem, he has called for declarative firmware (ACPI or non-ACPI).[7] Firmware should be open-source so that the code can be checked and verified. Firmware should be declarative, meaning that it should describe "hardware linkage and dependencies" and should not include executable code.
CPU_CState_PState and then ACPI on Wiki的更多相关文章
- SQL_Server_2008定期自动备份详细图解
SQL_Server_2008定期自动备份详细图解 设置自动数据库的定期备份计划. http://wenku.baidu.com/link?url=Tu ...
- 二、多线程基础-乐观锁_悲观锁_重入锁_读写锁_CAS无锁机制_自旋锁
1.10乐观锁_悲观锁_重入锁_读写锁_CAS无锁机制_自旋锁1)乐观锁:就像它的名字一样,对于并发间操作产生的线程安全问题持乐观状态,乐观锁认为竞争不总是会发生,因此它不需要持有锁,将 比较-设置 ...
- cb19a_c++_只适合string类型的操作_提取_追加_替换
*cb19a_c++_只适合string类型的操作_提取_追加_替换三个substr重载函数-获取一个字符串的一部分六个append重载函数-追加字符十个replace重载函数-替换更换 重载函数越多 ...
- loto仪器_如何模拟输出凸轮轴和曲轴波形_用任意波形信号源SIG852?
loto仪器_如何模拟输出凸轮轴和曲轴波形_用任意波形信号源SIG852? 在汽车传感器的波形检测应用中,有时候需要模拟各种汽车传感器的输出信号,用来驱动和监测对应的执行机构或者电路是否正常,这其中, ...
- pytho简单爬虫_模拟登陆西电流量查询_实现一键查询自己的校园网流量
闲来无事,由于校园内网络是限流量的,查询流量很是频繁,于是萌生了写一个本地脚本进行一键查询自己的剩余流量. 整个部分可以分为三个过程进行: 对登陆时http协议进行分析 利用python进行相关的模拟 ...
- 随心测试_软测基础_002_<测试工程师_核心技能体系>
测试工程师核心技能体系构成 测试基础体系:[对象——>方法——>流程].[测试活动类型——>质量] 测试分析体系:[测试对象分析]——>[测试设计(计划.数据.用例.文档)] ...
- BZOJ_1022_[SHOI2008]_小约翰的游戏John_(博弈论_反Nim游戏)
描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1022 反Nim游戏裸题.详见论文<组合游戏略述——浅谈SG游戏的若干拓展及变形>. ...
- 深入理解c语言_从编译器的角度考虑问题_纪念Dennis Ritchie先生
开源中国: Dennis Ritchie教授过世了,他发明了C语言,一个影响深远并彻底改变世界的计算机语言.一门经历40多年的到今天还长盛不训的语言,今天很多语言都受到C的影 响,C++,Java,C ...
- c程序设计语言_习题7-6_对比两个输入文本文件_输出它们不同的第一行_并且要记录行号
Write a program to compare two files, printing the first line where they differ. Here's Rick's solut ...
- c语言_文件操作_FILE结构体解释_涉及对操作系统文件FCB操作的解释_
1. 文件和流的关系 C将每个文件简单地作为顺序字节流(如下图).每个文件用文件结束符结束,或者在特定字节数的地方结束,这个特定的字节数可以存储在系统维护的管理数据结构中.当打开文件时,就建立了和文件 ...
随机推荐
- webpack+babel+ES6+react环境搭建
webpack+babel+ES6+react环境搭建 步骤: 1 创建项目结构 注意: 先创建一个项目目录 react 这个名字自定义,然后进入到这个目录下面 mkdir app //创建app ...
- 转:Java 动态代理的内部实现机制(大体意思正确,写的还行的一篇文章)
转:Java动态绑定的内部实现机制 JAVA虚拟机调用一个类方法时,它会基于对象引用的类型(通常在编译时可知)来选择所调用的方法.相反,当虚拟机调用一个实例方法时,它会基于对象实际 的类型(只能在运行 ...
- 用c#语言通过修改注册表改IE网页首页
原文发布时间为:2009-04-19 -- 来源于本人的百度文章 [由搬家工具导入] string key = @"HKEY_CURRENT_USER\Software\Microsoft\ ...
- Android自定义Dialog多选对话框(Dialog+Listview+CheckBox)
先放效果截图 项目中需要有个Dialog全选对话框,点击全选全部选中,取消全选全部取消.下午查了些资料,重写了一下Dialog对话框.把代码放出来. public class MainActivity ...
- Cannot resolve symbol KeyEventCompat(android.support.v4.view.KeyEventCompat找不到)
Cannot resolve symbol KeyEventCompat(android.support.v4.view.KeyEventCompat找不到) 解决方案 KeyEventCompat类 ...
- Codeforces Gym 101194C Mr. Panda and Strips(2016 EC-Final,区间DP预处理 + 枚举剪枝)
题目链接 2016 EC-Final 题意 现在要找到数列中连续两个子序列(没有公共部分).要求这两个子序列本身内部没有重复出现的数. 求这两个子序列的长度的和的最大值. 首先预处理一下.令$ ...
- 安全性测试入门 (四):Session Hijacking 用户会话劫持的攻击和防御
本篇继续对于安全性测试话题,结合DVWA进行研习. Session Hijacking用户会话劫持 1. Session和Cookies 这篇严格来说是用户会话劫持诸多情况中的一种,通过会话标识规则来 ...
- poj 1185 炮兵阵地 [经典状态压缩DP]
题意:略. 思路:由于每个大炮射程为2,所以如果对每一行状态压缩的话,能对它造成影响的就是上面的两行. 这里用dp[row][state1][state2]表示第row行状态为state2,第row- ...
- NOI模拟题4 Problem C: 填格子(board)
Solution 首先我们要有敏锐的直觉: 我们将每一列中不选哪种颜色看作是一个序列, 则我们发现这个序列要求相邻两位的颜色不同. 我们还发现, 一个这样的序列对应两种不同的合法的棋盘, 因此统计合法 ...
- 2016集训测试赛(二十四)Problem C: 棋盘控制
Solution 场上的想法(显然是错的)是这样的: 我们假设棋子是一个一个地放置的, 考虑在放置棋子的过程中可能出现哪些状态. 我们令有序整数对\((i, j)\)表示总共控制了\(i\)行\(j\ ...