Acpi 6 2
Acpi 6 2
Acpi 6 2
Interface Specification
Version 6.2
May 2017
ACPI Specification
Acknowledgements
The material contained herein is not a license, either expressly or impliedly, to any intellectual
property owned or controlled by any of the authors or developers of this material or to any
contribution thereto. The material contained herein is provided on an "AS IS" basis and, to the
maximum extent permitted by applicable law, this information is provided AS IS AND WITH ALL
FAULTS, and the authors and developers of this material hereby disclaim all other warranties
and conditions, either express, implied or statutory, including, but not limited to, any (if any)
implied warranties, duties or conditions of merchantability, of fitness for a particular purpose, of
accuracy or completeness of responses, of results, of workmanlike effort, of lack of viruses and
of lack of negligence, all with regard to this material and any contribution thereto. Designers must
not rely on the absence or characteristics of any features or instructions marked "reserved" or
"undefined." The Unified EFI Forum, Inc. reserves any features or instructions so marked for
future definition and shall have no responsibility whatsoever for conflicts or incompatibilities
arising from future changes to them. ALSO, THERE IS NO WARRANTY OR CONDITION OF
TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION
OR NON-INFRINGEMENT WITH REGARD TO THE SPECIFICATION AND ANY
CONTRIBUTION THERETO.
IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR ANY
CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR THE COST OF
PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE, LOSS
OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL
DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING
IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS DOCUMENT,
WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH
DAMAGES.
Revision History
6.1 Errata A 1796 Clarify that Type 1 can never support Level Section 14.1.4
triggered platform interrupt
6.1 Errata A 1785 Lack of clarity on use of System Vector Base on Section 5.2.12.15
GICD structures
6.1 Errata A 1783 Clarification on Interrupt Descriptor Usage for Table 6-234
Bit [0] Consumer/Producer
6.1 Errata A 1760 Typo - incorrect bit offsets in the PM1 Enable Table 4-17
Registers Fixed Hardware Feature Enable Bits table.
6.1 Errata A 1758 Minor Errata in ERST tables, Serialization Table 18-348 and Table 18-354
Instruction Entry and Injection Instruction Entry.
6.1 Errata A 1756 Errata: Ensure non-secure timers are accesible Table 5-123
to non-secure in the Flag Definitions: Common Flags
table.
6.1 Errata A 1740 Errata in section 9.13: wrong reference Section 9.13
6.1 Errata A 1715 0 is a valid GSIV for the secure EL1 physical Table 5-117
timer in GTDT
6.1 Errata A 1687 Typo in the Reserved field of the GIC ITS Table 5-67
Structure table.
5.1 1157 Reserve ACPI Low Power Idle Table Signature Table 5-31
"LPIT"
5.1 1155 Updates to M1133 MADT Table 5-63, 5-64
5.1 1151 Bug in ASL example code PRT3 code example following
Figure 9-49
5.1 1149 GTDT changes for new GT Configurations 5.2.24, 5.24.1x
5.1 1136 Add a Notification Type for System Resource Table 5-119 Device Object
Affinity Change Event Notifications,
new 17.2.2
5.1 1134 FADT changes for PSCI Support on ARM Table 5-34, 5-36, New table 5-37
platforms
5.1 1135 PCC Doorbell Protocol for HW-Reduced 14.1.1, 14.1.2-4, 14.2.1-2, 14.3-4
Platforms
5.1 1133 MADT Updates for new GICs 5.2.12.15-17, Table 5-43, 5.2.12
table 5-45, 5-60, 5-61, 5-63, 5-66
5.1 1131 Per-device Cache-coherency Attribute 6.2, 6.2.16; Was Table 6-142--
>Table 6-153
5.1 1126 Add _DSD Predefined Object-- “DeviceSpecific Was Table 5-133 & 6-142 now-->5-
Data” properties 148 & 6-157
5.1 1123 CPPC Performance Feedback Counter Change Tables 5-126, 8.4.5, 8.4.5.1x
1130 CPPC2 8.4.5.1, 8.4.5.1.3.1-4; Was Table 8-
[overlapping/duplicate tickets] 218-->8-229
5.1 1116 Add x2APIC and GIC structure for _MAT 6.2.10
method
5.0 B 1145 Support GICs in proximity domain 5.2.16 5.2. new section 16.4 new
tables, 6.2.13 Table 5-65
5.0 B 1144 Fix the gap for Notify value description 5.6.6, new tables: Table 5-132, 5-
133
5.0 B 1142 Error Source Notifications 18.3.2.6.2, 18.4, Table 18-290
Contents
Tables
Table 5-44 Multiple APIC Description Table (MADT) Format ............................................. 152
Table 5-45 Multiple APIC Flags .......................................................................................... 153
Table 5-46 Interrupt Controller Structure Types ................................................................. 153
Table 5-47 Processor Local APIC Structure ...................................................................... 154
Table 5-48 Local APIC Flags .............................................................................................. 155
Table 5-49 I/O APIC Structure ........................................................................................... 155
Table 5-50 Interrupt Source Override Structure ................................................................. 156
Table 5-51 MPS INTI Flags ................................................................................................ 156
Table 5-52 NMI Source Structure ...................................................................................... 157
Table 5-53 Local APIC NMI Structure ................................................................................ 158
Table 5-54 Local APIC Address Override Structure .......................................................... 158
Table 5-55 I/O SAPIC Structure ......................................................................................... 159
Table 5-56 Processor Local SAPIC Structure .................................................................... 159
Table 5-57 Platform Interrupt Source Structure .................................................................. 161
Table 5-58 Platform Interrupt Source Flags ........................................................................ 161
Table 5-59 Processor Local x2APIC Structure .................................................................. 162
Table 5-60 Local x2APIC NMI Structure ............................................................................ 162
Table 5-61 GICC Structure ................................................................................................. 163
Table 5-62 GICC CPU Interface Flags ............................................................................... 165
Table 5-63 GICD Structure ................................................................................................. 166
Table 5-64 GIC MSI Frame Structure ................................................................................ 166
Table 5-65 GIC MSI Frame Flags ....................................................................................... 167
Table 5-66 GICR Structure ................................................................................................ 167
Table 5-67 GIC ITS Structure ............................................................................................ 168
Table 5-68 Smart Battery Description Table (SBST) Format.............................................. 169
Table 5-69 Embedded Controller Boot Resources Table Format ....................................... 170
Table 5-70 Static Resource Affinity Table Format .............................................................. 172
Table 5-71 Processor Local APIC/SAPIC Affinity Structure ............................................... 173
Table 5-72 Flags – Processor Local APIC/SAPIC Affinity Structure................................... 173
Table 5-73 Memory Affinity Structure ................................................................................. 173
Table 5-74 Flags – Memory Affinity Structure..................................................................... 174
Table 5-75 Processor Local x2APIC Affinity Structure ....................................................... 174
Table 5-76 GICC Affinity Structure ................................................ 175
Table 5-77 Flags – GICC Affinity Structure......................................... 175
Table 5-78 Architecture Specific Affinity Structure.............................................................. 176
Table 5-79 SLIT Format...................................................................................................... 177
Table 5-80 Corrected Platform Error Polling Table Format ................................................ 178
Table 5-81 Corrected Platform Error Polling Processor Structure ...................................... 178
Table 5-82 Maximum System Characteristics Table (MSCT) Format................................. 179
Table 5-83 Maximum Proximity Domain Information Structure ......................................... 180
Table 5-84 RASF Table format ........................................................................................... 180
Table 5-85 RASF Platform Communication Channel Shared Memory Region .................. 181
Table 5-86 PCC Command Codes used by RASF Platform Communication Channel ..... 182
Table 5-87 Platform RAS Capabilities Bitmap .................................................................... 183
Table 5-88 Parameter Block Structure for PATROL_SCRUB ............................................ 183
Table 5-89 MPST Table Structure ...................................................................................... 187
Table 5-90 PCC Command Codes used by MPST Platform Communication Channel ..... 188
Table 5-91 MPST Platform Communication Channel Shared Memory Region .................. 188
Table 5-92 Power state Values .......................................................................................... 190
Table 5-93 Command Status ............................................................................................. 191
Table 5-94 Memory Power Node Structure definition ......................................................... 192
Table 5-95 Flag format........................................................................................................ 193
Table 5-96 Memory Power State Structure definition ......................................................... 194
Table 5-97 Memory Power State Characteristics Structure ............................................... 194
Table 5-98 Flag format of Memory Power State Characteristics Structure ........................ 195
Table 5-99 Platform Memory Topology Table..................................................................... 198
Table 5-100 Common Memory Aggregator Device Structure ............................................. 198
Table 5-101 Socket Structure ............................................................................................. 199
Table 5-102 Memory Controller Structure........................................................................... 200
Table 5-103 Physical Components Identifier Structure ..................................................... 201
Table 5-104 Boot Graphics Resource Table Fields ............................................................ 202
Table 5-105 Status Description Field.................................................................................. 203
Table 5-106 Image Type Description Field ......................................................................... 203
Table 5-107 Firmware Performance Data Table (FPDT) Format ....................................... 204
Table 5-108 Performance Record Structure ...................................................................... 205
Table 5-109 Performance Record Types ............................................................................ 205
Table 5-110 Runtime Performance Record Types ............................................................. 206
Table 5-111 S3 Performance Table Pointer Record .......................................................... 207
Table 5-112 S4 Performance Table Pointer Record .......................................................... 207
Table 5-113 S3 Performance Table Header ...................................................................... 208
Table 5-114 Basic S3 Resume Performance Record ........................................................ 208
Table 5-115 Basic S3 Suspend Performance Record ....................................................... 208
Table 5-116 Firmware Basic Boot Performance Table Header ......................................... 209
Table 5-117 Firmware Basic Boot Performance Data Record Structure ........................... 209
Table 5-118 GTDT Table Structure .................................................................................... 210
Table 5-119 Flag Definitions: Secure EL1 Timer, Non-Secure EL1 Timer, EL2 Timers, and
Virtual Timer............................................................................................................... 211
Table 5-120 Platform Timer Type Structures ...................................................................... 212
Table 5-121 GT Block Structure Format ............................................................................. 212
Table 5-122 GT Block Timer Structure Format ................................................................... 213
Table 5-123 Flag Definitions: GT Block Physical Timers and Virtual timers ....................... 213
Table 5-124 Flag Definitions: Common Flags..................................................................... 214
Table 5-125 SBSA Generic Watchdog Structure Format ................................................... 214
Table 5-126 Flag Definitions: SBSA Generic Watchdog Timer .......................................... 215
Table 5-127 NVDIMM Firmware Interface Table (NFIT) ..................................................... 216
Table 5-128 NFIT Structure Types ..................................................................................... 217
Table 5-129 SPA Range Structure ..................................................................................... 218
Table 5-130 NVDIMM Region Mapping Structure ............................................................. 219
Table 5-131 Interleave Structure Index and Interleave Ways definition ............................. 223
Table 5-132 Interleave Structure ........................................................................................ 223
Table 5-133 SMBIOS Management Information Structure ................................................. 224
Table 5-134 NVDIMM Control Region Structure Mark........................................................ 224
Table 5-135 NVDIMM Block Data Windows Region Structure ........................................... 228
Table 5-136 Flush Hint Address Structure.......................................................................... 229
Table 15-367 Extended Attributes for Address Range Descriptor Structure ...................... 766
Table 15-368 UEFI Memory Types and mapping to ACPI address range types ................ 767
Table 15-369 Sample Memory Map.................................................................................... 769
Table 18-370 Boot Error Record Table (BERT) Table ........................................................ 795
Table 18-371 Hardware Error Source Table (HEST) .......................................................... 796
Table 18-372 IA-32 Architecture Machine Check Exception Structure ............................... 797
Table 18-373 IA-32 Architecture Machine Check Error Bank Structure ............................. 798
Table 18-374 IA-32 Architecture Corrected Machine Check Structure ............................... 799
Table 18-375 IA-32 Architecture NMI Error Structure ......................................................... 800
Table 18-376 PCI Express Root Port AER Structure.......................................................... 800
Table 18-377 PCI Express Device AER Structure .............................................................. 801
Table 18-378 PCI Express Bridge AER Structure .............................................................. 802
Table 18-379 Generic Hardware Error Source Structure.................................................... 804
Table 18-380 Generic Error Status Block ........................................................................... 805
Table 18-381 Generic Error Data Entry .............................................................................. 806
Table 18-382 Generic Hardware Error Source version 2 (GHESv2) Structure.................. 809
Table 18-383 Hardware Error Notification Structure........................................................... 810
Table 18-384 Architecture Deferred Machine Check Structure .......................................... 812
Table 18-385 Error Record Serialization Table (ERST)...................................................... 814
Table 18-386 Error Record Serialization Actions ................................................................ 815
Table 18-387 Command Status Definition .......................................................................... 817
Table 18-388 Serialization Instruction Entry ....................................................................... 817
Table 18-389 Serialization Instructions ............................................................................... 818
Table 18-390 Instruction Flags ........................................................................................... 819
Table 18-391 Error Record Serialization Info...................................................................... 820
Table 18-392 Error Injection Table (EINJ) .......................................................................... 825
Table 18-393 Error Injection Actions................................................................................... 826
Table 18-394 Injection Instruction Entry ............................................................................. 828
Table 18-395 Instruction Flags ........................................................................................... 828
Table 18-396 Injection Instructions ..................................................................................... 829
Table 18-397 Command Status Definition .......................................................................... 829
Table 18-398 Error Type Definition..................................................................................... 829
Table 18-399 SET_ERROR_TYPE_WITH_ADDRESS Data Structure.............................. 830
Table 18-400 Vendor Error Type Extension Structure........................................................ 830
Table 18-401 Trigger Error Action ...................................................................................... 831
Table 19-402 ASL Grammar Notation ................................................................................ 837
Table 19-403 Named Object Reference Encodings ........................................................... 871
Table 19-404 Definition Block Name Modifier Encodings ................................................... 871
Table 19-405 ASL Escape Sequences ............................................................................... 873
Table 19-406 Summary of ASL Data Types ....................................................................... 876
Table 19-407 Data Types and Type Conversions .............................................................. 880
Table 19-408 Object Conversion Rules .............................................................................. 881
Table 19-409 Object Storing and Copying Rules................................................................ 884
Table 19-410 Reading from ArgX Objects .......................................................................... 884
Table 19-411 Writing to ArgX Objects ................................................................................ 885
Table 19-412 Reading from LocalX Objects ....................................................................... 885
Table 19-413 Writing to LocalX Objects ............................................................................. 886
Figures
Overview
This chapter provides a high-level overview of the Advanced Configuration and Power Interface
(ACPI). To make it easier to understand ACPI, this section focuses on broad and general statements
about ACPI and does not discuss every possible exception or detail about ACPI. The rest of the
ACPI specification provides much greater detail about the inner workings of ACPI than is discussed
here, and is recommended reading for developers using ACPI.
History of ACPI
ACPI was developed through collaboration between Intel, Microsoft*, Toshiba*, HP*, and
Phoenix* in the mid-1990s. Before the development of ACPI, operating systems (OS) primarily
used BIOS (Basic Input/Output System) interfaces for power management and device discovery and
configuration. This power management approach used the OS’s ability to call the system BIOS
natively for power management. The BIOS was also used to discover system devices and load
drivers based on probing input/output (I/O) and attempting to match the correct driver to the correct
device (plug and play). The location of devices could also be hard coded within the BIOS because
the platform itself was non-enumerable.
These solutions were problematic in three key ways. First, the behavior of OS applications could be
negatively affected by the BIOS-configured power management settings, causing systems to go to
sleep during presentations or other inconvenient times. Second, the power management interface
was proprietary on each system. This required developers to learn how to configure power
management for each individual system. Finally, the default settings for various devices could also
conflict with each other, causing devices to crash, behave erratically, or become undiscoverable.
ACPI was developed to solve these problems and others.
What is ACPI?
ACPI can first be understood as an architecture-independent power management and configuration
framework that forms a subsystem within the host OS. This framework establishes a hardware
register set to define power states (sleep, hibernate, wake, etc). The hardware register set can
accommodate operations on dedicated hardware and general purpose hardware.
The primary intention of the standard ACPI framework and the hardware register set is to enable
power management and system configuration without directly calling firmware natively from the
OS. ACPI serves as an interface layer between the system firmware (BIOS) and the OS, as shown in
Figure 0-1 and Figure 0-2, with certain restrictions and rules.
Fundamentally, ACPI defines two types of data structures that are shared between the system
firmware and the OS: data tables and definition blocks. These data structures are the primary
communication mechanism between the firmware and the OS. Data tables store raw data and are
consumed by device drivers. Definition blocks consist of byte code that is executable by an
interpreter.
This definition block byte code is compiled from the ACPI Source Language (ASL) code. ASL is
the language used to define ACPI objects and to write control methods. An ASL compiler translates
ASL into ACPI Machine Language (AML) byte code. AML is the language processed by the AML
interpreter, as shown in Figure 0-3.
The AML interpreter executes byte code and evaluates objects in the definition blocks to allow the
byte code to perform loop constructs, conditional evaluations, access defined address spaces, and
perform other operations that applications require. The AML interpreter has read/write access to
defined address spaces, including system memory, I/O, PCI configuration, and more. It accesses
these address spaces by defining entry points called objects. Objects can either have a directly
defined value or else must be evaluated and interpreted by the AML interpreter.
This collection of enumerable objects is an OS construct called the ACPI namespace. The
namespace is a hierarchical representation of the ACPI devices on a system. The system bus is the
root of enumeration for these ACPI devices. Devices that are enumerable on other buses, like PCI or
USB devices, are usually not enumerated in the namespace. Instead, their own buses enumerate the
devices and load their drivers. However, all enumerable buses have an encoding technique that
allows ACPI to encode the bus-specific addresses of the devices so they can be found in ACPI, even
though ACPI usually does not load drivers for these devices.
Generally, devices that have a _HID object (hardware identification object) are enumerated and
have their drivers loaded by ACPI. Devices that have an _ADR object (physical address object) are
usually not enumerated by ACPI and generally do not have their drivers loaded by ACPI. _ADR
devices usually can perform all necessary functions without involving ACPI, but in cases where the
device driver cannot perform a function, or if the driver needs to communicate to system firmware,
ACPI can evaluate objects to perform the needed function.
As an example of this, PCI does not support native hotplug. However, PCI can use ACPI to evaluate
objects and define methods that allow ACPI to fill in the functions necessary to perform hotplug on
PCI.
An additional aspect of ACPI is a runtime model that handles any ACPI interrupt events that occur
during system operation. ACPI continues to evaluate objects as necessary to handle these events.
This interrupt-based runtime model is discussed in greater detail in the Runtime model section
below.
ACPI Initialization
The best way to understand how ACPI works is chronologically. The moment the user powers up the
system, the system firmware completes its setup, initialization, and self tests.
The system firmware then uses information obtained during firmware initialization to update the
ACPI tables as necessary with various platform configurations and power interface data, before
passing control to the bootstrap loader. The extended root system description table (XSDT) is the
first table used by the ACPI subsystem and contains the addresses of most of the other ACPI tables
on the system. The XSDT points to the fixed ACPI description table (FADT) as well as other major
tables that the OS processes during initialization. After the OS initializes, the FADT directs the
ACPI subsystem to the differentiated system description table (DSDT), which is the beginning of the
namespace because it is the first table that contains a definition block.
The ACPI subsystem then processes the DSDT and begins building the namespace from the ACPI
definition blocks. The XSDT also points to the secondary system description tables (SSDTs) and
adds them to the namespace. The ACPI data tables give the OS raw data about the system hardware.
After the OS has built the namespace from the ACPI tables, it begins traversing the namespace and
loading device drivers for all the _HID devices it encounters in the namespace.
Runtime Model
After the system is up and running, ACPI works with the OS to handle any ACPI events that occur
via an interrupt. This interrupt invokes ACPI events in one of two general ways: fixed events and
general purpose events (GPEs).
Fixed events are ACPI events that have a predefined meaning in the ACPI specification. These fixed
events include actions like pressing the power button or ACPI timer overflows. These events are
handled directly by the OS handlers.
GPEs are ACPI events that are not predefined by the ACPI specification. These events are usually
handled by evaluating control methods, which are objects in the namespace and can access system
hardware. When the ACPI subsystem evaluates the control method with the AML interpreter, the
GPE object handles the events according to the OS’s implementation. Typically this might involve
issuing a notification to a device to invoke the device driver to perform a function.
We discuss a generic example of this runtime model in the next section.
The ACPI thermal zone includes control methods to read the current system temperature and trip
points.
When the OS initially finds a thermal zone in the namespace, it loads the thermal zone driver, which
evaluates the thermal zone to obtain the current temperature and trip points.
When a system component heats up enough to trigger a trip point, a thermal zone GPE occurs.
The GPE causes an interrupt to occur. When the ACPI subsystem receives the interrupt, it first
checks whether any fixed events have occurred. In this example, the thermal zone event is a GPE, so
no fixed event has occurred.
The ACPI subsystem then searches the namespace for the control method that matches the GPE
number of the interrupt. Upon finding it, the ACPI subsystem evaluates the control method, which
might then access hardware and/or notify the thermal zone handler.
The operating system’s thermal zone handler then takes whatever actions are necessary to handle the
event, including possibly accessing hardware.
ACPI is a very robust interface implementation. The thermal zone trip point could notify the system
to turn on a fan, reduce a device’s performance, read the temperature, shut down the system, or any
combination of these and other actions depending on the need.
This runtime model is used throughout the system to manage all of the ACPI events that occur
during system operation.
Summary
ACPI can best be described as a framework of concepts and interfaces that are implemented to form
a subsystem within the host OS. The ACPI tables, handlers, interpreter, namespace, events, and
interrupt model together form this implementation of ACPI, creating the ACPI subsystem within the
host OS. In this sense, ACPI is the interface between the system hardware/firmware and the OS and
OS applications for configuration and power management. This gives various OS a standardized
way to support power management and configuration via the ACPI namespace.
The ACPI namespace is the enumerable, hierarchical representation of all ACPI devices on the
system and is used to both find and load drivers for ACPI devices on the system. The namespace can
be dynamic by evaluating objects and sending interrupts in real time, all without the need for the OS
to call native system firmware code. This enables device manufacturers to code their own
instructions and events into devices. It also reduces incompatibility and instability by implementing
a standardized power management interface.
1 Introduction
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).
wake and answer the telephone in 1 second.” Then, when the user presses the “off” button,
the system would pick the deepest sleep state consistent with the needs of the phone
answering service.
• Platform firmware has become very complex to deal with power management. It is difficult to
make work with an OS and is limited to static configurations of the hardware.
• There is much less state information for the platform firmware to retain and manage
(because the OS manages it).
• Power management algorithms are unified in the OS, yielding much better integration
between the OS and the hardware.
• Because additional ACPI tables (Definition Blocks) can be loaded, for example, when a
mobile system docks, the OS can deal with dynamic machine configurations.
• Because the platform firmware has fewer functions and they are simpler, it is much easier
(and therefore cheaper) to implement and support.
• The existing structure of the PC platform constrains OS and hardware designs.
• Because ACPI is abstract, the OS can evolve separately from the hardware and, likewise, the
hardware from the OS.
• ACPI is by nature more portable across operating systems and processors. ACPI control
methods allow for very flexible implementations of particular features.
• An OEM can develop a driver and hardware that are not ACPI-compatible. This strategy opens
up even more hardware implementation possibilities. However, OEMs who implement hardware
that is OSPM-compatible but not ACPI-compatible will bear the cost of developing, testing, and
distributing drivers for their implementation.
the pseudo-code language and stored in the ACPI tables containing “Definition
Blocks.” The pseudo-code language, known as ACPI Machine Language (AML), is a
compact, tokenized, abstract type of machine language.
ACPI Registers.
The constrained part of the hardware interface, described (at least in location) by the
ACPI System Description Tables.
ACPI Platform Firmware.
Refers to the portion of the firmware that is compatible with the ACPI specifications.
Typically, this is the code that boots the machine (as legacy BIOSs have done) and
implements interfaces for sleep, wake, and some restart operations. It is called rarely,
compared to a legacy BIOS. The ACPI Description Tables are also provided by the
ACPI Platform Firmware.
Note: Where definitions or relational requirements of interfaces are localized to a specific section, the
section number is provided. The interface definitions and relational requirements of the interfaces
specified below are generally spread throughout the ACPI specification. The ACPI specification
defines:
ACPI-defined Generic Register Interfaces and object definitions in the ACPI Namespace (Section 4.2, Section 5.6.5):
General-purpose event processing
Motherboard device identification, configuration, and insertion/removal (Section 6)
Thermal zones (Section 11)
Power resource control (Section 7.1)
Device power state control (Section 7.2)
System power state control (Section 7.3)
System indicators (Section 9.1)
Devices and device controls (Section 9):
Processor (Section 8)
Control Method Battery (Section 10)
Smart Battery Subsystem (Section 10)
Mobile Lid
Power or sleep button with S5 override (also possible in fixed space)
Embedded controller (Section 12)
Fan
Generic Bus Bridge
ATA Controller
Floppy Controller
GPE Block
Module
Memory
Global Lock related interfaces
Note: This example is provided as a guideline for how ACPI terminology can be used. It should not be
interpreted as a statement of ACPI requirements.
Platforms compliant with this platform design guide must implement the following ACPI defined system features,
concepts, and interfaces, along with their associated event models:
System address map reporting interfaces
· ACPI-defined Generic Register Interfaces and object definitions in the ACPI Namespace:
General-purpose event processing
Motherboard device identification, configuration, and insertion/removal (Section 6)
System power state control ( Section 7.3)
Devices and device controls:
Processor
Control Method Battery (or Smart Battery Subsystem on a mobile system)
Smart Battery Subsystem (or Control Method Battery on a mobile system)
Power or sleep button with S5 override (may also be implemented in fixed register space)
Global Lock related interfaces when a logical register in the hardware is shared between OS and firm-
ware environments
· ACPI Event programming model (Section 5.6)
· ACPI-defined Platform Firmware Responsibilities (Section 15)
· ACPI-defined State Definitions:
System sleeping states (At least one system sleeping state, S1-S4, must be implemented)
Device power states (D-states must be implemented in accordance with device class specifications)
Processor power states (All processors must support the C1 Power State)
The following provides an example of how a design guide for systems that execute multiple OS
instances, whose goal is to require robust configuration and continuous availability for the system
class, could use the recommended terminology to define ACPI related requirements.
Note: This example is provided as a guideline for how ACPI terminology can be used. It should not be
interpreted as a statement of ACPI requirements.
Platforms compliant with this platform design guide must implement the following ACPI defined system features and
interfaces, along with their associated event models:
System address map reporting interfaces
ACPI System Description Tables provided in the system firmware
ACPI-defined Fixed Registers Interfaces:
· ACPI-defined Generic Register Interfaces and object definitions in the ACPI Namespace:
General-purpose event processing
Motherboard device identification, configuration, and insertion/removal (Section 6)
System power state control (Section 7.3)
System indicators
Devices and device controls:
Processor
Global Lock related interfaces when a logical register in the hardware is shared between OS and firm-
ware environments
· ACPI Event programming model ( Section 5.6)
· ACPI-defined Platform Firmware Responsibilities (Section 15)
· ACPI-defined State Definitions:
Processor power states (All processors must support the C1 Power State)
• Support the ACPI Event programming model including handling SCI interrupts, managing fixed
events, general-purpose events, embedded controller interrupts, and dynamic device support.
• Support acquisition and release of the Global Lock.
• Use the reset register to reset the system.
• Provide APIs to influence power management policy.
• Implement driver support for ACPI-defined devices.
• Implement APIs supporting the system indicators.
• Support all system states S1–S5.
1.7.3 OS Requirements
The following list describes the minimum requirements for an OSPM/ACPI-compatible OS:
• Use system address map reporting interfaces to get the system address map on Intel Architecture
(IA) platforms:
• INT 15H, E820H - Query System Address Map interface (see Section 15,“System Address
Map Interfaces”)
• EFI GetMemoryMap() Boot Services Function (see Section 15, “System Address Map
Interfaces”)
• Find and consume the ACPI System Description Tables (see Section 5, “ACPI Software
Programming Model”).
• Implementation of an AML interpreter supporting all defined AML grammar elements (see
Section 20, ACPI Machine Language Specification”).
• Support for the ACPI Event programming model including handling SCI interrupts, managing
fixed events, general-purpose events, embedded controller interrupts, and dynamic device
support.
• Enumerate and configure motherboard devices described in the ACPI Namespace.
• Implement support for the following ACPI devices defined within this specification:
• Embedded Controller Device (see Section 12, “ACPI Embedded Controller Interface
Specification”)
• GPE Block Device (see Section 9.11, “GPE Block Device”)
• Module Device (see Section 9.12, “Module Device”)
• Implementation of the ACPI thermal model (see Section 11, “Thermal Management”).
• Support acquisition and release of the Global Lock.
• OS-directed power management support (device drivers are responsible for maintaining device
context as described by the Device Power Management Class Specifications described in
Section A).
2 Definition of Terms
This specification uses a particular set of terminology, defined in this section. This section has three
parts:
General ACPI terms are defined and presented alphabetically.
The ACPI global system states (working, sleeping, soft off, and mechanical off) are defined. Global
system states apply to the entire system, and are visible to the user.
The ACPI device power states are defined. Device power states are states of particular devices; as
such, they are generally not visible to the user. For example, some devices may be in the off state
even though the system as a whole is in the working state. Device states apply to any device on any
bus.
instructions. Processor sleeping states, labeled C1 through C3, are also defined. In the
sleeping states, the processor executes no instructions, thus reducing power
consumption and, potentially, operating temperatures. The ACPI specification also
defines processor performance states, where the processor (while in C0) executes
instructions, but with lower performance and (potentially) lower power consumption
and operating temperature. For more information, see section 8, “Processor
Configuration and Control.”
A definition block contains information about hardware implementation and
configuration details in the form of data and control methods, encoded in AML. An
OEM can provide one or more definition blocks in the ACPI Tables. One definition
block must be provided: the Differentiated Definition Block, which describes the base
system. Upon loading the Differentiated Definition Block, the OS inserts the contents
of the Differentiated Definition Block into the ACPI Namespace. Other definition
blocks, which the OS can dynamically insert and remove from the active ACPI
Namespace, can contain references to the Differentiated Definition Block. For more
information, see section 5.2.11, “Definition Blocks.”
Device
A generic term used to refer to any computing, input/output or storage element, or any
collection of computing, input/output or storage elements, on a platform. An example
of a device is a CPU, APU, embedded controller (EC), BMC, Trusted Platform
Module (TPM), graphics processing unit (GPU), network interface controller (NIC),
hard disk drive (HDD), solid state drive (SSD), Read Only Memory (ROM), flash
ROM, or any of the large number of other possible devices. If at all possible, use a
more specific term.
Device Context
The variable data held by the device; it is usually volatile. The device might forget this
information when entering or leaving certain states (for more information, see section
2.3, “Device Power State Definitions.”), in which case the OS software is responsible
for saving and restoring the information. Device Context refers to small amounts of
information held in device peripherals. See System Context.
Device Firmware
Firmware that is only used by a specific device and cannot be used with any other
device. This firmware is typically provided by the device manufacturer.
Differentiated System Description Table (DSDT)
An OEM must supply a DSDT to an ACPI-compatible OS. The DSDT contains the
Differentiated Definition Block, which supplies the implementation and configuration
information about the base system. The OS always inserts the DSDT information into
the ACPI Namespace at system boot time and never removes it.
DIMM Physical Address (DPA)
An NVDIMM relative memory address.
Embedded Controller
The general class of microcontrollers used to support OEM-specific implementations,
mainly in mobile environments. The ACPI specification supports embedded
controllers in any platform design, as long as the microcontroller conforms to one of
the models described in this section. The embedded controller performs complex low-
level functions through a simple interface to the host microprocessor(s).
Embedded Controller Interface
A standard hardware and software communications interface between an OS driver
and an embedded controller. This allows any OS to provide a standard driver that can
directly communicate with an embedded controller in the system, thus allowing other
drivers within the system to communicate with and use the resources of system
embedded controllers (for example, Smart Battery and AML code). This in turn
enables the OEM to provide platform features that the OS and applications can use.
Expansion ROM Firmware
Peripheral Component Interconnect (PCI) term for firmware executed on a host
processor which is used by an add-in device during the boot process. This includes
Option ROM Firmware and UEFI drivers. Expansion ROM Firmware may be
embedded as part of the Host Processor Boot Firmware, or may be separate (e.g., from
an add-in card). See also: Option ROM Firmware
Firmware
Generic term to describe any BIOS or firmware on a platform; it refers to the general
class of things, not a specific type. Use a more specific term, if possible.
Firmware ACPI Control Structure (FACS)
A structure in read/write memory that the platform runtime firmware uses for
handshaking between the firmware and the OS. The FACS is passed to an ACPI-
compatible OS via the Fixed ACPI Description Table (FADT). The FACS contains
the system’s hardware signature at last boot, the firmware waking vector, and the
Global Lock.
Firmware Storage Device
A memory device used to store firmware. This could include Read Only Memory
(ROM), flash memory, eMMC, UFS drives, etc.
Fixed ACPI Description Table (FADT)
A table that contains the ACPI Hardware Register Block implementation and
configuration details that the OS needs to directly manage the ACPI Hardware
Register Blocks, as well as the physical address of the DSDT, which contains other
platform implementation and configuration details. An OEM must provide an FADT
to an ACPI-compatible OS in the RSDT/XSDT. The OS always inserts the namespace
information defined in the Differentiated Definition Block in the DSDT into the ACPI
Namespace at system boot time, and the OS never removes it.
Fixed Features
A set of features offered by an ACPI interface. The ACPI specification places
restrictions on where and how the hardware programming model is generated. All
fixed features, if used, are implemented as described in this specification so that
OSPM can directly access the fixed feature registers.
Fixed Feature Events
A set of events that occur at the ACPI interface when a paired set of status and event
bits in the fixed feature registers are set at the same time. When a fixed feature event
occurs, a system control interrupt (SCI is raised. For ACPI fixed feature events,
OSPM (or an ACPI-aware driver) acts as the event handler.
Fixed Feature Registers
A set of hardware registers in fixed feature register space at specific address locations
in system I/O address space. ACPI defines register blocks for fixed features (each
register block gets a separate pointer from the FADT). For more information, see
section 4.6, “ACPI Hardware Features.”
General-Purpose Event Registers
The general-purpose event registers contain the event programming model for generic
features. All general-purpose events generate SCIs.
Generic Feature
A generic feature of a platform is value-added hardware implemented through control
methods and general-purpose events.
Generic Interrupt Controller (GIC)
An interrupt controller architecture for ARM processor-based systems.
Global System Status
Global system states apply to the entire system, and are visible to the user. The various
global system states are labeled G0 through G3 in the ACPI specification. For more
information, see Section 2.2, “Global System State Definitions.”
Host Processor
A host processor is the primary processing unit in a platform, traditionally called a
Central Processing Unit (CPU), now also sometimes referred to as an Application
Processing Unit (APU), or a System on Chip (SoC). This is the processing unit on
which the primary operating system (and/or hypervisor), as well as user applications
run. This is the processor that is responsible for loading and executing the Host
Processor Boot Firmware. This term and "Boot Processor" should be considered
synonyms for this particular text clean-up effort (i.e., making them consistent should
probably be part of a different ECR, if needed).
Host Processor Boot Firmware
Generic term used to describe firmware loaded and executed by the Host Processor
which provides basic boot capabilities for a platform. This class of firmware is a
reference to Legacy BIOS and UEFI, which were sometimes referred to as System
BIOS. Where the distinction between Legacy BIOS and UEFI is not important, the
term Host Processor Boot Firmware will be used. Where the distinction is important,
it will be referenced appropriately. Expansion ROM firmware may also be considered
as part of the Host Processor Boot Firmware. Expansion ROM Firmware may be
embedded as part of the Host Processor Boot Firmware, or may be separate from the
Host Processor Boot Firmware (e.g., loaded from an add-in card).
Host Processor Runtime Firmware
Host processor runtime firmware is any runtime firmware which executes on the host
processor.
Ignored Bits
Some unused bits in ACPI hardware registers are designated as “ignored” in the ACPI
specification. Ignored bits are undefined and can return zero or one (in contrast to
reserved bits, which always return zero). Software ignores ignored bits in ACPI
hardware registers on reads and preserves ignored bits on writes.
Intel Architecture-Personal Computer (IA-PC)
A general descriptive term for computers built with processors conforming to the
architecture defined by the Intel processor family based on the Intel Architecture
instruction set and having an industry-standard PC architecture.
I/O APIC
An Input/Output Advanced Programmable Interrupt Controller routes interrupts from
devices to the processor’s local APIC.
I/O SAPIC
An Input/Output Streamlined Advanced Programmable Interrupt Controller routes
interrupts from devices to the processor’s local APIC.
Label Storage Area
A persistent storage area reserved for Label storage.
Legacy
A computer state where power management policy decisions are made by the platform
hardware/firmware shipped with the system. The legacy power management features
found in today’s systems are used to support power management in a system that uses
a legacy OS that does not support the OS-directed power management architecture.
Legacy BIOS
One form of Host Processor Boot Firmware used on x86 platforms which uses a
legacy x86 BIOS structure. This form of host processor boot firmware has been or is
being replaced by UEFI. This term will likely be most useful in distinguishing and
comparing older forms of firmware to newer forms (e.g., "it was done this way in
legacy BIOS, but is now done another way in UEFI). See also: BIOS, System BIOS
Legacy Hardware
A computer system that has no ACPI or OSPM power management support.
Legacy OS
An OS that is not aware of and does not direct the power management functions of the
system. Included in this category are operating systems with APM 1.x support.
Local APIC
A local Advanced Programmable Interrupt Controller receives interrupts from the I/O
APIC.
Local SAPIC
A local Streamlined Advanced Programmable Interrupt Controller receives interrupts
from the I/O SAPIC.
Management Firmware
Firmware used only by a Baseboard Management Controller (BMC) or other Out-of-
Band (OOB) management controller.
Multiple APIC Description Table (MADT)
The Multiple APIC Description Table (MADT) is used on systems supporting the
APIC and SAPIC to describe the APIC implementation. Following the MADT is a list
of APIC/SAPIC structures that declare the APIC/SAPIC features of the machine.
Namespace
A namespace defines a contiguously-addressed range of Non-Volatile Memory,
conceptually similar to a SCSI Logical Unit (LUN) or an NVM Express namespace.
A namespace can be described by one or more Labels.
Non-Host Processor
A non-host processor is a generic term used to describe any processing unit on a
platform which is not a host processor (e.g. a microcontroller, co-processor, etc). For
the purposes of this particular ECR, this should also be considered a synonym for
"secondary processor", those CPUs that might be on an SoC, for example, that are not
the host (or "boot") processor.
NVDIMM
Non Volatile Dual In-line Memory Module.
Object
The nodes of the ACPI Namespace are objects inserted in the tree by the OS using the
information in the system definition tables. These objects can be data objects, package
objects, control method objects, and so on. Package objects refer to other objects.
Objects also have type, size, and relative name.
Object name
Part of the ACPI Namespace. There is a set of rules for naming objects.
Operating System-directed Power Management (OSPM)
A model of power (and system) management in which the OS plays a central role and
uses global information to optimize system behavior for the task at hand.
Power Management
Mechanisms in software and hardware to minimize system power consumption,
manage system thermal limits, and maximize system battery life. Power management
involves trade-offs among system speed, noise, battery life, processing speed, and
alternating current (AC) power consumption. Power management is required for some
system functions, such as appliance (for example, answering machine, furnace
control) operations.
Power Resources
Resources (for example, power planes and clock sources) that a device requires to
operate in a given power state.
Power Sources
The battery (including a UPS battery) and AC line powered adapters or power
supplies that supply power to a platform.
Register Grouping
Consists of two register blocks (it has two pointers to two different blocks of
registers). The fixed-position bits within a register grouping can be split between the
two register blocks. This allows the bits within a register grouping to be split between
two chips.
Reserved Bits
Some unused bits in ACPI hardware registers are designated as “Reserved” in the
ACPI specification. For future extensibility, hardware-register reserved bits always
return zero, and data writes to them have no side effects. OSPM implementations must
write zeros to all reserved bits in enable and status registers and preserve bits in
control registers.
Root System Description Pointer (RSDP)
An ACPI-compatible system must provide an RSDP in the system’s low address
space. This structure’s only purpose is to provide the physical address of the RSDT
and XSDT.
Root System Description Table (RSDT)
A table with the signature ‘RSDT,’ followed by an array of physical pointers to other
system description tables. The OS locates that RSDT by following the pointer in the
RSDP structure.
Runtime Firmware
Generic term to describe any firmware on a platform used during runtime (i.e., after
the boot process has completed). Use a more specific term, if possible.
Secondary System Description Table (SSDT)
SSDTs are a continuation of the DSDT. Multiple SSDTs can be used as part of a
platform description. After the DSDT is loaded into the ACPI Namespace, each
secondary description table listed in the RSDT/XSDT with a unique OEM Table ID is
loaded. This allows the OEM to provide the base support in one table, while adding
smaller system options in other tables.
System Physical Address (SPA)
The platform physical address assigned and programmed by the platform and utilized
by the OS.
Sleep Button
A user push button that switches the system from the sleeping/soft off state to the
working state, and signals the OS to transition to a sleeping state from the working
state.
Smart Battery Subsystem
A battery subsystem that conforms to the following specifications: Smart Battery and
either Smart Battery System Manager or Smart Battery Charger and Selector—and the
additional ACPI requirements.
Smart Battery Table
An ACPI table used on platforms that have a Smart Battery subsystem. This table
indicates the energy-level trip points that the platform requires for placing the system
into different sleeping states and suggested energy levels for warning the user to
SMBus Interface
A standard hardware and software communications interface between an OS bus
driver and an SMBus controller.
Software
Software is comprised of elements required to load the operating system and all user
applications and user data subsequently handled by the operating system.
Streamlined Advanced Programmable Interrupt Controller (SAPIC)
An advanced APIC commonly found on Intel ItaniumTM Processor Family-based 64-
bit systems.
transition the platform into a sleeping state.
System
A system is the entirety of a computing entity, including all elements in a platform
(hardware, firmware) and software (operating system, user applications, user data). A
system can be thought of both as a logical construct (e.g. a software stack) or physical
construct (e.g. a notebook, a desktop, a server, a network switch, etc).
System BIOS
A term sometimes used in industry to refer to either Legacy BIOS, or to UEFI Core
System BIOS, or both. Please use this term only when referring to Legacy BIOS. See
also: BIOS, Legacy BIOS.
System Context
The volatile data in the system that is not saved by a device driver.
configuration of the machine have not changed, and the user has not manually aborted
the restore. If all these conditions are met, as part of the OS restarting, it will reload
the system context and activate it. The net effect for the user is what looks like a
resume from a Sleeping (G1) state (albeit slower). The aspects of the machine
configuration that must not change include, but are not limited to, disk layout and
memory size. It might be possible for the user to swap a PC Card or a Device Bay
device, however.
Notice that for the machine to transition directly from the Soft Off or Sleeping states to S4, the
system context must be written to non-volatile storage by the hardware; entering the Working state
first so that the OS or platform runtime firmware can save the system context takes too long from the
user's point of view. The transition from Mechanical Off to S4 is likely to be done when the user is
not there to see it.
Because the S4 state relies only on non-volatile storage, a machine can save its system context for an
arbitrary period of time (on the order of many years).
Notice that the entries for G2/S5 and G3 in the Latency column of the above table are “Long.” This
implies that a platform designed to give the user the appearance of “instant-on,” similar to a home
appliance device, will use the G0 and G1 states almost exclusively (the G3 state may be used for
moving the machine or repairing it).
• Device driver--What the device driver must do to restore the device to full on.
• Restore time--How long it takes to restore the device to full on.
The device power states are defined below, although very generically. Many devices do not have all
four power states defined. Devices may be capable of several different low-power modes, but if
there is no user-perceptible difference between the modes, only the lowest power mode will be used.
The Device Class Power Management Specifications, included in Appendix A of this specification,
describe which of these power states are defined for a given type (class) of device and define the
specific details of each power state for that device class. For a list of the available Device Class
Power Management Specifications, see “Appendix A: Device Class Specifications.”
D3 (Off)
Power has been fully removed from the device. Also referred to as D3cold in this and
other specs. All device context is lost when this state is entered, so the OS software
will reinitialize the device when powering it back on. Since all device context and
power are lost, devices in this state do not decode their address lines, and cannot be
enumerated by software. Devices in this state have the longest restore times.
D3hot
The meaning of the D3hot State is defined by each device class. In general, D3hot is
expected to save as much power as possible without affecting PNP Enumeration.
Devices in D3hot must have enough power to remain enumerable by software. For
example, PCI Configuration space access and contents must operate as in shallower
power states. Similarly, ACPI identification and configuration objects must operate as
in shallower power states. Otherwise, no device functionality is supported, and Driver
software is required to restore any lost context, or reinitialize the device, during its
transition back to D0.
Devices in this state can have long restore times. All classes of devices define this
state.
Note: For devices that support both D3hot and D3 exposed to OSPM via _PR3, device software/drivers
must always assume OSPM will target D3and must assume all device context will be lost and the
device will no longer be enumerable.
D2
The meaning of the D2 Device State is defined by each device class. Many device
classes may not define D2. In general, D2 is expected to save more power and
preserve less device context than D1 or D0. Buses in D2 may cause the device to lose
some context (for example, by reducing power on the bus, thus forcing the device to
turn off some of its functions).
D1
The meaning of the D1 Device State is defined by each device class. Many device
classes may not define D1. In general, D1 is expected to save less power and preserve
more device context than D2.
D0 (Fully-On)
This state is assumed to be the highest level of power consumption. The device is
completely active and responsive, and is expected to remember all relevant context
continuously.
Transitions amongst these power states are restricted for simplicity. Power-down transitions (from
higher-power, or shallower, to lower-power, or deeper) are allowed between any two states.
However, power-up transitions (from deeper to shallower) are required to go through D0; i.e. Dy to
Dx<y is illegal for all x !=0.
Note: Devices often have different power modes within a given state. Devices can use these modes as
long as they can automatically transparently switch between these modes from the software,
without violating the rules for the current Dx state the device is in. Low-power modes that
adversely affect performance (in other words, low speed modes) or that are not transparent to
software cannot be done automatically in hardware; the device driver must issue commands to
use these modes.
S1 Sleeping State
The S1 sleeping state is a low wake latency sleeping state. In this state, no system
context is lost (CPU or chip set) and hardware maintains all system context.
S2 Sleeping State
The S2 sleeping state is a low wake latency sleeping state. This state is similar to the
S1 sleeping state except that the CPU and system cache context is lost (the OS is
responsible for maintaining the caches and CPU context). Control starts from the
processor’s reset vector after the wake event.
S3 Sleeping State
The S3 sleeping state is a low wake latency sleeping state where all system context is
lost except system memory. CPU, cache, and chip set context are lost in this state.
Hardware maintains memory context and restores some CPU and L2 configuration
context. Control starts from the processor’s reset vector after the wake event.
S4 Sleeping State
The S4 sleeping state is the lowest power, longest wake latency sleeping state
supported by ACPI. In order to reduce power to a minimum, it is assumed that the
hardware platform has powered off all devices. Platform context is maintained.
S5 Soft Off State
The S5 state is similar to the S4 state except that the OS does not save any context.
The system is in the “soft” off state and requires a complete boot when it wakes.
Software uses a different state value to distinguish between the S5 state and the S4
state to allow for initial boot operations within the platform boot firmware to
distinguish whether the boot is going to wake from a saved memory image.
used instead of the C2 state. Aside from putting the processor in a non-executing
power state, this state has no other software-visible effects.
C3 Processor Power State
The C3 state offers improved power savings over the C1 and C2 states. The worst-
case hardware latency for this state is provided via the ACPI system firmware and the
operating software can use this information to determine when the C2 state should be
used instead of the C3 state. While in the C3 state, the processor’s caches maintain
state but ignore any snoops. The operating software is responsible for ensuring that the
caches maintain coherency.
3 ACPI Concepts
Platforms compliant with the ACPI specification provide OSPM with direct and exclusive control
over the power management and motherboard device configuration functions of a computer. During
OS initialization, OSPM takes over these functions from legacy implementations such as the APM
BIOS, SMM-based firmware, legacy applications, and the PNPBIOS. Having done this, OSPM is
responsible for handling motherboard device configuration events as well as for controlling the
power, performance, and thermal status of the system based on user preference, application requests
and OS imposed Quality of Service (QOS) / usability goals. ACPI provides low-level interfaces that
allow OSPM to perform these functions. The functional areas covered by the ACPI specification are:
System power management
ACPI defines mechanisms for putting the computer as a whole in and out of system
sleeping states. It also provides a general mechanism for any device to wake the
computer.
Device power management
ACPI tables describe motherboard devices, their power states, the power planes the
devices are connected to, and controls for putting devices into different power states.
This enables the OS to put devices into low-power states based on application usage.
Processor power management
While the OS is idle but not sleeping, it will use commands described by ACPI to put
processors in low-power states.
Device and processor performance management
While the system is active, OSPM will transition devices and processors into different
performance states, defined by ACPI, to achieve a desirable balance between
performance and energy conservation goals as well as other environmental
requirements (for example, visibility and acoustics).
Configuration / Plug and Play
ACPI specifies information used to enumerate and configure motherboard devices.
This information is arranged hierarchically so when events such as docking and
undocking take place, the OS has precise, a priori knowledge of which devices are
affected by the event.
System Events
ACPI provides a general event mechanism that can be used for system events such as
thermal events, power management events, docking, device insertion and removal,
and so on. This mechanism is very flexible in that it does not define specifically how
events are routed to the core logic chip set.
Battery management
Battery management policy moves from the APM BIOS to the ACPI OS. An ACPI-
compatible battery device needs either a Smart Battery subsystem interface, which is
system vendors can provide guidance in this area). The second exception is the case where the
platform contains Active cooling devices but does not contain Passive cooling temperature trip
points or controls,. In this case, a hardware based Active cooling mechanism may be implemented
without impacting OSPM’s goals. Any platform that requires both active and passive cooling must
allow OSPM to manage the platform thermals via ACPI defined active and passive cooling
interfaces.
See Section 2.2, “Global System State Definitions,” for detailed definitions of these states.
In general use, computers alternate between the Working and Sleeping states. In the Working state,
the computer is used to do work. User-mode application threads are dispatched and running.
Individual devices can be in low-power (Dx) states and processors can be in low-power (Cx) states if
they are not being used. Any device the system turns off because it is not actively in use can be
turned on with short latency. (What “short” means depends on the device. An LCD display needs to
come on in sub-second times, while it is generally acceptable to wait a few seconds for a printer to
wake.)
The net effect of this is that the entire machine is functional in the Working state. Various Working
sub-states differ in speed of computation, power used, heat produced, and noise produced. Tuning
within the Working state is largely about trade-offs among speed, power, heat, and noise.
When the computer is idle or the user has pressed the power button, the OS will put the computer
into one of the sleeping (Sx) states. No user-visible computation occurs in a sleeping state. The
sleeping sub-states differ in what events can arouse the system to a Working state, and how long this
takes. When the machine must awaken to all possible events or do so very quickly, it can enter only
the sub-states that achieve a partial reduction of system power consumption. However, if the only
event of interest is a user pushing on a switch and a latency of minutes is allowed, the OS could save
all system context into an NVS file and transition the hardware into the S4 sleeping state. In this
state, the machine draws almost zero power and retains system context for an arbitrary period of
time (years or decades if needed).
The other states are used less often. Computers that support legacy BIOS power management
interfaces boot in the Legacy state and transition to the Working state when an ACPI OS loads. A
system without legacy support (for example, a RISC system) transitions directly from the
Mechanical Off state to the Working state. Users typically put computers into the Mechanical Off
state by flipping the computer’s mechanical switch or by unplugging the computer.
3.2.2.1Mobile PC
Mobile PCs will continue to have aggressive power management functionality. Going to OSPM/
ACPI will allow enhanced power savings techniques and more refined user policies.
Aspects of mobile PC power management in the ACPI specification are thermal management (see
Section 11, “Thermal Management”) and the embedded controller interface (see Section 12, “ACPI
Embedded Controller Interface Specification”).
Finally, ACPI defines information and behavior requirements that enable OSPM to
inform the Power Policy Owner about supported state and wake-up capabilities, and to
coordinate the actions of the various levels of device drivers in controlling power.
OSPM, in this role, is responsible for ensuring that device power management is
coordinated with System Power Management such as entering sleep states (S1-S4) or
Low-power Idle states (LPI). Integrated with device power state policy and control,
wake-up policy and control are also coordinated by OSPM. Power Policy Owners,
which decide when the device might be needed to wake the system, ensure that only
device power states that the device can wake from are selected when the platform
enters a Sleep or LPI state. Enabling of wake-up hardware is also performed at the
device, bus and platform levels and coordinated by OSPM. OSPM ensures further that
the Sleep or LPI state selected for the system is compatible with the device state and
wake-up capabilities of all the devices currently enabled for wake.
More specifically, power management specifications for each class of device (for example, modem,
network adapter, hard disk, and so on) more precisely define the power states and power policy for
the class. See Section 2.3, “Device Power State Definitions,” for the detailed description of the
general device power states (D0-D3).
Note: Other buses enumerate some devices on the main board. For example, PCI devices are reported
through the standard PCI enumeration mechanisms. Power management of these devices is
handled through their own bus specification (in this case, PCI). All other devices on the main board
are handled through ACPI. Specifically, the ACPI table lists legacy devices that cannot be reported
through their own bus specification, the root of each bus in the system, and devices that have
additional power management or configuration options not covered by their own bus specification.
For more detailed information see Section 7, “Power and Performance Management.”
Note: The device does not need to have power to do this. The OS must turn on power to the device
before it can send commands to the device.
OSPM also uses the Set Power State operation to enable power management features such as wake
(described in Section 7, “Power and Performance Management.”).
For power-down operations (transitions from Dx to some deeper Dy), OSPM first evaluates the
appropriate control method for the target state (_PSx), then turns-off any unused power resources.
Notice that this might not mean that power is actually removed from the device. If other active
devices are sharing a power resource, the power resource will remain on. In the power-up case
(transitions from some Dx back to the shallower D0), the power resources required for D0 are first
turned on, and then the control method (_PS0) is evaluated.
Devices use the ACPI event model to signal power status changes (for example, battery status
changes) to OSPM. The platform signals events to the OS via an interrupt, either SCI, or GPIO. An
interrupt status bit is set to indicate the event to the OS. The OS runs the control method associated
with the event. This control method signals to the OS which device has changed.
ACPI supports two types of batteries: batteries that report only basic battery status information and
batteries that support the Smart Battery System Implementers Forum Smart Battery Specification.
For batteries that report only basic battery status information (such as total capacity and remaining
capacity), the OS uses control methods from the battery’s description table to read this information.
To read status information for Smart Batteries, the OS can use a standard Smart Battery driver that
directly interfaces to Smart Batteries through the appropriate bus enumerator.
Note: Besides using ACPI mechanism to enable a particular device to wake the system, an ACPI
platform must also be able to record and report the wake source to OSPM. When a system is
woken from certain states (such as the S4 state), it may start out in non-ACPI mode. In this case,
the SCI status bit may be cleared when ACPI mode is re-entered. However the platform must still
attempt to record the wake source for retrieval by OSPM at a later point.
Note: Although the above description explains how a device can wake the system, note that a device
can also be put into a low power state during the S0 system state, and that this device may
generate a wake signal in the S0 state as the following example illustrates.
a modem are defined as follows (this is an excerpt from the Modem Device Class Power
Management Specification):
D0
Modem controller on
Phone interface on
Speaker on
Can be on hook or off hook
Can be waiting for answer
D1
Modem controller in low-power mode (context retained by device)
Phone interface powered by phone line or in low-power mode
Speaker off
Must be on hook
D2
Same as D3
D3
Modem controller off (context lost)
Phone interface powered by phone line or off
Speaker off
On hook
The power policy for the modem is defined as follows:
D3 D0
COM port opened
D0, D1 D3
COM port closed
D0 D1
Modem put in answer mode
D1 D0
Application requests dial or the phone rings while the modem is in answer mode
The wake policy for the modem is very simple: When the phone rings and wake is enabled, wake the
system.
Based on that policy, the modem and the COM port to which it is attached can be implemented in
hardware as shown in Figure 3-2. This is just an example for illustrating features of ACPI. This
example is not intended to describe how OEMs should build hardware.
PWR1 PWR2
Switched
Switched
power
power
PWR1_EN
PWR2_EN
MDM_D3
MDM_D1
COM_D3
WAKE
Note: Although not shown above, each discrete part has some isolation logic so that the part is isolated
when power is removed from it. Isolation logic controls are implemented as power resources in the
ACPI Differentiated Description Block so that devices are isolated as power planes are sequenced
off.
PWR2 is no longer needed. Then it checks to make sure no other device in the system requires the
use of the PWR2 power resource. If the resource is no longer needed, the OSPM uses the _OFF
control method associated with that power resource in the Differentiated Definition Block to turn off
the PWR2 power plane. This control method sends the appropriate commands to the core chip set to
stop asserting the PWR2_EN line.
OSPM does not always turn off power resources when a given device is put in a lower power state.
For example, assume that the PWR1 power plane also powers an active line printer (LPT) port.
Suppose the user terminates the modem application, causing the COM port to be closed, and
therefore causing the modem to be shut off (state D3). As always, OSPM begins the state transition
process by running the modem's control method to switch the device to the D3 power state. The
control method causes the MDM_D3 line to be asserted. Notice that these registers might not be in
the device itself. For example, the control method could read the register that controls
MDM_D3.The modem controller now turns off all its major functions so that it draws little power, if
any, from the PWR1 line. OSPM continues by checking to see which power resources are no longer
needed. Because the LPT port is still active, PWR1 is in use. OSPM does not turn off the PWR1
resource. Because the COM port is closed, the same sequence of events take place to put it in the D3
state, but the power resource is not turned off due to the LPT dependency.
The OS determines how much time is being spent in its idle loop by reading the ACPI Power
Management Timer. This timer runs at a known, fixed frequency and allows the OS to precisely
determine idle time. Depending on this idle time estimate, the OS will put the CPU into different
quality low-power states (which vary in power and latency) when it enters its idle loop.
The CPU states are defined in detail in Section 8, “Processor Configuration and Control.”
Note: When preparing to boot a system, the platform boot firmware only needs to configure boot
devices. This includes boot devices described in the ACPI system description tables as well as
devices that are controlled through other standards.
Since the event model registers are generalized, they can describe many different platform
implementations. The single pin model above is just one example. Another design might have Plug
and Play, Thermal, and Power Management events wired to three different pins so there would be
three status bits (and three enable bits). Yet another design might have every individual event wired
to its own pin and status bit. This design, at the opposite extreme from the single pin design, allows
very complex hardware, yet very simple control methods. Countless variations in wiring up events
are possible. However, note that care must be taken to ensure that if events share a signal that the
event that generated the signal can be determined in the corresponding event handling control
method allowing the proper device notification to be sent.
Designed capacity
Last full charged capacity
Control Method Battery also reports the Present Drain Rate [mA or mW] for calculating the
remaining battery life. At the most basic level, Remaining Battery life is calculated by following
formula:
Smart Batteries also report the present rate of drain, but since they can directly report the estimated
run-time, this function should be used instead as it can more accurately account for variations
specific to the battery.
Warning
OEM-designed initial capacity for warning (minimum)
Each Control Method Battery in a system reports the OEM-designed initial warning capacity and
OEM-designed initial low capacity as well as a flag to report when that battery has reached or is
below its critical energy level. Unlike Control Method Batteries, Smart Batteries are not necessarily
specific to one particular machine type, so the OEM-designed warning, low, and critical levels are
reported separately in a Smart Battery Table described in Section 5.2.14.
The table below describes how these values should be set by the OEM and interpreted by the OS.
Level Description
Low This value is an estimation of the amount of energy or battery capacity required by the system to
transition to any supported sleeping state. When the OS detects that the total available battery
capacity is less than this value, it will transition the system to a user defined system state (S1-
S4). In most situations this should be S4 so that system state is not lost if the battery eventually
becomes completely empty. The design of the OS should consider that users of a multiple battery
system may remove one or more of the batteries in an attempt replace or charge it. This might
result in the remaining capacity falling below the “Low” level not leaving sufficient battery capacity
for the OS to safely transition the system into the sleeping state. Therefore, if the batteries are
discharging simultaneously, the action might need to be initiated at the point when both batteries
reach this level.
Critical The Critical battery state indicates that all available batteries are discharged and do not appear to
be able to supply power to run the system any longer. When this occurs, the OS must attempt to
perform an emergency shutdown as described below.
For a smart battery system, this would typically occur when all batteries reach a capacity of 0, but
an OEM may choose to put a larger value in the Smart Battery Table to provide an extra margin
of safely.
For a Control Method Battery system with multiple batteries, the flag is reported per battery. If any
battery in the system is in a critically low state and is still providing power to the system (in other
words, the battery is discharging), the system is considered to be in a critical energy state. The
_BST control method is required to return the Critical flag on a discharging battery only when all
batteries have reached a critical state; the ACPI system firmware is otherwise required to
switch to a non-critical battery.
the system will not be in use. Since the calibration user experience does not need to be different from
system to system it makes sense for this service to be provided by the OSPM. In this way OSPM can
provide a common experience for end users and eliminate the need for OEMs to develop custom
battery calibration software.
In order for OSPM to perform generic battery calibration, generic interfaces to control the two basic
calibration functions are required. These functions are defined in Section 10.2.2.5 and
Section 10.2.2.6. First, there is a means to detect when it would be beneficial to calibrate the battery.
Second there is a means to perform that calibration cycle. Both of those functions may be
implemented by dedicated hardware such as a battery controller chip, by firmware in the embedded
controller, by the platform firmware, or by OSPM. From here on any function implemented through
AML, whether or not the AML code relies on hardware, will be referred to as “AML controlled”
since the interface is the same whether the AML passes control to the hardware or not.
Detection of when calibration is necessary can be implemented by hardware or AML code and be
reported through the _BMD method. Alternately, the _BMD method may simply report the number
of cycles before calibration should be performed and let the OS attempt to count the cycles. A
counter implemented by the hardware or the platform firmware will generally be more accurate
since the batteries can be used without the OS running, but in some cases, a system designer may opt
to simplify the hardware or firmware implementation.
When calibration is desirable and the user has scheduled the calibration to occur, the calibration
cycle can be AML controlled or OSPM controlled. OSPM can only implement a very simple
algorithm since it doesn’t have knowledge of the specifics of the battery system. It will simply
discharge the battery until it quits discharging, then charge it until it quits charging. In the case
where the AC adapter cannot be controlled through the _BMC, it will prompt the user to unplug the
AC adapter and reattach it after the system powers off. If the calibration cycle is controlled by AML,
the OS will initiate the calibration cycle by calling _BMC. That method will either give control to
the hardware, or will control the calibration cycle itself. If the control of the calibration cycle is
implemented entirely in AML code, the platform runtime firmware may avoid continuously running
AML code by having the initial call to _BMC start the cycle, set some state flags, and then exit.
Control of later parts of the cycle can be accomplished by putting code that checks these state flags
in the battery event handler (_Qxx, _Lxx, or _Exx).
Details of the control methods for this interface are defined in Section 10.2.
Zone CPU
L
PCI Bridge
M
NVRAM
2
L M
PCI/PCI P
A E
Fan
P Bridge N G
L (Active Cooling)
L D LCD
R
A Graphics
M CRT
USB
Port 1 Docking
Momentary
Keyboard
F0: PIC, PITs, F2: Embedded
DMA, RTC, EIO, ... USB Controller PS/2
HDD Ports
0 Mouse
F1: BM
IDE
HDD
1
DPR0
FDD
SIO:
EPROM COMs, DPR1
LPT, COM
FDC, LPT
ACPI
The following sections are an overview of the thermal control and cooling characteristics of a
computer. For some thermal implementation examples on an ACPI platform, see Section 11.6,
“Thermal Zone Interface Requirements.”
Fixed hardware interface requirements of Chapter 4 are removed, and Generic hardware interfaces
are used instead. This provides the level of flexibility needed to innovate and differentiate in low-
power hardware designs while enabling support by multiple Operating Systems.
Hardware-reduced ACPI has the following requirements:
• UEFI firmware interface for boot (Legacy BIOS is not supported).
• Boot in ACPI mode only (ACPI Enable, ACPI Disable, SMI_CMD and Legacy mode are not
supported)
• No hardware resource sharing between OSPM and other asynchronous operating environments,
such as UEFI Runtime Services or System Management Mode. (The Global Lock is not
supported)
• No dependence on OS-support for maintaining cache coherency across processor sleep states
(Bus Master Reload and Arbiter Disable are not supported)
• GPE block devices are not supported
Systems that do not meet the above requirements must implement the ACPI Fixed Hardware
interface.
specific device involved and the needs of the platform design. In order to support these platform
technologies, ACPI defines a general abstraction for flexible connections.
In order to maintain compatibility with existing software models, ACPI abstracts these connections
as hardware resources.
The Connection Resource abstraction mirrors the hardware functionality of GPIO and SPB
controllers. Like other resources, these connections are allocated and configured before use. With
the resources described by the platform, OSPM abstracts the underlying configuration from device
drivers. Drivers, then, can be written for the device's function only, and reused with that functional
hardware regardless of how it is integrated into a given system.
ACPI defines standard interface mechanisms that allow an ACPI-compatible OS to control and
communicate with an ACPI-compatible hardware platform. These interface mechanisms are
optional (See "Hardware-Reduced ACPI", below).However, if the ACPI Hardware Specification is
implemented, platforms must comply with the requirements in this section.
This section describes the hardware aspects of ACPI.
ACPI defines “hardware” as a programming model and its behavior. ACPI strives to keep much of
the existing legacy programming model the same; however, to meet certain feature goals, designated
features conform to a specific addressing and programming scheme. Hardware that falls within this
category is referred to as “fixed.”
Although ACPI strives to minimize these changes, hardware engineers should read this section
carefully to understand the changes needed to convert a legacy-only hardware model to an ACPI/
Legacy hardware model or an ACPI-only hardware model.
ACPI classifies hardware into two categories: Fixed or Generic. Hardware that falls within the fixed
category meets the programming and behavior specifications of ACPI. Hardware that falls within
the generic category has a wide degree of flexibility in its implementation.
Note: FFH is permitted and applicable to both full and HW-reduced ACPI implementations.
To enable OSPM to execute properly on different types of value added hardware, ACPI defines
higher level “control methods” that it calls to perform an action. The OEM provides AML code,
which is associated with control methods, to be executed by OSPM. By providing AML code,
generic hardware can take on almost any form.
Another important goal of ACPI is to provide OS independence. To do this, the OEM AML code has
to execute the same under any ACPI-compatible OS. ACPI allows for this by making the AML code
interpreter part of OSPM. This allows OSPM to take care of synchronizing and blocking issues
specific to each particular OS.
The generic feature model is represented in the following block diagram. In this model the generic
feature is described to OSPM through AML code. This description takes the form of an object that
sits in the ACPI Namespace associated with the hardware to which it is adding value.
ACPI Driver
Rds AML
and AML-
Interpreter
Control
Events
GP Event Status
Generic
Generic Child Control
Event Status Logic
Generic Event
Logic
As an example of a generic hardware control feature, a platform might be designed such that the IDE
HDD’s D3 state has value-added hardware to remove power from the drive. The IDE drive would
then have a reference to the AML PowerResource object (which controls the value added power
plane) in its namespace, and associated with that object would be control methods that OSPM
invokes to control the D3 state of the drive:
• _PS0: A control method to sequence the IDE drive to the D0 state.
• _PS3: A control method to sequence the IDE drive to the D3 state.
• _PSC: A control method that returns the status of the IDE drive (on or off).
The control methods under this object provide an abstraction layer between OSPM and the
hardware. OSPM understands how to control power planes (turn them on or off or to get their status)
through its defined PowerResource object, while the hardware has platform-specific AML code
(contained in the appropriate control methods) to perform the desired function. In this example, the
platform would describe its hardware to the ACPI OS by writing and placing the AML code to turn
the hardware off within the _PS3 control method. This enables the following sequence:
When OSPM decides to place the IDE drive in the D3 state, it calls the IDE driver and tells it to
place the drive into the D3 state (at which point the driver saves the device’s context).
When the IDE driver returns control, OSPM places the drive in the D3 state.
OSPM finds the object associated with the HDD and then finds within that object any AML code
associated with the D3 state.
OSPM executes the appropriate _PS3 control method to control the value-added “generic” hardware
to place the HDD into an even lower power state.
As an example of a generic event feature, a platform might have a docking capability. In this case, it
will want to generate an event. Notice that all ACPI events generate an SCI, which can be mapped to
any shareable system interrupt. In the case of docking, the event is generated when a docking has
been detected or when the user requests to undock the system. This enables the following sequence:
OSPM responds to the SCI and calls the AML code event handler associated with that generic event.
The ACPI table associates the hardware event with the AML code event handler.
The AML-code event handler collects the appropriate information and then executes an AML Notify
command to indicate to OSPM that a particular bus needs re-enumeration.
The following sections describe the fixed and generic hardware feature set of ACPI. These sections
enable a reader to understand the following:
• Which hardware registers are required or optional when an ACPI feature, concept or interface is
required by a design guide for a platform class
• How to design fixed hardware features
• How to design generic hardware features
• The ACPI Event Model
The rectangular symbol represents a query value from the embedded controller. This is the value the
embedded controller returns to the system software upon a query command in response to an SCI
event. The query value is associated with the event control method that is scheduled to execute upon
an embedded controller event.
The G0 “Working” state is the normal operating environment of an ACPI system. In this state
different devices are dynamically transitioning between their respective power states (D0, D1, D2,
D3hot, or D3) and processors are dynamically transitioning between their respective power states
(C0, C1, C2 or C3). In this state, OSPM can make a policy decision to place the platform into the
system G1 “sleeping” state. The platform can only enter a single sleeping state at a time (referred to
as the global G1 state); however, the hardware can provide up to four system sleeping states that
have different power and exit latencies represented by the S1, S2, S3, or S4 states. When OSPM
decides to enter a sleeping state it picks the most appropriate sleeping state supported by the
hardware (OS policy examines what devices have enabled wake events and what sleeping states
these support). OSPM initiates the sleeping transition by enabling the appropriate wake events and
then programming the SLP_TYPx field with the desired sleeping state and then setting the
SLP_ENx bit. The system will then enter a sleeping state; when one of the enabled wake events
occurs, it will transition the system back to the working state (for more information, see Section 16,
“Waking and Sleeping”).
Another global state transition option while in the G0 “working” state is to enter the G2 “soft off” or
the G3 “mechanical off” state. These transitions represent a controlled transition that allows OSPM
to bring the system down in an orderly fashion (unloading applications, closing files, and so on). The
policy for these types of transitions can be associated with the ACPI power button, which when
pressed generates an event to the power button driver. When OSPM is finished preparing the
operating environment for a power loss, it will either generate a pop-up message to indicate to the
user to remove power, in order to enter the G3 “Mechanical Off” state, or it will initiate a G2 “soft-
off” transition by writing the value of the S5 “soft off” system state to the SLP_TYPx register and
setting the SLP_EN bit.
The G1 sleeping state is represented by four possible sleeping states that the hardware can support.
Each sleeping state has different power and wake latency characteristics. The sleeping state differs
from the working state in that the user’s operating environment is frozen in a low-power state until
awakened by an enabled wake event. No work is performed in this state, that is, the processors are
not executing instructions. Each system sleeping state has requirements about who is responsible for
system context and wake sequences (for more information, see Section 16, Waking and Sleeping”).
The G2 “soft off” state is an OS initiated system shutdown. This state is initiated similar to the
sleeping state transition (SLP_TYPx is set to the S5 value and setting the SLP_EN bit initiates the
sequence). Exiting the G2 soft-off state requires rebooting the system. In this case, an ACPI-only
system will re-enter the G0 state directly (hardware returns the SCI_EN bit set), while an ACPI/
Legacy system transitions to the Legacy state (SCI_EN bit is clear).
The ACPI architecture defines mechanisms for hardware to generate events and control logic to
implement this behavior model. Events are used to notify OSPM that some action is needed, and
control logic is used by OSPM to cause some state transition. ACPI-defined events are “hardware”
or “interrupt” events. A hardware event is one that causes the hardware to unconditionally perform
some operation. For example, any wake event will sequence the system from a sleeping state (S1,
S2, S3, and S4 in the global G1 state) to the G0 working state (see Figure 16-79).
An interrupt event causes the execution of an event handler (AML code or an ACPI-aware driver),
which allows the software to make a policy decision based on the event. For ACPI fixed-feature
events, OSPM or an ACPI-aware driver acts as the event handler. For generic logic events OSPM
will schedule the execution of an OEM-supplied AML control method associated with the event.
For legacy systems, an event normally generates an OS-transparent interrupt, such as a System
Management Interrupt, or SMI. For ACPI systems the interrupt events need to generate an OS-
visible interrupt that is shareable; edge-style interrupts will not work. Hardware platforms that want
to support both legacy operating systems and ACPI systems support a way of re-mapping the
interrupt events between SMIs and SCIs when switching between ACPI and legacy models. This is
illustrated in the following block diagram.
GLBL STBY
SCI_EN SMI Arbiter SMI#
Timer
0
PWRBTN User Dec
Figure 4-9 Example Event Structure for a Legacy/ACPI Compatible Event Model
This example logic illustrates the event model for a sample platform that supports both legacy and
ACPI event models. This example platform supports a number of external events that are power-
related (power button, LID open/close, thermal, ring indicate) or Plug and Play-related (dock, status
change). The logic represents the three different types of events:
OS Transparent Events
These events represent OEM-specific functions that have no OS support and use
software that can be operated in an OS-transparent fashion (that is, SMIs).
Interrupt Events
These events represent features supported by ACPI-compatible operating systems, but
are not supported by legacy operating systems. When a legacy OS is loaded, these
events are mapped to the transparent interrupt (SMI# in this example), and when in
ACPI mode they are mapped to an OS-visible shareable interrupt (SCI#). This logic is
represented by routing the event logic through the decoder that routes the events to the
SMI# arbiter when the SCI_EN bit is cleared, or to the SCI# arbiter when the SCI_EN
bit is set.
Hardware events
These events are used to trigger the hardware to initiate some hardware sequence such
as waking, resetting, or putting the system to sleep unconditionally.
In this example, the legacy power management event logic is used to determine device/system
activity or idleness based on device idle timers, device traps, and the global standby timer. Legacy
power management models use the idle timers to determine when a device should be placed in a
low-power state because it is idle—that is, the device has not been accessed for the programmed
amount of time. The device traps are used to indicate when a device in a low-power state is being
accessed by OSPM. The global standby timer is used to determine when the system should be
allowed to go into a sleeping state because it is idle—that is, the user interface has not been used for
the programmed amount of time.
These legacy idle timers, trap monitors, and global standby timer are not used by OSPM in the ACPI
mode. This work is handled by different software structures in an ACPI-compatible OS. For
example, the driver model of an ACPI-compatible OS is responsible for placing its device into a
low-power state (D1, D2, D3hot, or D3) and transitioning it back to the On state (D0) when needed.
And OSPM is responsible for determining when the system is idle by profiling the system (using the
PM Timer) and other knowledge it gains through its operating structure environment (which will
vary from OS to OS). When the system is placed into the ACPI mode, these events no longer
generate SMIs, as OSPM handles this function. These events are disabled through some OEM-
proprietary method.
On the other hand, many of the hardware events are shared between the ACPI and legacy models
(docking, the power button, and so on) and this type of interrupt event changes to an SCI event when
enabled for ACPI. The ACPI OS will generate a request to the platform runtime firmware to enter
into the ACPI mode. The firmware sets the SCI_EN bit to indicate that the system has successfully
entered into the ACPI mode, so this is a convenient mechanism to map the desired interrupt (SMI or
SCI) for these events (as shown in Figure 4-3).
The ACPI architecture specifies some dedicated hardware not found in the legacy hardware model:
the power management timer (PM Timer). This is a free running timer that the ACPI OS uses to
profile system activity. The frequency of this timer is explicitly defined in this specification and
must be implemented as described.
Although the ACPI architecture reuses most legacy hardware as is, it does place restrictions on
where and how the programming model is generated. If used, all fixed hardware features are
implemented as described in this specification so that OSPM can directly access the fixed hardware
feature registers.
Generic hardware features are manipulated by ACPI control methods residing in the ACPI
Namespace. These interfaces can be very flexible; however, their use is limited by the defined ACPI
control methods (for more information, see Section 9, “ACPI Devices and Device Specific
Objects”). Generic hardware usually controls power planes, buffer isolation, and device reset
resources. Additionally, “child” interrupt status bits can be accessed via generic hardware interfaces;
however, they have a “parent” interrupt status bit in the GP_STS register. ACPI defines eight
address spaces that may be accessed by generic hardware implementations. These include:
• System I/O space
• System memory space
• PCI configuration space
• Embedded controller space
• System Management Bus (SMBus) space
• CMOS
• PCI BAR Target
• IPMI space
Generic hardware power management features can be implemented accessing spare I/O ports
residing in any of these address spaces. The ACPI specification defines an optional embedded
controller and SMBus interfaces needed to communicate with these associated address spaces.
programming behavior that requires atomic back-to-back write accesses to successfully write to its
registers; if any other platform access is able to break between the back-to-back accesses, then the
write to Device A is unsuccessful. If the Device A driver is unable to generate atomic back-to-back
accesses to its device, then it relies on software to synchronize accesses to its device with every other
driver in the system; then a device cross dependency is created and the platform is prone to Device A
failure.
a. RTC wakeup alarm is required, the fixed hardware feature status bit is optional.
Different implementations will result in different address spaces being used for different functions.
The ACPI specification consists of fixed hardware registers and generic hardware registers. Fixed
hardware registers are required to implement ACPI-defined interfaces. The generic hardware
registers are needed for any events generated by value-added hardware.
ACPI defines register blocks. An ACPI-compatible system provides an ACPI table (the FADT, built
in memory at boot-up) that contains a list of pointers to the different fixed hardware register blocks
used by OSPM. The bits within these registers have attributes defined for the given register block.
The types of registers that ACPI defines are:
• Status/Enable Registers (for events)
• Control Registers
If a register block is of the status/enable type, then it will contain a register with status bits, and a
corresponding register with enable bits. The status and enable bits have an exact implementation
definition that needs to be followed (unless otherwise noted), which is illustrated by the following
diagram:
Status Bit
Event Input
Event Output
Enable Bit
Notice that the status bit, which hardware sets by the Event Input being set in this example, can only
be cleared by software writing a 1 to its bit position. Also, the enable bit has no effect on the setting
or resetting of the status bit; it only determines if the SET status bit will generate an “Event Output,”
which generates an SCI when set if its enable bit is set.
ACPI also defines register groupings. A register grouping consists of two register blocks, with two
pointers to two different blocks of registers, where each bit location within a register grouping is
fixed and cannot be changed. The bits within a register grouping, which have fixed bit positions, can
be split between the two register blocks. This allows the bits within a register grouping to reside in
either or both register blocks, facilitating the ability to map bits within several different chips to the
same register thus providing the programming model with a single register grouping bit structure.
OSPM treats a register grouping as a single register; but located in multiple places. To read a register
grouping, OSPM will read the “A” register block, followed by the “B” register block, and then will
logically “OR” the two results together (the SLP_TYP field is an exception to this rule). Reserved
bits, or unused bits within a register block always return zero for reads and have no side effects for
writes (which is a requirement).
The SLP_TYPx field can be different for each register grouping. The respective sleeping object \_Sx
contains a SLP_TYPa and a SLP_TYPb field. That is, the object returns a package with two integer
values of 0-7 in it. OSPM will always write the SLP_TYPa value to the “A” register block followed
by the SLP_TYPb value within the field to the “B” register block. All other bit locations will be
written with the same value. Also, OSPM does not read the SLP_TYPx value but throws it away.
te td tc tb ta
Bi Bi Bi Bi Bi
Register Block A
Register
Grouping
Register Block B
As an example, the above diagram represents a register grouping consisting of register block A and
register block b. Bits “a” and “d” are implemented in register block B and register block A returns a
zero for these bit positions. Bits “b”, “c” and “e” are implemented in register block A and register
block B returns a zero for these bit positions. All reserved or ignored bits return their defined ACPI
values.
When accessing this register grouping, OSPM must read register block a, followed by reading
register block b. OSPM then does a logical OR of the two registers and then operates on the results.
When writing to this register grouping, OSPM will write the desired value to register group A
followed by writing the same value to register group B.
ACPI defines the following fixed hardware register blocks. Each register block gets a separate
pointer from the FADT. These addresses are set by the OEM as static resources, so they are never
changed—OSPM cannot re-map ACPI resources. The following register blocks are defined:
Registers Register Blocks Register Groupings
PM1a_STS
PM1a_EVT_BLK
PM1a_EN
PM1 EVT Grouping
PM1b_STS
PM1b_EVT_BLK
PM1b_EN
PM1a_CNT PM1a_CNT_BLK
PM1 CNT Grouping
PM1b_CNT PM1b_CNT_BLK
P_CNT
P_LVL2 P_BLK Processor Block
P_LVL3
GPE0_STS
GPE0_BLK General Purpose Event 0
GPE0_EN
Block
GPE1_STS
GPE1_BLK General Purpose Event 1
GPE1_EN
Block
The PM1 EVT grouping consists of the PM1a_EVT and PM1b_EVT register blocks, which contain
the fixed hardware feature event bits. Each event register block (if implemented) contains two
registers: a status register and an enable register. Each register grouping has a defined bit position
that cannot be changed; however, the bit can be implemented in either register block (A or B). The A
and B register blocks for the events allow chipsets to vary the partitioning of events into two or more
chips. For read operations, OSPM will generate a read to the associated A and B registers, OR the
two values together, and then operate on this result. For write operations, OSPM will write the value
to the associated register in both register blocks. Therefore, there are two rules to follow when
implementing event registers:
• Reserved or unimplemented bits always return zero (control or enable).
• Writes to reserved or unimplemented bits have no affect.
The PM1 CNT grouping contains the fixed hardware feature control bits and consists of the
PM1a_CNT_BLK and PM1b_CNT_BLK register blocks. Each register block is associated with a
single control register. Each register grouping has a defined bit position that cannot be changed;
however, the bit can be implemented in either register block (A or B). There are two rules to follow
when implementing CNT registers:
• Reserved or unimplemented bits always return zero (control or enable).
• Writes to reserved or unimplemented bits have no affect.
The PM2_CNT_BLK register block currently contains a single bit for the arbiter disable function.
The general-purpose event register contains the event programming model for generic features. All
generic events, just as fixed events, generate SCIs. Generic event status bits can reside anywhere;
however, the top-level generic event resides in one of the general-purpose register blocks. Any
generic feature event status not in the general-purpose register space is considered a child or sibling
status bit, whose parent status bit is in the general-purpose event register space. Notice that it is
possible to have N levels of general-purpose events prior to hitting the GPE event status.
General-purpose event registers are described by two register blocks: The GPE0_BLK or the
GPE1_BLK. Each register block is pointed to separately from within the FADT. Each register block
is further broken into two registers: GPEx_STS and GPEx_EN. The status and enable registers in the
general-purpose event registers follow the event model for the fixed hardware event registers.
purpose event blocks: GPE0_BLK and GPE1_BLK. These are separate register blocks and are not a
register grouping, because there is no need to maintain an orthogonal bit arrangement. Also, each
register block contains its own length variable in the FADT, where GPE0_LEN and GPE1_LEN
represent the length in bytes of each register block.
Each register block contains two registers of equal length: GPEx_STS and GPEx_EN (where x is 0
or 1). The length of the GPE0_STS and GPE0_EN registers is equal to half the GPE0_LEN. The
length of the GPE1_STS and GPE1_EN registers is equal to half the GPE1_LEN. If a generic
register block is not supported then its respective block pointer and block length values in the FADT
table contain zeros. The GPE0_LEN and GPE1_LEN do not need to be the same size.
-- 24/32 TMR_EN
PM1x_EN.0
TMR_VAL
PM_TMR.0-23/0-31
The power management timer is a 24-bit or 32-bit fixed rate free running count-up timer that runs off
a 3.579545 MHz clock. The ACPI OS checks the FADT to determine whether the PM Timer is a 32-
bit or 24-bit timer. The programming model for the PM Timer consists of event logic, and a read port
to the counter value. The event logic consists of an event status and enable bit. The status bit is set
any time the last bit of the timer (bit 23 or bit 31) goes from set to clear or clear to set. If the
TMR_EN bit is set, then the setting of the TMR_STS will generate an ACPI event in the PM1_EVT
register grouping (referred to as PMTMR_PME in the diagram). The event logic is only used to
emulate a larger timer.
OSPM uses the read-only TMR_VAL field (in the PM TMR register grouping) to read the current
value of the timer. OSPM never assumes an initial value of the TMR_VAL field; instead, it reads an
initial TMR_VAL upon loading OSPM and assumes that the timer is counting. It is allowable to stop
the Timer when the system transitions out of the working (G0/S0) state. The only timer reset
requirement is that the timer functions while in the working state.
The PM Timer’s programming model is implemented as a fixed hardware feature to increase the
accuracy of reading the timer.
The power button can also have an additional capability to unconditionally transition the system
from a hung working state to the G2 soft-off state. In the case where OSPM event handler is no
longer able to respond to power button events, the power button override feature provides a back-up
mechanism to unconditionally transition the system to the soft-off state. This feature can be used
when the platform doesn’t have a mechanical off button, which can also provide this function. ACPI
defines that holding the power button active for four seconds or longer will generate a power button
override event.
The fixed hardware power button has its event programming model in the PM1x_EVT_BLK. This
logic consists of a single enable bit and sticky status bit. When the user presses the power button, the
power button status bit (PWRBTN_STS) is unconditionally set. If the power button enable bit
(PWRBTN_EN) is set and the power button status bit is set (PWRBTN_STS) due to a button press
while the system is in the G0 state, then an SCI is generated. OSPM responds to the event by
clearing the PWRBTN_STS bit. The power button logic provides debounce logic that sets the
PWRBTN_STS bit on the button press “edge.”
While the system is in the G1 or G2 global states (S1, S2, S3, S4 or S5 states), any further power
button press after the button press that transitioned the system into the sleeping state unconditionally
sets the power button status bit and wakes the system, regardless of the value of the power button
enable bit. OSPM responds by clearing the power button status bit and waking the system.
• Creates a device named “PWRB” and associates the Plug and Play identifier (through the _HID
object) of “PNP0C0C.”
• The Plug and Play identifier associates this device object with the power button driver.
• Creates an operational region for the control method power button’s programming model:
System I/O space at 0x200.
• Fields that are not accessed are written as zeros. These status bits clear upon writing a 1 to their
bit position, therefore preserved would fail in this case.
• Creates a field within the operational region for the power button status bit (called PBP). In this
case the power button status bit is a child of the general-purpose event status bit 0. When this bit
is set, it is the responsibility of the ASL-code to clear it (OSPM clears the general-purpose status
bits). The address of the status bit is 0x200.0 (bit 0 at address 0x200).
• Creates an additional status bit called PBW for the power button wake event. This is the next bit
and its physical address would be 0x200.1 (bit 1 at address 0x200).
• Generates an event handler for the power button that is connected to bit 0 of the general-purpose
event status register 0. The event handler does the following:
• Clears the power button status bit in hardware (writes a one to it).
• Notifies OSPM of the event by calling the Notify command passing the power button object and
the device specific event indicator 0x80.
// Define a control method power button
Device(\_SB.PWRB){
Name(_HID, EISAID(“PNP0C0C”))
Name(_PRW, Package(){0, 0x4})
SLPBTN_STS
Debounce PM1x_STS.9
SLPBTN# SLPBTN
Logic State machine
SLPBTN Event
SLPBTN_EN
PM1x_EN.9
The fixed hardware sleep button has its event programming model in the PM1x_EVT_BLK. This
logic consists of a single enable bit and sticky status bit. When the user presses the sleep button, the
sleep button status bit (SLPBTN_STS) is unconditionally set. Additionally, if the sleep button
enable bit (SLPBTN_EN) is set, and the sleep button status bit is set (SLPBTN_STS, due to a button
press) while the system is in the G0 state, then an SCI is generated. OSPM responds to the event by
clearing the SLPBTN_STS bit. The sleep button logic provides debounce logic that sets the
SLPBTN_STS bit on the button press “edge.”
While the system is sleeping (in either the S0, S1, S2, S3 or S4 states), any further sleep button press
(after the button press that caused the system transition into the sleeping state) sets the sleep button
status bit (SLPBTN_STS) and wakes the system if the SLP_EN bit is set. OSPM responds by
clearing the sleep button status bit and waking the system.
waking-up from a G1 sleeping state, the AML event handler generates a Notify command with the
code of 0x2 to indicate it was responsible for waking the system.
The sleep button device needs to be declared as a device within the ACPI Namespace for the
platform and only requires an _HID. An example definition is shown below.
The AML code below does the following:
• Creates a device named “SLPB” and associates the Plug and Play identifier (through the _HID
object) of “PNP0C0E.”
• The Plug and Play identifier associates this device object with the sleep button driver.
• Creates an operational region for the control method sleep button’s programming model: System
I/O space at 0x201.
• Fields that are not accessed are written as “1s” (these status bits clear upon writing a “1” to their
bit position, hence preserved would fail in this case).
• Creates a field within the operational region for the sleep button status bit (called PBP). In this
case the sleep button status bit is a child of the general-purpose status bit 0. When this bit is set it
is the responsibility of the AML code to clear it (OSPM clears the general-purpose status bits).
The address of the status bit is 0x201.0 (bit 0 at address 0x201).
• Creates an additional status bit called PBW for the sleep button wake event. This is the next bit
and its physical address would be 0x201.1 (bit 1 at address 0x201).
• Generates an event handler for the sleep button that is connected to bit 0 of the general-purpose
status register 0. The event handler does the following:
• Clears the sleep button status bit in hardware (writes a “1” to it).
• Notifies OSPM of the event by calling the Notify command passing the sleep button object and
the device specific event indicator 0x80.
// Define a control method sleep button
Device(\_SB.SLPB){
Name(_HID, EISAID(“PNP0C0E”))
Name(_PRW, Package(){0x01, 0x04})
OperationRegion(\Boo, SystemIO, 0x201, 0x1)
Field(\Boo, ByteAcc, NoLock, WriteAsZeros){
SBP, 1, // sleep request
SBW, 1 // wakeup request
} // end of field definition
}
Scope(\_GPE){ // Root level event handlers
Method(_L01){ // uses bit 1 of GP0_STS register
If(\SBP){
Store(One, \SBP) // clear sleep button status
Notify(\_SB.SLPB, 0x80) // Notify OS of event
}
If(\SBW){
Store(One, \SBW)
Notify(\_SB.SLPB, 0x2)
}
} // end of _L01 handler
} // end of \_GPE scope
SLP_EN SLP_TYP:3
PM1x_CNT.S4.13 PM1x_CNT.S4.[10-12]
WAK_STS
PM1x_STS.S0.15
Sleeping
"OR" or all
Wake Wakeup/
Events
Sleep
Logic
PWRBTN_OR
The logic is controlled via two bit fields: Sleep Enable (SLP_EN) and Sleep Type (SLP_TYPx). The
type of sleep or soft-off state desired is programmed into the SLP_TYPx field and upon assertion of
the SLP_EN the hardware will sequence the system into the defined sleeping state. OSPM gets
values for the SLP_TYPx field from the \_Sx objects defined in the static definition block. If the
object is missing OSPM assumes the hardware does not support that sleeping state. Prior to entering
the desired sleeping state, OSPM will read the designated \_Sx object and place this value in the
SLP_TYP field.
Additionally ACPI defines a fail-safe Off protocol called the “power button override,” which allows
the user to initiate an Off sequence in the case where the system software is no longer able to recover
the system (the system has hung). ACPI defines that this sequence be initiated by the user pressing
the power button for over 4 seconds, at which point the hardware unconditionally sequences the
system to the Off state. This logic is represented by the PWRBTN_OR signal coming into the sleep
logic.
While in any of the sleeping states (G1), an enabled “Wake” event will cause the hardware to
sequence the system back to the working state (G0). The “Wake Status” bit (WAK_STS) is provided
for OSPM to “spin-on” after setting the SLP_EN/SLP_TYP bit fields. When waking from the S1
sleeping state, execution control is passed backed to OSPM immediately, whereas when waking
from the S2-S4 states execution control is passed to the platform boot firmware (execution begins at
the CPU’s reset vector). The WAK_STS bit provides a mechanism to separate OSPM’s sleeping and
waking code during an S1 sequence. When the hardware has sequenced the system into the sleeping
state (defined here as the processor is no longer able to execute instructions), any enabled wake
event is allowed to set the WAK_STS bit and sequence the system back on (to the G0 state). If the
system does not support the S1 sleeping state, the WAK_STS bit can always return zero.
-If more than a single sleeping state is supported, then the sleeping/wake logic is required to be able
to dynamically sequence between the different sleeping states. This is accomplished by waking the
system; OSPM programs the new sleep state into the SLP_TYP field, and then sets the SLP_EN bit–
placing the system again in the sleeping state.
RTC_STS
PM1x_STS.10
Real Time Clock
(RTC) RTC Wake-up
Event
RTC_EN
PM1x_EN.10
The RTC wake event status and enable bits are an optional fixed hardware feature and a flag within
the FADT (FIX_RTC) indicates if the register bits are to be used by OSPM. If the RTC wake event
status and enable bits are implemented in fixed hardware, OSPM can determine if the RTC was the
source of the wake event without loading the entire OS. This also gives the platform the capability of
indicating an RTC wake source without consuming a GPE bit, as would be required if RTC wake
was not implemented using the fixed hardware RTC feature. If the fixed hardware feature event bits
are not supported, then OSPM will attempt to determine this by reading the RTC’s status field. If the
platform implements the RTC fixed hardware feature, and this hardware consumes resources, the
_FIX method can be used to correlate these resources with the fixed hardware. See Section 6.2.5,
“_FIX (Fixed Register Resource Provide”, for details.
OSPM supports enhancements over the existing RTC device (which only supports a 99 year date and
24-hour alarm). Optional extensions are provided for the following features:
Day Alarm.
The DAY_ALRM field points to an optional CMOS RAM location that selects the
day within the month to generate an RTC alarm.
1. Notice that the G2/S5 “soft off” and the G3 “mechanical off” states are not sleeping states. The OS will dis-
able the RTC_EN bit prior to entering the G2/S5 or G3 states regardless.
Month Alarm.
The MON_ALRM field points to an optional CMOS RAM location that selects the
month within the year to generate an RTC alarm.
Centenary Value.
The CENT field points to an optional CMOS RAM location that represents the
centenary value of the date (thousands and hundreds of years).
The RTC_STS bit may be set through the RTC interrupt (IRQ8 in IA-PC architecture systems).
OSPM will insure that the periodic and update interrupt sources are disabled prior to sleeping. This
allows the RTC’s interrupt pin to serve as the source for the RTC_STS bit generation. Note however
that if the RTC interrupt pin is used for RTC_STS generation, the RTC_STS bit value may not be
accurate when waking from S4. If this value is accurate when waking from S4, the platform should
set the S4_RTC_STS_VALID flag, so that OSPM can utilize the RTC_STS information.
while legacy systems use some type of transparent interrupt handler to respond to these events (that
is, an SMI interrupt handler). ACPI-compatible hardware can choose to support both legacy and
ACPI modes or just an ACPI mode. Legacy hardware is needed to support these features for non-
ACPI-compatible operating systems. When the ACPI OS loads, it scans the platform firmware tables to
determine that the hardware supports ACPI, and then if the it finds the SCI_EN bit reset (indicating
that ACPI is not enabled), issues an ACPI activate command to the SMI handler through the SMI
command port. The platform firmware acknowledges the switching to the ACPI model of power
management by setting the SCI_EN bit (this bit can also be used to switch over the event mechanism
as illustrated below):
SCI_EN
PM1x_CNT.0
Power 0 SMI_EVNT
Management Dec
The interrupt events (those that generate SMIs in legacy mode and SCIs in ACPI mode) are sent
through a decoder controlled by the SCI_EN bit. For legacy mode this bit is reset, which routes the
interrupt events to the SMI interrupt logic. For ACPI mode this bit is set, which routes interrupt
events to the SCI interrupt logic. This bit always returns set for ACPI-compatible hardware that does
not support a legacy power management mode (in other words, the bit is wired to read as “1” and
ignore writes).
The SCI interrupt is defined to be a shareable interrupt and is connected to an OS visible interrupt
that uses a shareable protocol. The FADT has an entry that indicates what interrupt the SCI interrupt
is mapped to (see Section 5.2.6, “System Description Table Header”).
If the ACPI platform supports both legacy and ACPI modes, it has a register that generates a
hardware event (for example, SMI for IA-PC processors). OSPM uses this register to make the
hardware switch in and out of ACPI mode. Within the FADT are three values that signify the
address (SMI_CMD) of this port and the data value written to enable the ACPI state
(ACPI_ENABLE), and to disable the ACPI state (ACPI_DISABLE).
To transition an ACPI/Legacy platform from the Legacy mode to the ACPI mode the following
would occur:
• ACPI driver checks that the SCI_EN bit is zero, and that it is in the Legacy mode.
• OSPM does an OUT to the SMI_CMD port with the data in the ACPI_ENABLE field of the
FADT.
• OSPM polls the SCI_EN bit until it is sampled as SET.
To transition an ACPI/Legacy platform from the ACPI mode to the Legacy mode the following
would occur:
• ACPI driver checks that the SCI_EN bit is one, and that it is in the ACPI mode.
• OSPM does an OUT to the SMI_CMD port with the data in the ACPI_DISABLE field of the
FADT.
• OSPM polls the SCI_EN bit until it is sampled as RESET.
Platforms that only support ACPI always return a 1 for the SCI_EN bit. In this case OSPM skips the
Legacy to ACPI transition stated above.
The PM1 status registers contain the fixed hardware feature status bits. The bits can be split between
two registers: PM1a_STS or PM1b_STS. Each register grouping can be at a different 32-bit aligned
address and is pointed to by the PM1a_EVT_BLK or PM1b_EVT_BLK. The values for these
pointers to the register space are found in the FADT. Accesses to the PM1 status registers are done
through byte or word accesses.
For ACPI/legacy systems, when transitioning from the legacy to the G0 working state this register is
cleared by platform firmware prior to setting the SCI_EN bit (and thus passing control to OSPM).
For ACPI only platforms (where SCI_EN is always set), when transitioning from either the
mechanical off (G3) or soft-off state to the G0 working state this register is cleared prior to entering
the G0 working state.
This register contains optional features enabled or disabled within the FADT. If the FADT indicates
that the feature is not supported as a fixed hardware feature, then software treats these bits as
ignored.
Table 4-16 PM1 Status Registers Fixed Hardware Feature Status Bits
Bit Name Description
0 TMR_STS This is the timer carry status bit. This bit gets set any time the most significant
bit of a 24/32-bit counter changes from clear to set or set to clear. While
TMR_EN and TMR_STS are set, an interrupt event is raised.
1-3 Reserved Reserved
4 BM_STS This is the bus master status bit. This bit is set any time a system bus master
requests the system bus, and can only be cleared by writing a “1” to this bit
position. Notice that this bit reflects bus master activity, not CPU activity (this
bit monitors any bus master that can cause an incoherent cache for a
processor in the C3 state when the bus master performs a memory
transaction).
5 GBL_STS This bit is set when an SCI is generated due to the platform runtime firmware
wanting the attention of the SCI handler. Platform runtime firmware will have a
control bit (somewhere within its address space) that will raise an SCI and set
this bit. This bit is set in response to the platform runtime firmware releasing
control of the Global Lock and having seen the pending bit set.
6-7 Reserved Reserved. These bits always return a value of zero.
8 PWRBTN_STS This optional bit is set when the Power Button is pressed. In the system
working state, while PWRBTN_EN and PWRBTN_STS are both set, an
interrupt event is raised. In the sleep or soft-off state, a wake event is
generated when the power button is pressed (regardless of the PWRBTN_EN
bit setting). This bit is only set by hardware and can only be reset by software
writing a “1” to this bit position.
ACPI defines an optional mechanism for unconditional transitioning a system
that has stopped working from the G0 working state into the G2 soft-off state
called the power button override. If the Power Button is held active for more
than four seconds, this bit is cleared by hardware and the system transitions
into the G2/S5 Soft Off state (unconditionally).
Support for the power button is indicated by the PWR_BUTTON flag in the
FADT being reset (zero). If the PWR_BUTTON flag is set or a power button
device object is present in the ACPI Namespace, then this bit field is ignored by
OSPM.
If the power button was the cause of the wake (from an S1-S4 state), then this
bit is set prior to returning control to OSPM.
9 SLPBTN_STS This optional bit is set when the sleep button is pressed. In the system working
state, while SLPBTN_EN and SLPBTN_STS are both set, an interrupt event is
raised. In the sleep or soft-off states a wake event is generated when the
sleeping button is pressed and the SLPBTN_EN bit is set. This bit is only set by
hardware and can only be reset by software writing a “1” to this bit position.
Support for the sleep button is indicated by the SLP_BUTTON flag in the FADT
being reset (zero). If the SLP_BUTTON flag is set or a sleep button device
object is present in the ACPI Namespace, then this bit field is ignored by
OSPM.
If the sleep button was the cause of the wake (from an S1-S4 state), then this
bit is set prior to returning control to OSPM.
Note: This bit does not itself cause a wake event or prevent entry to a sleeping
state. Thus if the bit is 1 and the system is put into a sleeping state, the system
will not automatically wake.
15 WAK_STS This bit is set when the system is in the sleeping state and an enabled wake
event occurs. Upon setting this bit system will transition to the working state.
This bit is set by hardware and can only be cleared by software writing a “1” to
this bit position.
The PM1 enable registers contain the fixed hardware feature enable bits. The bits can be split
between two registers: PM1a_EN or PM1b_EN. Each register grouping can be at a different 32-bit
aligned address and is pointed to by the PM1a_EVT_BLK or PM1b_EVT_BLK. The values for
these pointers to the register space are found in the FADT. Accesses to the PM1 Enable registers are
done through byte or word accesses.
For ACPI/legacy systems, when transitioning from the legacy to the G0 working state the enables
are cleared by platform firmware prior to setting the SCI_EN bit (and thus passing control to
OSPM). For ACPI-only platforms (where SCI_EN is always set), when transitioning from either the
mechanical off (G3) or soft-off state to the G0 working state this register is cleared prior to entering
the G0 working state.
This register contains optional features enabled or disabled within the FADT. If the FADT indicates
that the feature is not supported as a fixed hardware feature, then software treats the enable bits as
write as zero.
Table 4-17 PM1 Enable Registers Fixed Hardware Feature Enable Bits
Bit Name Description
0 TMR_EN This is the timer carry interrupt enable bit. When this bit is set then an
SCI event is generated anytime the TMR_STS bit is set. When this bit is
reset then no interrupt is generated when the TMR_STS bit is set.
4:1 Reserved Reserved. These bits always return a value of zero.
5 GBL_EN The global enable bit. When both the GBL_EN bit and the GBL_STS bit
are set, an SCI is raised.
7:6 Reserved Reserved
8 PWRBTN_EN This optional bit is used to enable the setting of the PWRBTN_STS bit to
generate a power management event (SCI or wake). The PWRBTN_STS
bit is set anytime the power button is asserted. The enable bit does not
have to be set to enable the setting of the PWRBTN_STS bit by the
assertion of the power button (see description of the power button
hardware).
Support for the power button is indicated by the PWR_BUTTON flag in
the FADT being reset (zero). If the PWR_BUTTON flag is set or a power
button device object is present in the ACPI Namespace, then this bit field
is ignored by OSPM.
9 SLPBTN_EN This optional bit is used to enable the setting of the SLPBTN_STS bit to
generate a power management event (SCI or wake). The SLPBTN_STS
bit is set anytime the sleep button is asserted. The enable bit does not
have to be set to enable the setting of the SLPBTN_STS bit by the active
assertion of the sleep button (see description of the sleep button
hardware).
Support for the sleep button is indicated by the SLP_BUTTON flag in the
FADT being reset (zero). If the SLP_BUTTON flag is set or a sleep
button device object is present in the ACPI Namespace, then this bit field
is ignored by OSPM.
10 RTC_EN This optional bit is used to enable the setting of the RTC_STS bit to
generate a wake event. The RTC_STS bit is set any time the RTC
generates an alarm.
13:11 Reserved Reserved. These bits always return a value of zero.
This bit disables the inputs to the PCIEXP_WAKE_STS bit in the PM1
Status register from waking the system. Modification of this bit has no
impact on the value of the PCIEXP_WAKE_STS bit.
PCIEXP_WAKE_DIS bit. Software writes a 1 to clear this bit. If the
WAKE# pin is still active during the write, one or more PCI Express ports
is in the beacon state or the PME message received indication has not
been cleared in the root port, then the bit will remain active (i.e. all inputs
to this bit are level-sensitive). Note: This bit does not itself cause a wake
event or prevent entry to a sleeping state. Thus if the bit is 1 and the
system is put into a sleeping state, the system will not automatically
wake.
15 Reserved Reserved. These bits always return a value of zero.
The PM1 control registers contain the fixed hardware feature control bits. These bits can be split
between two registers: PM1a_CNT or PM1b_CNT. Each register grouping can be at a different 32-
bit aligned address and is pointed to by the PM1a_CNT_BLK or PM1b_CNT_BLK. The values for
these pointers to the register space are found in the FADT. Accesses to PM1 control registers are
accessed through byte and word accesses.
This register contains optional features enabled or disabled within the FADT. If the FADT indicates
that the feature is not supported as a fixed hardware feature, then software treats these bits as
ignored.
Table 4-18 PM1 Control Registers Fixed Hardware Feature Control Bits
Bit Name Description
0 SCI_EN Selects the power management event to be either an SCI or SMI interrupt for the
following events. When this bit is set, then power management events will
generate an SCI interrupt. When this bit is reset power management events will
generate an SMI interrupt. It is the responsibility of the hardware to set or reset this
bit. OSPM always preserves this bit position.
This optional read-only register returns the current value of the power management timer (PM timer)
if it is implemented on the platform. The FADT has a flag called TMR_VAL_EXT that an OEM sets
to indicate a 32-bit PM timer or reset to indicate a 24-bit PM timer. When the last bit of the timer
toggles the TMR_STS bit is set. This register is accessed as 32 bits.
This register contains optional features enabled or disabled within the FADT. If the FADT indicates
that the feature is not supported as a fixed hardware feature, then software treats these bits as
ignored.
31:24 E_TMR_VAL This read-only field returns the upper eight bits of a 32-bit power management
timer. If the hardware supports a 32-bit timer, then this field will return the upper
eight bits; if the hardware supports a 24-bit timer then this field returns all zeros.
This register block is naturally aligned and accessed based on its length. For ACPI 1.0 this register is
byte aligned and accessed as a byte.
This register contains optional features enabled or disabled within the FADT. If the FADT indicates
that the feature is not supported as a fixed hardware feature, then software treats these bits as
ignored.
This register is accessed as a DWORD. The CLK_VAL field is where the duty setting of the
throttling hardware is programmed as described by the DUTY_WIDTH and DUTY_OFFSET values
in the FADT. Software treats all other CLK_VAL bits as ignored (those not used by the duty setting
value).
4 THT_EN This bit enables clock throttling of the clock as set in the CLK_VAL field. THT_EN bit
must be reset LOW when changing the CLK_VAL field (changing the duty setting).
31:5 CLK_VAL Possible locations for the clock throttling value.
O space, System Memory space, or PCI Configuration space (with a bus number of 0). As the
register is only 8 bits, Register_Bit_Width must be 8 and Register_Bit_Offset must be 0.
The system must reset immediately following the write to this register. OSPM assumes that the
processor will not execute beyond the write instruction. OSPM should execute spin loops on the
CPUs in the system following a write to this register.
Momentary
8
LID
LID#
Switch RI#
EXTSMI# SMI-only
SMI Only EXTSMI# EXTSMI# sources
GPx_REG Events
AC_STS
Block E0.0
34 AC#
EC_STS
GP_STS.0
EXTPME# DOCK_STS
EXTPME# EXTPME#
P0.40.1
35 DOCK# DOCK#
EC_EN
SCI#
GP_EN.0
Shareable
Interrupt RI_STS
GP_STS.1
RI#
RI_EN
GP_EN.1
LID_STS
GP_STS.2
Debounce LID
LID_POL
LID_EN S33.2
GP_EN.2
Other SCI
sources
At the top level, the generic events in the GPEx_STS register are the:
• Embedded controller interrupt, which contains two query events: one for AC detection and one
for docking (the docking query event has a child interrupt status bit in the docking chip).
• Ring indicate status (used for waking the system).
• Lid status.
The embedded controller event status bit (EC_STS) is used to indicate that one of two query events
is active.
• A query event is generated when the AC# signal is asserted. The embedded controller returns a
query value of 34 (any byte number can be used) upon a query command in response to this
event; OSPM will then schedule for execution the control method associated with query value
34.
Another query event is for the docking chip that generates a docking event. In this case, the
embedded controller will return a query value of 35 upon a query command from system software
responding to an SCI from the embedded controller. OSPM will then schedule the control method
associated with the query value of 35 to be executed, which services the docking event.
For each of the status bits in the GPEx_STS register, there is a corresponding enable bit in the
GPEx_EN register. Notice that the child status bits do not necessarily need enable bits (see the
DOCK_STS bit).
The lid logic contains a control bit to determine if its status bit is set when the LID is open
(LID_POL is set and LID is set) or closed (LID_POL is clear and LID is clear). This control bit
resides in generic I/O space (in this case, bit 2 of system I/O space 33h) and would be manipulated
with a control method associated with the lid object.
As with fixed hardware events, OSPM will clear the status bits in the GPEx register blocks.
However, AML code clears all sibling status bits in the generic hardware.
Generic hardware features are controlled by OEM supplied control methods, encoded in AML.
ACPI provides both an event and control model for development of these features. The ACPI
specification also provides specific control methods for notifying OSPM of certain power
management and Plug and Play events. Section 5, “ACPI Software Programming Model,” provides
information on the types of hardware functionality that support the different types of subsystems.
The following is a list of features supported by ACPI. The list is not intended to be complete or
comprehensive.
• Device insertion/ejection (for example, docking, device bay, A/C adapter)
• Batteries2
• Platform thermal subsystem
• Turning on/off power resources
• Mobile lid Interface
• Embedded controller
• System indicators
• OEM-specific wake events
• Plug and Play configuration
2. ACPI operating systems assume the use of the Smart Battery System Implementers Forum defined standard
for batteries, called the “Smart Battery Specification” (SBS). ACPI provides a set of control methods for use by
OEMs that use a proprietary “control method” battery interface.
ACPI FADT’s GPE0_BLK and GPE0_BLK_LEN operators. OSPM owns the general-purpose
event resources and these bits are only manipulated by OSPM; AML code cannot access the general-
purpose event registers.
It is envisioned that chipsets will contain GPE event registers that provide GPE input pins for
various events.
The platform designer would then wire the GPEs to the various value-added event hardware and the
AML code would describe to OSPM how to utilize these events. As such, there will be the case
where a platform has GPE events that are not wired to anything (they are present in the chip set), but
are not utilized by the platform and have no associated AML code. In such, cases these event pins
are to be tied inactive such that the corresponding SCI status bit in the GPE register is not set by a
floating input pin.
The general-purpose event 0 status register contains the general-purpose event status bits in bank
zero of the general-purpose registers. Each available status bit in this register corresponds to the bit
with the same bit position in the GPE0_EN register. Each available status bit in this register is set
when the event is active, and can only be cleared by software writing a “1” to its respective bit
position. For the general-purpose event registers, unimplemented bits are ignored by OSPM.
Each status bit can optionally wake the system if asserted when the system is in a sleeping state with
its respective enable bit set. OSPM accesses GPE registers through byte accesses (regardless of their
length).
The general-purpose event 0 enable register contains the general-purpose event enable bits. Each
available enable bit in this register corresponds to the bit with the same bit position in the
GPE0_STS register. The enable bits work similarly to how the enable bits in the fixed-event
registers are defined: When the enable bit is set, then a set status bit in the corresponding status bit
will generate an SCI bit. OSPM accesses GPE registers through byte accesses (regardless of their
length).
The general-purpose event 1 enable register contains the general-purpose event enable. Each
available enable bit in this register corresponds to the bit with the same bit position in the
GPE1_STS register. The enable bits work similarly to how the enable bits in the fixed-event
registers are defined: When the enable bit is set, a set status bit in the corresponding status bit will
generate an SCI bit.
OSPM accesses GPE registers through byte accesses (regardless of their length).
8 ms
Debounce
Momentary Normally LID_STS
Open push button
LID_POL
This logic will set the Lid status bit when the button is pressed or released (depending on the
LID_POL bit).
The ASL code below defines the following:
• An operational region where the lid polarity resides in address space System address space in
registers 0x201.
• A field operator to allow AML code to access this bit: Polarity control bit (LID_POL) is called
LPOL and is accessed at 0x201.0.
• A device named \_SB.LID with the following:
— A Plug and Play identifier “PNP0C0D” that associates OSPM with this object.
— Defines an object that specifies a change in the lid’s status bit can wake the system from the
S4 sleep state and from all higher sleep states (S1, S2, or S3).
• The lid switch event handler that does the following:
— Defines the lid status bit (LID_STS) as a child of the general-purpose event 0 register bit 1.
— Defines the event handler for the lid (only event handler on this status bit) that does the
following:
• Flips the polarity of the LPOL bit (to cause the event to be generated on the opposite
condition).
• Generates a notify to the OS that does the following:
• Passes the \_SB.LID object.
• Indicates a device specific event (notify value 0x80).
// Define a Lid switch
OperationRegion(\PHO, SystemIO, 0x201, 0x1)
Field(\PHO, ByteAcc, NoLock, Preserve) {
LPOL, 1 // Lid polarity control bit
}
Device(\_SB.LID){
Name(_HID, EISAID(“PNP0C0D”))
Method(_LID){Return(LPOL)}
Name(_PRW, Package(2){
1, // bit 1 of GPE to enable Lid wakeup
0x04} // can wakeup from S4 state
)
}
Scope(\_GPE){ // Root level event handlers
Method(_L01){ // uses bit 1 of GP0_STS register
Not(LPOL, LPOL) // Flip the lid polarity bit
Notify(LID, 0x80) // Notify OS of event
}
}
• _HID with a value of PNP0C09 to associate this device with the ACPI’s embedded controller’s
driver.
• _CRS to return the resources being consumed by the embedded controller.
• _GPE that returns the general-purpose event bit that this embedded controller is wired to.
Additionally the embedded controller can support up to 255 generic events per embedded controller,
referred to as query events. These query event handles are defined within the embedded controller’s
device as control methods. An example of defining an embedded controller device is shown below:
Device(EC0) {
// PnP ID
Name(_HID, EISAID(“PNP0C09”))
// Returns the “Current Resources” of EC
Name(_CRS,
ResourceTemplate(){
IO(Decode16, 0x62, 0x62, 0, 1)
IO(Decode16, 0x66, 0x66, 0, 1)
})
// Indicate that the EC SCI is bit 0 of the GP_STS register
Name(_GPE, 0) // embedded controller is wired to bit 0 of GPE
For more information on the embedded controller, see Section 12, “ACPI Embedded Controller
Interface Specification.”
4.8.4.2.3 Fan
ACPI has a device driver to control fans (active cooling devices) in platforms. A fan is defined as a
device with the Plug and Play ID of “PNP0C0B.” It should then contain a list power resources used
to control the fan.
For more information, see Section 9, “ACPI-Defined Devices and Device Specific Objects.” .
ACPI defines a hardware register interface that an ACPI-compatible OS uses to control core power
management features of a machine, as described in Section 4, “ACPI Hardware Specification.”
ACPI also provides an abstract interface for controlling the power management and configuration of
an ACPI system. Finally, ACPI defines an interface between an ACPI-compatible OS and the
platform runtime firmware.
To give hardware vendors flexibility in choosing their implementation, ACPI uses tables to describe
system information, features, and methods for controlling those features. These tables list devices on
the system board or devices that cannot be detected or power managed using some other hardware
standard, plus their capabilities as described in Section 3, “Overview.” They also list system
capabilities such as the sleeping power states supported, a description of the power planes and clock
sources available in the system, batteries, system indicator lights, and so on. This enables OSPM to
control system devices without needing to know how the system controls are implemented.
Topics covered in this section are:
• The ACPI system description table architecture is defined, and the role of OEM-provided
definition blocks in that architecture is discussed.
• The concept of the ACPI Namespace is discussed.
Pointer Entry
Entry contents contents
Entry
...
All system description tables start with identical headers. The primary purpose of the system
description tables is to define for OSPM various industry-standard implementation details. Such
definitions enable various portions of these implementations to be flexible in hardware requirements
and design, yet still provide OSPM with the knowledge it needs to control hardware directly.
The Extended System Description Table (XSDT) points to other tables in memory. Always the first
table, it points to the Fixed ACPI Description table (FADT). The data within this table includes
various fixed-length entries that describe the fixed ACPI features of the hardware. The FADT table
always refers to the Differentiated System Description Table (DSDT), which contains information
and descriptions for various system features. The relationship between these tables is shown in
Figure 5-22.
Software
Hardware
...
GPx_BLK
OEM-Specific
PM2x_BLK
PM1x_BLK
Located in
port space
Device I/O
Device Memory
PCI configuration
Embedded Controller space
OSPM finds the RSDP structure as described in Section 5.2.5.1 (“Finding the RSDP on IA-PC
Systems”) or Section 5.2.5.2 (“Finding the RSDP on UEFI Enabled Systems”).
When OSPM locates the structure, it looks at the physical address for the Root System Description
Table or the Extended System Description Table. The Root System Description Table starts with the
signature “RSDT”, while the Extended System Description Table starts with the signature “XSDT”.
These tables contain one or more physical pointers to other system description tables that provide
various information about the system. As shown in Figure 5-22, there is always a physical address in
the Root System Description Table for the Fixed ACPI Description table (FADT).
When OSPM follows a physical pointer to another table, it examines each table for a known
signature. Based on the signature, OSPM can then interpret the implementation-specific data within
the description table.
The purpose of the FADT is to define various static system information related to configuration and
power management. The Fixed ACPI Description Table starts with the “FACP” signature. The
FADT describes the implementation and configuration details of the ACPI hardware registers on the
platform.
For a specification of the ACPI Hardware Register Blocks (PM1a_EVT_BLK, PM1b_EVT_BLK,
PM1a_CNT_BLK, PM1b_CNT_BLK, PM2_CNT_BLK, PM_TMR_BLK, GP0_BLK, GP1_BLK,
and one or more P_BLKs), see Section 4.8, “ACPI Register Model.” The PM1a_EVT_BLK,
PM1b_EVT_BLK, PM1a_CNT_BLK, PM1b_CNT_BLK, PM2_CNT_BLK, and PM_TMR_BLK
blocks are for controlling low-level ACPI system functions.
The GPE0_BLK and GPE1_BLK blocks provide the foundation for an interrupt-processing model
for Control Methods. The P_BLK blocks are for controlling processor features.
Besides ACPI Hardware Register implementation information, the FADT also contains a physical
pointer to a data structure known as the Differentiated System Description Table (DSDT), which is
encoded in Definition Block format (See Section 5.2.11, “Definition Blocks”).
A Definition Block contains information about the platform’s hardware implementation details in
the form of data objects arranged in a hierarchical (tree-structured) entity known as the “ACPI
namespace”, which represents the platform’s hardware configuration. All definition blocks loaded
by OSPM combine to form one namespace that represents the platform. Data objects are encoded in
a format known as ACPI Machine Language or AML for short. Data objects encoded in AML are
“evaluated” by an OSPM entity known as the AML interpreter. Their values may be static or
dynamic. The AML interpreter’s dynamic data object evaluation capability includes support for
programmatic evaluation, including accessing address spaces (for example, I/O or memory
accesses), calculation, and logical evaluation, to determine the result. Dynamic namespace objects
are known as “control methods”. OSPM “loads” or “unloads” an entire definition block as a logical
unit – adding to or removing the associated objects from the namespace. The DSDT is always loaded
by OSPM at boot time and cannot be unloaded. It contains a Definition Block named the
Differentiated Definition Block that contains implementation and configuration information OSPM
can use to perform power management, thermal management, or Plug and Play functionality that
goes beyond the information described by the ACPI hardware registers.
Definition Blocks can either define new system attributes or, in some cases, build on prior
definitions. A Definition Block can be loaded from system memory address space. One use of a
Definition Block is to describe and distribute platform version changes.
Definition blocks enable wide variations of hardware platform implementations to be described to
the ACPI-compatible OS while confining the variations to reasonable boundaries. Definition blocks
enable simple platform implementations to be expressed by using a few well-defined object names.
In theory, it might be possible to define a PCI configuration space-like access method within a
Definition Block, by building it from I/O space, but that is not the goal of the Definition Block
specification. Such a space is usually defined as a “built in” operator.
Some operators perform simple functions and others encompass complex functions. The power of
the Definition Block comes from its ability to allow these operations to be glued together in
numerous ways, to provide functionality to OSPM. The operators present are intended to allow
many useful hardware designs to be ACPI-expressed, not to allow all hardware designs to be
expressed.
Note: Industry standard PCs do not provide address space translations because of historical
compatibility issues.
• Software preserves the value of all reserved bits in hardware control registers by writing back
read values.
5.2.2 Compatibility
All versions of the ACPI tables must maintain backward compatibility. To accomplish this,
modifications of the tables consist of redefinition of previously reserved fields and values plus
appending data to the 1.0 tables. Modifications of the ACPI tables require that the version numbers
of the modified tables be incremented. The length field in the tables includes all additions and the
checksum is maintained for the entire length of the table.
provide a software component providing this support. In other cases support for the functional fixed
hardware may be developed directly by the OS vendor.
The hardware register definition was expanded, in ACPI 2.0, to allow registers to exist in address
spaces other than the System I/O address space. This is accomplished through the specification of an
address space ID in the register definition (see Section 5.2.3.2, “Generic Address Structure,” for
more information). When specifically directed by the CPU manufacturer, the system firmware
may define an interface as functional fixed hardware by indicating 0x7F (Functional Fixed
Hardware), in the address space ID field for register definitions. It is emphasized that functional
fixed hardware definitions may be declared in the ACPI system firmware only as indicated by the
CPU Manufacturer for specific interfaces as the use of functional fixed hardware requires specific
coordination with the OS vendor.
Only certain ACPI-defined interfaces may be implemented using functional fixed hardware and only
when the interfaces are common across machine designs for example, systems sharing a common
CPU architecture that does not support fixed hardware implementation of an ACPI-defined
interface. OEMs are cautioned not to anticipate that functional fixed hardware support will be
provided by OSPM differently on a system-by-system basis. The use of functional fixed hardware
carries with it a reliance on OS specific software that must be considered. OEMs should consult OS
vendors to ensure that specific functional fixed hardware interfaces are supported by specific
operating systems.
Note: FFH is permitted and applicable to both full and HW-reduced ACPI implementations.
The format of both the binary and string representations of UUIDs along with an algorithm to
generate them is specified in ISO/IEC 11578:1996 Information technology - Open Systems
Interconnection - Remote Procedure Call (RPC) and can be found as part of the Distributed
Computing Environment 1.1: Remote Procedure Call specification, which can be found in “Links to
ACPI-Related Documents” (http://uefi.org/acpi) under the heading "Universal Uniform Identifiers
(UUID)".
* These fields are only valid when the Revision value is 2 or above.
Length 4 4 The length of the table, in bytes, including the header, starting from
offset 0. This field is used to record the size of the entire table.
Revision 1 8 The revision of the structure corresponding to the signature field for
this table. Larger revision numbers are backward compatible to
lower revision numbers with the same signature.
Checksum 1 9 The entire table, including the checksum field, must add to zero to
be considered valid.
OEMID 6 10 An OEM-supplied string that identifies the OEM.
OEM Table ID 8 16 An OEM-supplied string that the OEM uses to identify the particular
data table. This field is particularly useful when defining a definition
block to distinguish definition block functions. The OEM assigns
each dissimilar table a new OEM Table ID.
OEM Revision 4 24 An OEM-supplied revision number. Larger numbers are assumed to
be newer revisions.
Creator ID 4 28 Vendor ID of utility that created the table. For tables containing
Definition Blocks, this is the ID for the ASL Compiler.
Creator Revision 4 32 Revision of utility that created the table. For tables containing
Definition Blocks, this is the revision for the ASL Compiler.
For OEMs, good design practices will ensure consistency when assigning OEMID and OEM Table
ID fields in any table. The intent of these fields is to allow for a binary control system that support
services can use. Because many support functions can be automated, it is useful when a tool can
programmatically determine which table release is a compatible and more recent revision of a prior
table on the same OEMID and OEM Table ID.
Table 5-30 and Table 5-31 contain the system description table signatures defined by this
specification. These system description tables may be defined by ACPI and documented within this
specification (Table 5-30) or they may be simply reserved by ACPI and defined by other industry
specifications (Table 5-31). This allows OS and platform specific tables to be defined and pointed to
by the RSDT/XSDT as needed. For tables defined by other industry specifications, the ACPI
specification acts as gatekeeper to avoid collisions in table signatures.
Table signatures will be reserved by the ACPI promoters and posted independently of this
specification in ACPI errata and clarification documents on the ACPI web site. Requests to reserve a
4-byte alphanumeric table signature should be sent to the email address [email protected] and should
include the purpose of the table and reference URL to a document that describes the table format.
Tables defined outside of the ACPI specification may define data value encodings in either little
endian or big endian format. For the purpose of clarity, external table definition documents should
include the endian-ness of their data value encodings.
Since reference URLs can change over time and may not always be up-to-date in this specification, a
separate document containing the latest known reference URLs can be found at “Links to ACPI-
Related Documents” (http://uefi.org/acpi), which should conspicuously be placed in the same
location as this specification.
“SLIT” System Locality Distance Section 5.2.17, “System Locality Distance Information
Information Table Table”
“SRAT” System Resource Affinity Table Section 5.2.16, “System Resource Affinity Table”
“SSDT” Secondary System Description Section 5.2.11.2, “Secondary System Description Table”
Table
“XSDT” Extended System Description Section 5.2.8, “Extended System Description Table”
Table
Note: If the HW_REDUCED_ACPI flag in the table is set, OSPM will ignore fields related to the ACPI
HW register interface: Fields at offsets 46 through 108 and 148 through 232, as well as FADT Flag
bits 1, 2, 3,7,8,13, 14, 16, and 17).
Note: In all cases where the FADT contains a 32-bit field and a corresponding 64-bit field the 64-bit field
should always be preferred by the OSPM if the 64-bit field contains a non-zero value which can be
used by the OSPM. In this case, the 32-bit field must be ignored regardless of whether or not it is
zero, and whether or not it is the same value as the 64-bit field. The 32-bit field should only be
used if the corresponding 64-bit field contains a zero value, or if the 64-bit value can not be used
by the OSPM subject to e.g. CPU addressing limitations.
>8 Reserved
SCI_INT 2 46 System vector the SCI interrupt is wired to in 8259 mode. On
systems that do not contain the 8259, this field contains the
Global System interrupt number of the SCI interrupt. OSPM is
required to treat the ACPI SCI interrupt as a sharable, level,
active low interrupt.
SMI_CMD 4 48 System port address of the SMI Command Port. During ACPI
OS initialization, OSPM can determine that the ACPI
hardware registers are owned by SMI (by way of the SCI_EN
bit), in which case the ACPI OS issues the ACPI_ENABLE
command to the SMI_CMD port. The SCI_EN bit effectively
tracks the ownership of the ACPI hardware registers. OSPM
issues commands to the SMI_CMD port synchronously from
the boot processor. This field is reserved and must be zero on
system that does not support System Management mode.
ACPI_ENABLE 1 52 The value to write to SMI_CMD to disable SMI ownership of
the ACPI hardware registers. The last action SMI does to
relinquish ownership is to set the SCI_EN bit. During the OS
initialization process, OSPM will synchronously wait for the
transfer of SMI ownership to complete, so the ACPI system
releases SMI ownership as quickly as possible. This field is
reserved and must be zero on systems that do not support
Legacy Mode.
ACPI_DISABLE 1 53 The value to write to SMI_CMD to re-enable SMI ownership
of the ACPI hardware registers. This can only be done when
ownership was originally acquired from SMI by OSPM using
ACPI_ENABLE. An OS can hand ownership back to SMI by
relinquishing use to the ACPI hardware registers, masking off
all SCI interrupts, clearing the SCI_EN bit and then writing
ACPI_DISABLE to the SMI_CMD port from the boot
processor. This field is reserved and must be zero on systems
that do not support Legacy Mode.
Note: [Hypervisor Vendor Identity ] A firmware implementer would place zero bytes into this field,
denoting that no hypervisor is present in the actual firmware.
Note: [Hypervisor Vendor Identity ] A hypervisor vendor that presents ACPI tables of its own construction
to a guest (for 'virtual' firmware or its 'virtual' platform), would provide its identity in this field.
Note: [Hypervisor Vendor Identity ] If a guest operating system is aware of this field it can consult it and
act on the result, based on whether it recognized the vendor and knows how to use the API that is
defined by the vendor.
* The description of HW_REDUCED_ACPI provided here applies to ACPI specifications 5.0 and later.
legacy devices if none are present. For example, if there are no ISA devices, an OS could skip code
that assumes the presence of these devices and their associated resources. These flags are used
independently of the ACPI namespace. The presence of other devices must be described in the ACPI
namespace as specified in Section 6, “Configuration.” These flags pertain only to IA-PC platforms.
On other system architectures, the entire field should be set to 0.
Table 5-36 Fixed ACPI Description Table Boot IA-PC Boot Architecture Flags
IAPC_BOOT_ARCH Bit Bit Description
length offset
LEGACY_DEVICES 1 0 If set, indicates that the motherboard supports user-visible
devices on the LPC or ISA bus. User-visible devices are devices
that have end-user accessible connectors (for example, LPT
port), or devices for which the OS must load a device driver so
that an end-user application can use a device. If clear, the OS
may assume there are no such devices and that all devices in the
system can be detected exclusively via industry standard device
enumeration mechanisms (including the ACPI namespace).
8042 1 1 If set, indicates that the motherboard contains support for a port
60 and 64 based keyboard controller, usually implemented as an
8042 or equivalent micro-controller.
VGA Not Present 1 2 If set, indicates to OSPM that it must not blindly probe the VGA
hardware (that responds to MMIO addresses A0000h-BFFFFh
and IO ports 3B0h-3BBh and 3C0h-3DFh) that may cause
machine check on this system. If clear, indicates to OSPM that it
is safe to probe the VGA hardware.
MSI Not Supported 1 3 If set, indicates to OSPM that it must not enable Message
Signaled Interrupts (MSI) on this platform.
PCIe ASPM Controls 1 4 If set, indicates to OSPM that it must not enable OSPM ASPM
control on this platform.
CMOS RTC Not 1 5 If set, indicates that the CMOS RTC is either not implemented, or
Present does not exist at the legacy addresses. OSPM uses the Control
Method Time and Alarm Namespace device instead.
Reserved 10 6 Must be 0.
Table 5-37 Fixed ACPI Description Table ARM Boot Architecture Flags
ARM_BOOT_ARCH Bit Bit Description
Length Offset
Byte Byte
Field Length Offset Description
Firmware Waking 4 12 This field is superseded by the X_Firmware_Waking_Vector
Vector field.
The 32-bit address field where OSPM puts its waking vector.
Before transitioning the system into a global sleeping state,
OSPM fills in this field with the physical memory address of an
OS-specific wake function. During POST, the platform firmware
first checks if the value of the X_Firmware_Waking_Vector field
is non-zero and if so transfers control to OSPM as outlined in
the X_Firmware_Waking_vector field description below. If the
X_Firmware_Waking_Vector field is zero then the platform
firmware checks the value of this field and if it is non-zero,
transfers control to the specified address.
On PCs, the wake function address is in memory below 1 MB
and the control is transferred while in real mode. OSPM’s wake
function restores the processors’ context.
For IA-PC platforms, the following example shows the
relationship between the physical address in the Firmware
Waking Vector and the real mode address the BIOS jumps to.
If, for example, the physical address is 0x12345, then the BIOS
must jump to real mode address 0x1234:0x0005. In general this
relationship is
Real-mode address =
Physical address>>4 : Physical address and 0x000F
Notice that on IA-PC platforms, A20 must be enabled when the
BIOS jumps to the real mode address derived from the physical
address stored in the Firmware Waking Vector.
Global Lock 4 16 This field contains the Global Lock used to synchronize access
to shared hardware resources between the OSPM environment
and an external controller environment (for example, the SMI
environment). This lock is owned exclusively by either OSPM or
the firmware at any one time. When ownership of the lock is
attempted, it might be busy, in which case the requesting
environment exits and waits for the signal that the lock has
been released. For example, the Global Lock can be used to
protect an embedded controller interface such that only OSPM
or the firmware will access the embedded controller interface at
any one time. See Section 5.2.10.1, “Global Lock,” for more
information on acquiring and releasing the Global Lock.
Flags 4 20 Firmware control structure flags. See Table 5-39 for a
description of this field.
Byte Byte
Field Length Offset Description
X Firmware Waking 8 24 64-bit physical address of OSPM’s Waking Vector.
Vector Before transitioning the system into a global sleeping state,
OSPM fills in this field and the OSPM Flags field to describe the
waking vector. OSPM populates this field with the physical
memory address of an OS-specific wake function. During
POST, the platform firmware checks if the value of this field is
non-zero and if so transfers control to OSPM by jumping to this
address after creating the appropriate execution environment,
which must be configured as follows:
For 64-bit Itanium™ Processor Family (IPF) -based platforms:
Interrupts must be disabled
The processor must have psr.i set to 0. See the Intel® ItaniumTM
Architecture Software Developer’s Manual for more information.
Memory address translation must be disabled
The processor must have psr.it, psr.dt, and psr.rt set to 0. See
the Intel® ItaniumTM Architecture Software Developer’s Manual
for more information.
For IA 32 and x64 platforms, platform firmware is required to
support a 32 bit execution environment. Platform firmware can
additionally support a 64 bit execution environment. If platform
firmware supports a 64 bit execution environment, firmware
inspects the OSPM Flags during POST. If the 64BIT_WAKE_F
flag is set, the platform firmware creates a 64 bit execution
environment. Otherwise, the platform firmware creates a 32 bit
execution environment.
For 64 bit execution environment:
Interrupts must be disabled
EFLAGS.IF set to 0
Long mode enabled
Paging mode is enabled and physical memory for waking vector
is identity mapped (virtual address equals physical address)
Waking vector must be contained within one physical page
Selectors are set to be flat and are otherwise not used
For 32 bit execution environment:
Interrupts must be disabled
EFLAGS.IF set to 0
Memory address translation / paging must be disabled
4 GB flat address space for all segment registers
Version 1 32 2–Version of this table
Reserved 3 33 This value is zero.
OSPM Flags 4 36 OSPM enabled firmware control structure flags. Platform
firmware must initialize this field to zero. See Table 5-40 for a
description of the OSPM control structure feature flags.
Reserved 24 40 This value is zero.
The following code sequence is used by both OSPM and the firmware to acquire ownership of the
Global Lock. If non-zero is returned by the function, the caller has been granted ownership of the
Global Lock and can proceed. If zero is returned by the function, the caller has not been granted
ownership of the Global Lock, the “pending” bit has been set, and the caller must wait until it is
signaled by an interrupt event that the lock is available before attempting to acquire access again.
Note: In the examples that follow, the “GlobalLock” variable is a pointer that has been previously
initialized to point to the 32-bit Global Lock location within the FACS.
AcquireGlobalLock:
mov ecx, GlobalLock ; ecx = Address of Global Lock in FACS
acq10: mov eax, [ecx] ; Get current value of Global Lock
ret
The following code sequence is used by OSPM and the firmware to release ownership of the Global
Lock. If non-zero is returned, the caller must raise the appropriate event to the other environment to
signal that the Global Lock is now free. Depending on the environment, this signaling is done by
setting the either the GBL_RLS or BIOS_RLS within their respective hardware register spaces. This
signal only occurs when the other environment attempted to acquire ownership while the lock was
owned.
ReleaseGlobalLock:
mov ecx, GlobalLock ; ecx = Address of Global Lock in FACS
rel10: mov eax, [ecx] ; Get current value of Global Lock
; If one is returned (we were pending) the caller must signal that the
; lock has been released using either GBL_RLS or BIOS_RLS as appropriate
ret
Although using the Global Lock allows various hardware resources to be shared, it is important to
notice that its usage when there is ownership contention could entail a significant amount of system
overhead as well as waits of an indeterminate amount of time to acquire ownership of the Global
Lock. For this reason, implementations should try to design the hardware to keep the required usage
of the Global Lock to a minimum.
The Global Lock is required whenever a logical register in the hardware is shared. For example, if
bit 0 is used by ACPI (OSPM) and bit 1 of the same register is used by SMI, then access to that
register needs to be protected under the Global Lock, ensuring that the register’s contents do not
change from underneath one environment while the other is making changes to it. Similarly if the
entire register is shared, as the case might be for the embedded controller interface, access to the
register needs to be protected under the Global Lock.
In theory, it might be possible to define something like PCI configuration space in a Definition
Block by building it from I/O space, but that is not the goal of the definition block. Such a space is
usually defined as a “built in” operator.
Some AML operators perform simple functions, and others encompass complex functions. The
power of the Definition block comes from its ability to allow these operations to be glued together in
numerous ways, to provide functionality to OSPM.
The AML operators defined in this specification are intended to allow many useful hardware designs
to be easily expressed, not to allow all hardware designs to be expressed.
Note: To accommodate addressing beyond 32 bits, the integer type was expanded to 64 bits in ACPI
2.0, see Section 19.3.5, “ASL Data Types”. Existing ACPI definition block implementations may
contain an inherent assumption of a 32-bit integer width. Therefore, to maintain backwards
compatibility, OSPM uses the Revision field, in the header portion of system description tables
containing Definition Blocks, to determine whether integers declared within the Definition Block
are to be evaluated as 32-bit or 64-bit values. A Revision field value greater than or equal to 2
signifies that integers declared within the Definition Block are to be evaluated as 64-bit values. The
ASL writer specifies the value for the Definition Block table header’s Revision field via the ASL
Definition Block’s ComplianceRevision field. See Section 19.6.28, “DefinitionBlock (Declare
Definition Block)”, for more information. It is the responsibility of the ASL writer to ensure the
Definition Block’s compatibility with the corresponding integer width when setting the
ComplianceRevision field.
Note: Additional tables can only add data; they cannot overwrite data from previous tables.
This allows the OEM to provide the base support in one table and add smaller system options in
other tables. For example, the OEM might put dynamic object definitions into a secondary table such
that the firmware can construct the dynamic information at boot without needing to edit the static
DSDT. A SSDT can only rely on the DSDT being loaded prior to it.
Immediately after the Flags value in the MADT is a list of interrupt controller structures that declare
the interrupt features of the machine. The first byte of each structure declares the type of that
structure and the second byte declares the length of that structure.
ACPI 1 2 The OS associates this Local APIC Structure with a processor object
Processor UID in the namespace when the _UID child object of the processor's
device object (or the ProcessorId listed in the Processor declaration
operator) evaluates to a numeric value that matches the numeric
value in this field. Note that the use of the Processor declaration
operator is deprecated. See the compatibility note in Section 5.2.12.2
and see Section 19.6.109, “Processor (Declare Processor).”
APIC ID 1 3 The processor’s local APIC ID.
Flags 4 4 Local APIC flags. See Table 5-47 for a description of this field.
IRQs 0-15 unless overrides are used. This allows a platform to support OSPM implementations that
use the APIC model as well as OSPM implementations that use the 8259 model (OSPM will only
use one model; it will not mix models).
When OSPM supports the 8259 model, it will assume that all interrupt descriptors reporting global
system interrupts 0-15 correspond to 8259 IRQs. In the 8259 model all global system interrupts
greater than 15 are ignored. If OSPM implements APIC support, it will enable the APIC as described
by the APIC specification and will use all reported global system interrupts that fall within the limits
of the interrupt inputs defined by the I/O APIC structures. For more information on hardware
resource configuration see Section 6, “Configuration.”
The MPS INTI flags listed in Table 5-51 are identical to the flags used in Table 4-10 of the MPS
version 1.4 specifications. The Polarity flags are the PO bits and the Trigger Mode flags are the EL
bits.
Interrupt Source Overrides are also necessary when an identity mapped interrupt input has a non-
standard polarity.
Note: You must have an interrupt source override entry for the IRQ mapped to the SCI interrupt if this
IRQ is not identity mapped. This entry will override the value in SCI_INT in FADT. For example, if
SCI is connected to IRQ 9 in PIC mode and IRQ 9 is connected to INTIN11 in APIC mode, you
should have 9 in SCI_INT in the FADT and an interrupt source override entry mapping IRQ 9 to
INTIN11.
If defined, OSPM must use the information contained in the I/O SAPIC structure instead of the
information from the I/O APIC structure.
If both I/O APIC and an I/O SAPIC structures exist in an MADT, the OEM/platform firmware
writer must prevent “mixing” I/O APIC and I/O SAPIC addresses. This is done by ensuring that
there are at least as many I/O SAPIC structures as I/O APIC structures and that every I/O APIC
structure has a corresponding I/O SAPIC structure (same APIC ID).
Flags 4 8 Local SAPIC flags. See Table 5-48 for a description of this field.
ACPI Processor 4 12 OSPM associates the Local SAPIC Structure with a processor
UID Value object declared in the namespace using the Device statement,
when the _UID child object of the processor device evaluates to a
numeric value, by matching the numeric value with this field.
ACPI Processor >=1 16 OSPM associates the Local SAPIC Structure with a processor
UID String object declared in the namespace using the Device statement,
when the _UID child object of the processor device evaluates to a
string, by matching the string with this field. This value is stored as a
null-terminated ASCII string.
Note: [Compatibility note] On some legacy OSes, Logical processors with APIC ID values less than 255
(whether in XAPIC or X2APIC mode) must use the Processor Local APIC structure to convey their
APIC information to OSPM, and those processors must be declared in the DSDT using the
Processor() keyword. Logical processors with APIC ID values 255 and greater must use the
Processor Local x2APIC structure and be declared using the Device() keyword. See
Section 19.6.109 "Processor (Declare Processor)" for more information.
OSPM does not expect the information provided in this table to be updated if the processor
information changes during the lifespan of an OS boot. While in the sleeping state, logical
processors must not be added or removed, nor can their X2APIC ID or x2APIC Flags change. When
a logical processor is not present, the processor local X2APIC information is either not reported or
flagged as disabled.
The format of x2APIC structure is listed in Table 5-59.
Local x2APIC 1 8 Local x2APIC interrupt input LINTn to which NMI is connected.
LINT#
Reserved 3 9 Reserved - Must be zero.
Global System Interrupt Vector Interrupt Input Lines ‘System Vector Base’
(ie ACPI PnP IRQ# ) on IOAPIC reported in IOAPIC Struc
24 input
0 INTI_0 0
IOAPIC .
.
.
23 INTI_23
16 input
24 INTI_0 24
IOAPIC .
.
.
39 INTI_15
24 input 40 INTI_0 40
IOAPIC .
51 INTI_11
.
55 INTI_23
0 IRQ0
.
M aster IRQ3
8259
.
7 IRQ7
8 IR8
Slave .
8259 IRQ11
.
15 IRQ15
The other interrupt model is the standard AT style mentioned above which uses ISA IRQs attached
to a master slave pair of 8259 PICs. The system vectors correspond to the ISA IRQs. The ISA IRQs
and their mappings to the 8259 pair are part of the AT standard and are well defined. This mapping
is depicted in Figure 5-24.
ACPI OSPM implementations supporting Embedded Controller devices must also support the
ECDT. ACPI 1.0 OSPM implementation will not recognize or make use of the ECDT. The
following example code shows how to detect whether the Embedded Controller operation regions
are available in a manner that is backward compatible with prior versions of ACPI/OSPM.
Device(EC0) {
Name(REGC,Ones)
Method(_REG,2) {
If(Lequal(Arg0, 3)) {
Store(Arg1, REGC)
}
}
}
Method(ECAV,0) {
If(Lequal(REGC,Ones)) {
If(LgreaterEqual(_REV,2)) {
Return(One)
}
Else {
Return(Zero)
}
}
Else {
Return(REGC)
}
}
To detect the availability of the region, call the ECAV method. For example:
If (\_SB.PCI0.EC0.ECAV()) {
...regions are available...
}
else {
...regions are not available...
}
On x86-based platforms, the OSPM uses the Hot Pluggable bit to determine whether it should shift
into PAE mode to allow for insertion of hot-plug memory with physical addresses over 4 GB.
declaration of a GIC ITS in the MADT, see Section 5.2.12.18 for details. The following table
provides the details of the GIC ITS Affinity structure.
…… ……
may not be necessary for OSPM to poll all processors in the system to retrieve complete error
information. This optional table provides information that allows OSPM to poll only the processors
necessary for a complete report of the platform’s corrected platform error information.
Table 5-86 PCC Command Codes used by RASF Platform Communication Channel
Command Description
0x00 Reserved
Command Description
0x02-0xFF All other values are reserved.
0 Hardware based patrol Indicates that the platform supports hardware based patrol scrub of
scrub supported DRAM memory
1 Hardware based patrol Indicates that the platform supports hardware based patrol scrub of
scrub supported and DRAM memory and platform exposes this capability to software
exposed to software using this RASF mechanism
2 CPU Cache Flush to Indicates that platform ensures the entire CPU store data path is
NVDIMM Durability on flushed to persistent memory on system power loss.
Power Loss Capable
3 Memory Controller Flush Indicates that platform provides mechanisms to automatically flush
to NVDIMM Durability on outstanding write data from the memory controller to persistent
Power Loss Capable memory in the event of platform power loss.
Note: If bit 2 is set then this bit shall be set as well.
4 Byte Addressable Indicates that platform supports mirroring multiple byte addressable
Persistent Memory persistent memory regions together. If this feature is supported and
Hardware Mirroring enabled, healthy hardware mirrored interleave sets will have the
Capable EFI_MEMORY_MORE_RELIABLE Address Range Memory
Mapping Attribute set in the System Physical Address Range
structure in the NFIT table.
5-127 Reserved Reserved for future use
Memory Power
Node Structure
Memory Power
State Structure
Flag, Mem Power Node Id ,
Power State Value len etc ..
(m0, M1, M2…)
Address range (low, high
Power State address bits , length low ,
Information Index high)
MPST Top Memory Power State
Memory Power State - 0 level Structure Characteristics Structure
Flags
Header etc..
Power State Value Memory Power State - M Avg. Power Consumed
Memory Power State
(M0, M1, M2, …) Command fields ...
MPN-Y
Table 5-90 PCC Command Codes used by MPST Platform Communication Channel
Command Description
0x00-0x02 All other values are reserved.
0b = inactive
1b = background memory activity is in progress
Note: OSPM should use the ratio of computed memory power consumed to expected average power
consumed in determining the memory power management action.
MPS1-MPSn states are characterized by non-zero exit latency for exit from the state to MPS0. These
states could require explicit OSPM-initiated entry and exit, explicit OSPM-initiated entry but
autonomous exit or autonomous entry and exit. In all three cases, these states require explicit OSPM
action to isolate and free the memory address range for the corresponding memory power node.
Transitions to more aggressive memory power states (for example, from MPS1 to MPS2) can be
entered on progressive idling but require transition through MPS0 (i.e. MPS1MPS0MPS2).
Power state transition diagram is shown in Figure 5-26.
It is possible that after OSPM request a memory power state, a brief period of activity returns the
memory power node to MPS0 state . If platform is capable of returning to a memory power state on
subsequent period of idle, the platform must treat the previously requested memory power state as a
persistent hint.
MPS0
Exit
Enter
Exit
Enter Enter
Exit
The following table enumerates the power state values that a node can transition to.
GetMemoryPowerState: The following sequence needs to be done to get the current memory power
state
1. Write target POWER NODE ID value to MEMORY_POWER_NODE_ID register of PCC sub
channel.
2. Write GET (See Table 5-91) to MEMORY_POWER_STATE register of PCC sub channel.
3. Write PCC EXECUTE (See Table 5-90) to PCC Command register for the PCC sub channel.
4. OSPM rings the door bell by writing to Doorbell register.
5. Platform completes the request and will generate SCI to indicate that command is complete.
6. OSPM reads Status register for the PCC sub channel and confirms that the command was
successfully completed.
7. OSPM reads POWER STATE from POWER_STATE_ID register of PCC sub channel.
system memory address range(s). A Memory Power Node is uniquely identified by Memory Power
Node ID.
Note that memory power node structure defined in Table 5-94 can only represent a single address
range. This address range should be 4K aligned. If a Memory Power Node contains more than one
memory address range (i.e. non-contiguous range), firmware must construct a Memory power Node
structure for each of the memory address ranges but specify the same Memory Power Node ID in all
the structures.
Memory Power Nodes are not hierarchical. However, a given memory address range covered by a
Memory power node could be fully covered by another memory power node if that nodes memory
address range is inclusive of the other node’s range. For example, memory power node MPN0 may
cover memory address range 1G-2G and memory power node MPN1 covers 1-4G. Here MPN1
memory address range also comprehends the range covered by MPN0.
OSPM is expected to identify the memory power node(s) that corresponds to the maximum memory
address range that OSPM is able to power manage at a given time. For example, if MPN0 covers 1G-
2G and MPN1 covers 1-4G and OSPM is able to power manage 1-4G, it should select MPN1. If
MPN0 is in a non-active memory power state, OSPM must move MPN0 to MPS0 (Active state)
before placing MPN1 in desired Memory Power State. Further, MPN1 can support more power
states than MPN0. If MPN1 is in such a state , say MPS3 , that MPN0 does not support, software
must not query MPN0. If queried, MPN0 will return "not Valid" until MPN1 returns to MPS0.
Note: [Implementation Note] In general, memory nodes corresponding to larger address space ranges
correspond to higher memory aggregation (e.g. memory covered by a DIMM vs. memory covered
by a memory channel) and hence typically present higher power saving opportunities.
Scope (\_SB) {
Device (MEM0) {
Name (_HID, EISAID (“PNP0C80”))
Name (_CRS, ResourceTemplate () {
QwordMemory (
ResourceConsumer,
,
MinFixed,
MaxFixed,
Cacheable,
ReadWrite,
0xFFFFFFF,
0x10000000,
0x30000000,
0, , ,
)
})
}
}
The memory power state table (MPST) is a static structure created for all memory objects
independent of hot plug status (online or offline) during initialization. The OSPM will populate the
MPST table during the boot. If hot-pluggable flag is set for a given memory power node in MPST
table, OSPM will not use this node till physical presence of memory is communicated through ACPI
notification mechanism.
The association between memory device object (e.g. MEM0) to the appropriate memory power node
id in the MPST table is determined by comparing the address range specified using _CRS method
and address ranges configured in the MPST table entries. This association needs to be identified by
OSPM as part of ACPI memory hot plug implementation. When memory device is hot added, as part
of existing acpi driver for memory hot plug, OSPM will scan device object for _CRS method and
get the relevant address ranges for the given memory object, OSPM will determine the appropriate
memory power node ids based on the address ranges from _CRS and enable it for power
management and memory coalescing.
Similarly when memory is hot removed, the corresponding memory power nodes will be disabled.
Flags 2 4 Bit [0] – set to 1 to indicate that this is a top level aggregator
device. This device must be counted in the number of top level
aggregator devices in PMTT table and must be surfaces via
PMTT.
Bit [0] – 0 indicates that this is not a top level aggregator device.
Bit [1] - 1 indicates a physical element of the topology.
0 indicates a logical element of topology
Bit [2] and [3] –
• 00 - Indicates that all components aggregated by this device
implement volatile memory
• 01 - Indicates that components aggregated by this device
implement both volatile and non-volatile memory
• 10 - Indicates that all components aggregated by this device
implement non-volatile memory
• 11 - Reserved
Bits [15:4] Reserved, must be zero
Reserved 2 6 Reserved, must be zero.
Type Specific Data __ 8 Type specific data. Interpretation of this data is specific to the
type of the memory aggregator device. See Table 5-101,
Table 5-102, and Table 5-103.
The BGRT is a dynamic ACPI table that enables boot firmware to provide OPSM with a pointer to
the location in memory where the boot graphics image is stored.
5.2.22.1 Version
The version field identifies which revision of the BGRT table is implemented. The version field
should be set to 1.
5.2.22.2 Status
Table 5-105 Status Description Field
Offset Field Name
Bit 0 Displayed
The status field contains information about the current status of the table. The Valid bit is bit 0 of
the lowest byte. It should be set to 1 while the image resource is displayed on the screen, and set to
0 while it is not displayed.
All other bits are reserved.
The Image type field contains information about the format of the image being returned. If the
value is 0, the Image Type is Bitmap. The format for a Bitmap is defined atthe reference located in
“Links to ACPI-Related Documents” (http://uefi.org/acpi) under the heading "Types of Bitmaps".
All other values not defined in the table are reserved for future use.
Image
0x0000 Firmware Record containing a pointer to the Basic Boot Performance Data
Basic Boot Record.
Performance
Pointer
Record
0x0001 S3 Record containing a pointer to an S3 Performance Table.
Performance
Table Pointer
Record
0x0002 – 0x0FFF Reserved Reserved for ACPI specification usage.
0x1000 – 0x1FFF Reserved Reserved for Platform Vendor usage.
0x2000 – 0x2FFF Reserved Reserved for Hardware Vendor usage.
0x3000 – 0x3FFF Reserved Reserved for platform firmware Vendor usage.
0x4000 – 0xFFFF Reserved Reserved for future use
the system memory map. The record pointer is a required entry in the FPDT for any system
supporting the S3 state, and the pointer must point to a valid static physical address. Only one of
these records will be produced.
Table 5-119 Flag Definitions: Secure EL1 Timer, Non-Secure EL1 Timer, EL2 Timers, and
Virtual Timer
Secure EL1 timer Flags, Non-Secure EL1 timer Flags, EL2 timer Flags, and Virtual timer Flags all
have the same definition as follows.
Bit Field Bit Number Description
Offset of bits
Timer interrupt 0 1 This bit indicates the mode of the timer interrupt
Mode
1: Interrupt is Edge triggered
0: Interrupt is Level triggered
Timer Interrupt 1 1 This bit indicates the polarity of the timer interrupt
polarity
1: Interrupt is Active low
0: Interrupt is Active high
The GTDT Platform Timer Structure [] field is an array of Platform Timer Type structures, each of
which describes the configuration of an available platform timer. These timers are in addition to the
per-processor timers described above them in the GTDT.
The first byte of each structure declares the type of that structure and the second and third bytes
declare the length of that structure.
Table 5-123 Flag Definitions: GT Block Physical Timers and Virtual timers
Bit Field Bit Number Description
Offset of bits
Timer interrupt 0 1 This bit indicates whether the timer is secure or non-secure:
Mode • 1: Timer is Secure
• 0: Timer is Non-secure. Non-secure access to the timer has
been enabled in CNTCTLBase.CNTNSAR.
Timer Interrupt 1 1 This bit indicates the polarity of the timer interrupt
polarity
1: Interrupt is Active low
0: Interrupt is Active high
1: Timer is Secure
0: Timer is Non-secure
Always-on 1 1 This bit indicates the always-on capability of the Physical and
Capability Virtual Timers implementation.
1: This timer is guaranteed to assert its interrupt and wake a
processor, regardless of the processor’s power state. All of the
methods by which an ARM Generic Timer may generate an
interrupt must be supported, and must be capable of waking the
processor.
0: This timer may lose context or may not be guaranteed to assert
interrupts when its associated processor enters a low-power state.
Reserved 2 30 Reserved, must be zero.
1: Timer is Secure
0: Timer is Non-secure
Reserved 3 29 Reserved, must be zero.
7. Flush Hint Address Structure(s) (see Section 5.2.25.8) – Describes special system physical
addresses that when written help achieve durability for writes to NVDIMM regions.
Figure 5-28 illustrates the above structures and how they are associated with each other.
ACPI NVM SMBIOS
Root Management SPA Range SPA Range Structure Index
Device Information Structure(s)
(in ACPI name Structure(s)
space)
NVDIMM
Implicit
Region Mapping
Association
Structure(s)
Interleave Structure
Interleave Index
Structure(s)
NFIT Device Handle
Flush Hint
NVDIMM
NVDIMM Block Data Address
NVDIMM Control Structure(s) Control Region
Window Region
Region Structure(s) Structure Index
Structure(s)
NVDIMM Control Region
Structure Index
Each NFIT Structure must start with a 2 byte Type field followed by a 2 byte length field. This
allows OSPM to ignore unrecognized types. Supported NFIT Structure types are listed in Table 5-
128.
The following GUIDs are used to describe the Address Range Types currently defined in this
specification. Additional GUIDs can be generated to describe additional Address Range Types.
This GUID defines a volatile memory region:
{ 0x7305944F, 0xFDDA, 0x44E3, 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }
{ 0x66F0D379, 0xB4F3, 0x4074, 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }
This GUID defines a RAM Disk supporting a Virtual Disk Region – Volatile (a volatile memory
region that contains a raw disk format):
{ 0x77AB535A,0x45FC,0x624B,0x55,0x60,0xF7,0xB2,0x81,0xD1,0xF9,0x6E }
This GUID defines a RAM Disk supporting a Virtual CD Region – Volatile (a volatile memory
region that contains an ISO image):
{ 0x3D5ABD30,0x4175,0x87CE,0x6D,0x64,0xD2,0xAD,0xE5,0x23,0xC4,0xBB }
This GUID defines a RAM Disk supporting a Virtual Disk Region – Persistent (a persistent memory
region that contains a raw disk format):
{ 0x5CEA02C9,0x4D07,0x69D3,0x26,0x9F,0x44,0x96,0xFB,0xE0,0x96,0xF9 }
This GUID defines a RAM Disk supporting a Virtual CD Region – Persistent (a persistent memory
region that contains an ISO image):
{ 0x08018188,0x42CD,0xBB48,0x10,0x0F,0x53,0x87,0xD5,0x3D,0xED,0x3D }
Note: The Address Range Type GUID values used in the ACPI NFIT must match the corresponding
values in the Disk Type GUID of the RAM Disk device path that describe the same RAM Disk
Type. Refer to the UEFI specification for details.
Bit [6] set to 1 indicates that the platform firmware did not
map the NVDIMM containing the NVDIMM region into an
SPA range. This could be due to various issues such as a
device initialization error, device error, insufficient
hardware resources to map the device, or a disabled
device.
Implementation Note: In case of device error, Bit [4] might
be set along with Bit [6].
Note: Interleave Structure Index=0, Interleave Ways !=1 is to allow a PM range which is interleaved but
the actual interleave is not described but only provides the physical Memory Devices (as
described by SMBIOS Type 17) that contribute to the PM region. Typically, only block region
requires the interleave structure since software has to undo the effect of interleave.
This field shall be set to the value of the NVDIMM SPD Module
Manufacturer ID Code field a with byte 0 set to DDR4 SPD byte
320 and byte 1 set to DDR4 SPD byte 321.
Device ID 2 8 Identifier for the NVDIMM, assigned by the module vendor.
This field shall be set to the value of the NVDIMM SPD Module
Product Identifier field b with byte 0 set to SPD byte 192 and
byte 1 set to SPD byte 193.
Revision ID 2 10 Revision of the NVDIMM, assigned by the module vendor.
Byte 1 of this field is reserved.
Byte 0 of this field shall be set to the value of the NVDIMM SPD
Module Revision Code field a (i.e., SPD byte 349).
Subsystem 2 12 Vendor of the NVDIMM non-volatile memory subsystem
Vendor ID controller c.
This field shall be set to the value of the NVDIMM SPD Non-
Volatile Memory Subsystem Controller Vendor ID field b with
byte 0 set to SPD byte 194 and byte 1 set to SPD byte 195.
Subsystem 2 14 Identifier for the NVDIMM non-volatile memory subsystem
Device ID controller, assigned by the non-volatile memory subsystem
controller vendor.
This field shall be set to the value of the NVDIMM SPD Non-
Volatile Memory Subsystem Controller Device ID field b with
byte 0 set to SPD byte 196 and byte 1 set to SPD byte 197.
Subsystem 2 16 Revision of the NVDIMM non-volatile memory subsystem
Revision ID controller, assigned by the non-volatile memory subsystem
controller vendor.
Byte 0 of this field shall be set to the value of the NVDIMM SPD
Non-Volatile Memory Subsystem Controller Revision Code
field b (i.e., SPD byte 198).
Bit [0] set to one indicates that the Manufacturing Location field
and Manufacturing Date field are valid. Bit [0] set to zero
indicates that the Manufacturing Location field and
Manufacturing Date field are not valid and should be ignored.
This field shall be set to the value of the NVDIMM SPD Module
Manufacturing Location field a (SPD byte 322).
This field shall be set to the value of the NVDIMM SPD Module
Manufacturing Date field a with byte 0 set to SPD byte 323 and
byte 1 set to SPD byte 324.
This field shall be set to the value of the NVDIMM SPD Module
Serial Number field a with byte 0 set to SPD byte 325, byte 1
set to SPD byte 326, byte 2 set to SPD byte 327, and byte 3 set
to SPD byte 328.
Detect (SPD) for DDR4 SDRAM modules, DDR4 SPD Document Release 3 (forthcoming).
c In an NVDIMM, the module contains a non-volatile memory subsystem controller.
d
See JEDEC Standard No. 2233-22 Byte Addressable Energy Backed Interface, Version 1.0 (forthcoming).
Note: Logical offset in structure above refers to offset from the start of NVDIMM Control Region. The
logical offset is with respect to the device not with respect to system physical address space.
Software should construct the device address space (accounting for interleave) before applying
the block control start offset.
Note: Logical offset in table above refers to offset from the start of NVDIMM Data Window Region. The
logical offset is with respect to the device not with respect to system physical address space.
Software should construct the device address space (accounting for interleave) before applying
the Block Data Window start offset.
1. Note that the platform buffers do not include processor cache(s)! Processors typically include ISA to flush
data out of processor caches.
This provides a hint that the device should be initially protected by the secure OS, but it is
up to the discretion of the secure OS to allow the device to be handed off to the non-secure
OS when requested. Any OS component that expected the device to be operating in secure
mode would not correctly function after the handoff has been completed.
For example, a device may be used for variety of purposes, including user authentication.
If the secure OS determines that the necessary components for driving the device are
missing, it may release control of the device to the non-secure OS. In this case, the device
cannot be used for secure authentication, but other operations can correctly function.
3) Device not listed in SDEV
For example, the status quo is that no hints are provided. Any OS component that expected
the device to be in secure mode would not correctly function.
The OS vendor provides guidance on which devices can be listed in the SDEV table; in
other words, which devices are compatible with the secure OS, and which devices should
have the “allow handoff” flag set.
See table below for the SDEV ACPI definition.
Example:
The following table is an example for implementing a PCIe Endpoint Device Based Device
Structure for a PCIe device (Bus 1, Dev 2, Function 1), that is a child of a PCIe Root Port (Bus 0,
Dev 18, Function 0).
SRAT
Proximity Domain 1 Proximity
Proximity Domains
Proximity Domain 2
Domain # Memory
Subsystem
ACPI Root Proximity Domain n Address Range
Table Structure(s)
System Locality
Heterogeneous
Latency and
Memory Bandwidth
Attributes Memory
Information Proximity Domains
Table (HMAT) Structure(s)
Memory Side
Cache
Information
Structure(s)
Value Description
0 Memory Subsystem Address Range Structure
1 System Locality Latency and Bandwidth Information Structure
2 Memory Side Cache Information Structure
3-0xFFFF Reserved
The term “far memory” is used to denote the last level memory (Level 0 Memory) in the memory
hierarchy as shown in Table 5-30. The Level n Memory acts as memory side cache to Level n-1
Memory and Level n-1 memory acts as memory side cache for Level n-2 memory and so on. If Non-
Volatile memory is cached by memory side cache, then platform is responsible for persisting the
modified contents of the memory side cache corresponding to the Non-Volatile memory area on
power failure, system crash or other faults.
Reserved 2 2
Note: The Proximity Domain of System Physical Address ranges defined in the HMAT, NFIT and
SRAT tables shall match each other.
The firmware constructing Memory Subsystem Address Range Structure shall set Reservation hint
bit when permanent OS use of the memory would have detrimental effects on platform performance.
For instance, a platform might contain a device which requires access to High-Bandwidth Memory
in order to reach peak performance. Such a platform would set Reservation hint bit on the High-
Bandwidth Memory range to indicate to the OS that it shall ensure the memory remains available to
applications using the device.
Implementations should set the Reservation hint on an address range whenever general purpose
allocations should be directed to another resource. In other words, use the hint when it would be
detrimental to platform behavior if the OS did not reserve the entirety of the given address range for
an application specific usage. If the reservation hint is set, on runtime updates, unless memory is
removed, it is expected not be reset.
If Memory Hierarchy = 0
• 0 – Access Latency (if read and write latencies
are same)
• 1 – Read Latency
• 2 – Write Latency
• 3 – Access Bandwidth (if read and write
bandwidth are same)
• 4 – Read Bandwidth
• 5 – Write Bandwidth
If Memory Hierarchy = 1, 2, 3, or 4
• 0 – Access Hit Latency (if read hit and write hit
latencies are same)
• 1 – Read Hit Latency
• 2 – Write Hit Latency
• 3 – Access Hit Bandwidth (if read hit and write hit
latency are same)
• 4 – Read Hit Bandwidth
• 5 – Write Hit Bandwidth
Implementation Note: The Flag field in this table allows read latency, write latency, read bandwidth
and write bandwidth as well as Memory Hierarchy levels. Hence this structure could be repeated up
to 4 x number of Memory Hierarchy levels if memory attributes expressed for each memory level.
If both SLIT table and the HMAT table with the memory latency information are present, the OSPM
should attempt to use the data in the HMAT rather than the data in the SLIT.
Reserved 2 2
Memory Side Cache 8 16 Size of memory side cache in bytes for the above
Size memory proximity domain.
Cache Attributes 4 24 Bits [3:0] – Total Cache Levels for this Memory Proximity
Domain
• 0 – None
• 1 – One level cache
• 2 – Two level cache
• 3 – Three level cache
• Other values reserved
Implementation Note: A proximity domain should contain only one set of memory attributes. If
memory attributes differ, represent them in different proximity domains. If the Memory Side Cache
Information Structure is present, the System Locality Latency and Bandwidth Information Structure
shall contain latency and bandwidth information for each memory side cache level.
Table 5-146 PCC Commands Codes used by Platform Debug Trigger Table
Command Description
0x00 Execute Platform Debug Trigger (doorbell only – no command/response)
0x01 Execute Platform Debug Trigger (with vendor specific command in
communication space)
0x01-0xFF All other values are reserved.
Walking through the list of triggers in the PDTT, the OS may execute the following steps:
1. For Trigger 0, retrieves doorbell register address from PCCT per PCC subspace ID 4 and writes
to it with appropriate write/preserve mask. Since OS does not need to wait for completion, OS
does not need to send a PCC command and should ignore the PCC subspace base address
2. For Trigger 1, retrieves doorbell register address and PCC subspace address from PCCT per
PCC subspace ID 1. Since OS must wait for completion, OS must write PCC command (0x0)
and write to the doorbell register per section 14 and poll for the completion bit.
3. For Trigger 2, , retrieves doorbell register address from PCCT per PCC subspace ID 2 and writes
to it with appropriate write/preserve mask. Since OS does not need to wait for completion, OS
does not need to send a PCC command and should ignore the PCC subspace base address
4. For Trigger 3, retrieves doorbell register address and PCC subspace address from PCCT per
PCC subspace ID 3. Since OS must wait for completion, OS must write PCC command (0x0)
and write to the doorbell register per section 14 and poll for the completion bit.
Note: When wait for completion is necessary, the OS must poll bit zero (completion bit) of the status
field of that PCC channel (see Table 14-356 and Table 14-358).
OEM Revision 4 24 OEM revision of the PPTT for the supplied OEM Table ID.
Body
Processor topology - 36 List of processor topology structures
structure[N]
Note: processor hierarchy node structures do not provide means to distinguish whether a structure
represents a HW thread in an SMT system or a core. Mechanisms provided by the relevant processor
architecture should be used to discover this distinction.
Note: processors may be marked as disabled in the MADT. In this case, the corresponding processor
hierarchy node structures in PPTT should be considered as disabled. Additionally, all processor
hierarchy node structures representing a group of processors with all child processors disabled should be
considered as being disabled. All resources attached to disabled processor hierarchy node structures in
PPTT should also be considered disabled.
Length 1 1 24
Reserved 2 2 Must be zero
Flags 4 4 See Table 5-153
Next Level of Cache 4 8 Reference to next level of cache that is private to the
processor topology instance. The reference is encoded as the
difference between the start of the PPTT table and the start of
the cache type structure entry. This value will be zero if this
entry represents the last cache level appropriate to the the
processor hierarchy node structures using this entry.
Size 4 12 Size of the cache in bytes.
Number of sets 4 16 Number of sets in the cache
Associativity 1 20 Integer number of ways.
Length 1 1 26
Reserved 2 2 Must be zero
VENDOR_ID 4 8 This identifies the node vendor using the vendor ACPI ID as
described in the ACPI ID registry is available at http://
www.uefi.org/acpi_id_list
LEVEL_1_ID 8 12 Vendor specific value to identify first level unique node ID (e.g.
chip family ID)
LEVEL_2_ID 8 16 Vendor specific value to identify second level unique node ID
(e.g. chip ID)
MAJOR_REV 2 20 Vendor specific value to identify major revision of the node
MINOR_REV 2 22 Vendor specific value to identify minor revision of the node
SPIN_REV 2 24 Vendor specific value to identify spin revision of the node
Block can remove names from the namespace, so a name collision in an attempt to load a Definition
Block is considered fatal. The contents of the namespace changes only on a load or unload operation.
The namespace is hierarchical in nature, with each name allowing a collection of names “below” it.
The following naming conventions apply to all names:
• All names are a fixed 32 bits.
• The first byte of a name is inclusive of: ‘A’–‘Z’, ‘_’, (0x41–0x5A, 0x5F).
• The remaining three bytes of a name are inclusive of: ‘A’–‘Z’, ‘0’–‘9’, ‘_’, (0x41–0x5A, 0x30–
0x39, 0x5F).
• By convention, when an ASL compiler pads a name shorter than 4 characters, it is done so with
trailing underscores (‘_’). See the language definition for AML NameSeg in the ACPI Source
Language (ASL) Reference chapter.
• Names beginning with ‘_’ are reserved by this specification. Definition Blocks can only use
names beginning with ‘_’ as defined by this specification.
• A name proceeded with ‘\’ causes the name to refer to the root of the namespace (‘\’ is not part
of the 32-bit fixed-length name).
• A name proceeded with ‘^’ causes the name to refer to the parent of the current namespace (‘^’
is not part of the 32-bit fixed-length name).
Except for names preceded with a ‘\’, the current namespace determines where in the namespace
hierarchy a name being created goes and where a name being referenced is found. A name is located
by finding the matching name in the current namespace, and then in the parent namespace. If the
parent namespace does not contain the name, the search continues recursively upwards until either
the name is found or the namespace does not have a parent (the root of the namespace). This
indicates that the name is not found3.
An attempt to access names in the parent of the root will result in the name not being found.
There are two types of namespace paths: an absolute namespace path (that is, one that starts with a
‘\’ prefix), and a relative namespace path (that is, one that is relative to the current namespace). The
namespace search rules discussed above, only apply to single NameSeg paths, which is a relative
namespace path. For those relative name paths that contain multiple NameSegs or Parent Prefixes,
‘^’, the search rules do not apply. If the search rules do not apply to a relative namespace path, the
namespace object is looked up relative to the current namespace. For example:
ABCD //search rules apply
^ABCD //search rules do not apply
XYZ.ABCD //search rules do not apply
\XYZ.ABCD //search rules do not apply
2. For the most part, since the name space is hierarchical, typically the bulk of a dynamic definition file will
load into a different part of the hierarchy. The root of the name space and certain locations where interaction is being
designed are the areas in which extra care must be taken.
3. Unless the operation being performed is explicitly prepared for failure in name resolution, this is considered
an error and may cause the system to stop working.
All name references use a 32-bit fixed-length name or use a Name Extension prefix to concatenate
multiple 32-bit fixed-length name components together. This is useful for referring to the name of an
object, such as a control method, that is not in the scope of the current namespace.
The figure below shows a sample of the ACPI namespace after a Differentiated Definition Block has
been loaded.
Root
_HID – Device ID
Care must be taken when accessing namespace objects using a relative single segment name because
of the namespace search rules. An attempt to access a relative object recurses toward the root until
the object is found or the root is encountered. This can cause unintentional results. For example,
using the namespace described in Figure 5.5, attempting to access a _CRS named object from within
the \_SB_.PCI0.IDE0 will have different results depending on if an absolute or relative path name is
used. If an absolute pathname is specified (\_SB_.PCI0.IDE0._CRS) an error will result since the
object does not exist. Access using a single segment name (_CRS) will actually access the
\_SB_.PCI0._CRS object. Notice that the access will occur successfully with no errors.
5.3.2 Objects
All objects, except locals, have a global scope. Local data objects have a per-invocation scope and
lifetime and are used to process the current invocation from beginning to end.
The contents of objects vary greatly. Nevertheless, most objects refer to data variables of any
supported data type, a control method, or system software-provided functions.
Objects may contain a revision field. Successive ACPI specifications define object revisions so that
they are backwards compatible with OSPM implementations that support previous specifications /
object revisions. New object fields are added at the end of previous object definitions. OSPM
interprets objects according to the revision number it supports including all earlier revisions. As
such, OSPM expects that an object’s length can be greater than or equal to the length of the known
object revision. When evaluating objects with revision numbers greater than that known by OSPM,
OSPM ignores internal object fields values that are beyond the defined object field range for the
known revision.
PkgLength
Encodings of implicit length objects either have fixed length encodings or allow for nested
encodings that, at some point, either result in an explicit or implicit fixed length.
The PkgLength is encoded as a series of 1 to 4 bytes in the stream with the most significant two bits
of byte zero, indicating how many following bytes are in the PkgLength encoding. The next two bits
are only used in one-byte encodings, which allows for one-byte encodings on a length up to 0x3F.
Longer encodings, which do not use these two bits, have a maximum length of the following: two-
byte encodings of 0x0FFF, three-byte encodings of 0x0FFFFF, and four-byte length encodings of
0x0FFFFFFFF.
It is fatal for a package length to not fall on a logical boundary. For example, if a package is
contained in another package, then by definition its length must be contained within the outer
package, and similarly for a datum of implicit length.
Unnamed objects are used to populate the contents of named objects. Unnamed objects cannot be
created in the “root.” Unnamed objects can be used as arguments in control methods.
Control method execution may generate errors when creating objects. This can occur if a Method
that creates named objects blocks and is reentered while blocked. This will happen because all
named objects have an absolute path. This is true even if the object name specified is relative. For
example, the following ASL code segments are functionally identical.
(1)
Method (DEAD,) {
Scope (\_SB_.FOO) {
Name (BAR,) // Run time definition
}
}
(2)
Scope (\_SB_) {
Name (\_SB_. FOO.BAR,) // Load time definition
}
Notice that in the above example the execution of the DEAD method will always fail because the
object \_SB_.FOO.BAR is created at load time.
The term of "Definition Block level" is used to refer to the AML byte streams that are not contained
in any control method. Such AML byte streams can appear in the "root" scope or in the scopes
created/opened by the "Device, PowerResource, Processor, Scope and ThermalZone" operators.
Please refer to "Section 19.6, ASL Operator Reference"for detailed descriptions.
Not only the named objects, but all term objects (mathematical, logical, and conditional expressions,
etc., see "Section 20.2.5, Term Object Encoding") are allowed at the Definition Block level.
Allowing such executable AML opcodes at the Definition Block level allows BIOS writers to define
dynamic object lists according to the system settings. For example:
DefinitionBlock ("DSDT.aml", "DSDT", 2, "OEM", "FOOBOOK", 0x1000)
{
...
If (LEqual (CFG1 (), 1))
{
...
Scope (_SB.PCI0.XHC.RHUB)
{
...
If (LEqual (CFG2 (), 1))
{
…
Device (HS11)
{
…
If (LEqual (CFG3 (), 1))
{
…
Device (CAM0)
{
…
}
…
}
…
}
…
}
...
}
...
}
...
}
The interpretation of the definition block during the definition block loading is similar to the
interpretation of the control method during the control method execution.
FixedList refers to a list of known length that supplies data that all instances of a given ObjectType
must have. It is written as (a, b, c,), where the number of arguments depends on the specific
ObjectType, and some elements can be nested objects, that is (a, b, (q, r, s, t), d). Arguments to a
FixedList can have default values, in which case they can be skipped. Some ObjectTypes can have a
null FixedList.
VariableList refers to a list, not of predetermined length, of child objects that help define the parent.
It is written as {x, y, z, aa, bb, cc}, where any argument can be a nested object. ObjectType
determines what terms are legal elements of the VariableList. Some ObjectTypes can have a null
variable list.
For a detailed specification of the ASL language, see Section 19, “ACPI Source Language (ASL)
Reference.” For a detailed specification of the ACPI Control Method Machine Language (AML),
upon which the output of the ASL translator is based, see Section 20, “ACPI Machine Language
(AML) Specification.”
5.5.2.1 Arguments
Up to seven arguments can be passed to a control method. Each argument is an object that in turn
could be a “package” style object that refers to other objects. Access to the argument objects is
provided via the ASL ArgTerm (ArgX) language elements. The number of arguments passed to any
control method is fixed and is defined when the control method package is created.
Method arguments can take one of the following forms:
• An ACPI name or namepath that refers to a named object. This includes the LocalX and ArgX
names. In this case, the object associated with the name is passed as the argument.
• An ACPI name or namepath that refers to another control method. In this case, the method is
invoked and the return value of the method is passed as the argument. A fatal error occurs if no
object is returned from the method. If the object is not used after the method invocation it is
automatically deleted.
• A valid ASL expression. In the case, the expression is evaluated and the object that results from
this evaluation is passed as the argument. If this object is not used after the method invocation it
is automatically deleted.
Scope (\XYZ) {
Name (BAR, 5) // Creates \XYZ.BAR
Method (FOO, 1) {
Store (BAR, CREG) // same effect as Store (\XYZ.BAR, CREG)
Name (BAR, 7) // Creates \XYZ.FOO.BAR
Store (BAR, DREG) // same effect as Store (\XYZ.FOO.BAR, DREG
Name (\XYZ.FOOB, 3) // Creates \XYZ.FOOB
} // end method
} // end scope
The object \XYZ.BAR is a static object created when the table that contains the above ASL is
loaded. The object \XYZ.FOO.BAR is a dynamic object that is created when the Name (BAR, 7)
statement in the FOO method is executed. The object \XYZ.FOOB is a dynamic object created by
the \XYZ.FOO method when the Name (\XYZ.FOOB, 3) statement is executed. Notice that the
\XYZ.FOOB object is destroyed after the \XYZ.FOO method exits.
Note: Accessing an OpRegion may block, even if the OpRegion is not protected by a mutex. For
example, because of the slow nature of the embedded controller, an embedded controller
OpRegion field access may block.
PCI BAR Target operation regions are declared by providing the offset of the BAR within the PCI
device’s PCI configuration space. The BAR determines whether the actual access to the device
occurs through an I/O or Memory cycle, not by the declaration of the operation region. The length of
the region is similarly implied.
In the term OperationRegion(PBAR, PciBarTarget, 0x10, 0x4), the offset is the offset of the
BAR within the configuration space of the device. This would be an example of an operation region
that uses the first BAR in the device.
5.5.2.4.3.2 PCI Header Types and PCI BAR Target Operation Regions
PCI BAR Target operation regions may only be declared in the scope of PCI devices that have a PCI
Header Type of 0. PCI devices with other header types are bridges. The control of PCI bridges is
beyond the scope of ASL.
Length // TermArg=>Integer
)
Where:
• RegionName specifies a name for this IPMI network function (for example, “POWR”).
• RegionSpace must be set to IPMI (operation region type value 0x07).
• Offset is a word-sized value specifying the network function and initial command value offset
for the target device. The network function address is stored in the high byte and the command
value offset is stored in the low byte. For example, the value 0x3000 would be used for a device
with the network function of 0x06, and an initial command value offset of zero (0).
• Length is set to the 0x100 (256), representing the maximum number of possible command
values, for regions with an initial command value offset of zero (0). The difference of these two
values is used for regions with non-zero offsets. For example, a region with an Offset value of
0x3010 would have a corresponding Length of 0xF0 (0x100 minus 0x10).
For example, a Baseboard Management Controller will support power metering capabilities at the
network function 0x30, and IPMI commands to query the BMC device information at the network
function 0x06.
The following ASL code shows the use of the OperationRegion term to describe these IPMI
functions:
Device (IPMI)
{
Name(_HID, "IPI0001") // IPMI device
Name(_IFT, 0x1) // KCS system interface type
OperationRegion(DEVC, IPMI, 0x0600, 0x100) // Device info network function
OperationRegion(POWR, IPMI, 0x3000, 0x100) // Power network function
:
}
Notice that these operation regions in this example are defined within the immediate context of the
‘owning’ IPMI device. This ensures the correct operation region handler will be used, based on the
value returned by the _IFT object. Each definition corresponds to a separate network function, and
happens to use an initial command value offset of zero (0).
• AccessType must be set to BufferAcc. This indicates that access to field elements will be done
using a region-specific data buffer. For this access type, the field handler is not aware of the data
buffer’s contents which may be of any size. When a field of this type is used as the source
argument in an operation it simply evaluates to a buffer. When used as the destination, however,
the buffer is passed bi-directionally to allow data to be returned from write operations. The
modified buffer then becomes the response message of that command. This is slightly different
than the normal case in which the execution result is the same as the value written to the
destination. Note that the source is never changed, since it only represents a virtual register for a
particular IPMI command.
• LockRule indicates if access to this operation region requires acquisition of the Global Lock for
synchronization. This field should be set to Lock on system with firmware that may access the
BMC via IPMI, and NoLock otherwise.
• UpdateRule is not applicable to IPMI operation regions since each virtual register is accessed in
its entirety. This field is ignored for all IPMI field definitions.
IPMI operation regions require that all field elements be declared at command value granularity.
This means that each virtual register cannot be broken down to its individual bits within the field
definition.
Access to sub-portions of virtual registers can be done only outside of the field definition. This
limitation is imposed both to simplify the IPMI interface and to maintain consistency with the
physical model defined by the IPMI specification.
Since the system interface used for IPMI communication is determined by the _IFT object under the
IPMI device, there is no need for using of the AccessAs term within the field definition. In fact its
usage will be ignored by the operation handler.
For example, the register at command value 0xC1 for the power meter network function might
represent the command to set a BMC enforced power limit, while the register at command value
0xC2 for the same network function might represent the current configured power limit. At the same
time, the register at command value 0xC8 might represent the latest power meter measurement.
The following ASL code shows the use of the OperationRegion, Field, and Offset terms to represent
these virtual registers:
OperationRegion(POWR, IPMI, 0x3000, 0x100) // Power network function
Field(POWR, BufferAcc, NoLock, Preserve)
{
Offset(0xC1), // Skip to command value 0xC1
SPWL, 8, // Set power limit [command value 0xC1]
GPWL, 8, // Get power limit [command value 0xC2]
Offset(0xC8), // Skip to command value 0xC8
GPMM, 8 // Get power meter measurement [command value 0xC8]
}
Notice that command values are equivalent to the field element’s byte offset (for example,
SPWL=0xC1, GPWL=0xC2, GPMM=0xC8).
The IPMI data buffer is defined as a fixed-length 66-byte buffer that, if represented using a ‘C’-
styled declaration, would be modeled as follows:
typedef struct
{
BYTE Status; // Byte 0 of the data buffer
BYTE Length; // Byte 1 of the data buffer
BYTE[64]Data; // Bytes 2 through 65 of the data buffer
}
Where:
• Status (byte 0) indicates the status code of a given IPMI command. See Section 5.5.2.4.4.3,
“IPMI Status Code,” for more information.
• Length (byte 1) specifies the number of bytes of valid data that exists in the data buffer. Valid
Length values are 0 through 64. Before the operation is carried out, this value represents the
length of the request data buffer. Afterwards, this value represents the length of the result
response data buffer.
• Data (bytes 65-2) represents a 64-byte buffer, and is the location where actual data is stored.
Before the operation is carried out, this represents the actual request message payload.
Afterwards, this represents the response message payload as returned by the IPMI command.
For example, the following ASL shows the use of the IPMI data buffer to carry out a command for a
power function. This code is based on the example ASL presented in Section 5.5.2.4.4.1, “Declaring
IPMI Fields,” which lists the operation region and field definitions for relevant IPMI power
metering commands.
/* Create the IPMI data buffer */
Store(Store(BUFF, GPMM), BUFF) // Write the request into the GPMM command,
// then read the results
Notice the use of the CreateField primitives to access the data buffer’s sub-elements (Status,
Length, and Data), where Data (bytes 65-2) is ‘typecast’ into different fields (including the result
completion code).
The example above demonstrates the use of the Store() operator and the bi-directional data buffer to
invoke the actual IPMI command represented by the virtual register. The inner Store() writes the
request message data buffer to the IPMI operation region handler, and invokes the command. The
outer Store() takes the result of that command and writes it back into the data buffer, this time
representing the response message.
Note: This status code is different than the IPMI completion code, which is returned as the first byte of
the response message in the data buffer payload. The completion code is described in the
complete IPMI specification.
OperationRegion (
RegionName, // NameString
RegionSpace, // RegionSpaceKeyword
Offset, // TermArg=>Integer
Length // TermArg=>Integer
)
Where:
• RegionName specifies a name for this GeneralPurposeIO region (for example, “GPI1”).
• RegionSpace must be set to GeneralPurposeIO (operation region type value 0x08).
• Offset is ignored for the GeneralPurposeIO RegionSpace.
• Length is the maximum number of GPIO IO pins to be included in the Operation Region,
rounded up to the next byte.
GeneralPurposeIO OpRegions must be declared within the scope of the GPIO controller device
being accessed.
Where:
• RegionName specifies the operation region name previously declared.
• AccessType must be set to ByteAcc.
• LockRule indicates if access to this operation region requires acquisition of the Global Lock
for synchronization. Note that, on HW-reduced ACPI platforms, this field must be set to
NoLock.
• UpdateRule is not applicable to GeneralPurposeIO operation regions since Preserve is
always required. This field is ignored for all GeneralPurposeIO field definitions.
The following ASL code shows the use of the OperationRegion, Field, and Offset terms as they
apply to GeneralPurposeIO space.
Device (GPI2) //The OpRegion declaration, and the _REG method, must be in the controller’s
namespace scope
{
...//Other required stuff for the GPIO controller
OperationRegion(GPO2, GeneralPurposeIO, 0, 1) // Note: length of 1 means region is (or
// less than) 1 byte (8 pins) long
Method(_REG,2) {} // Track availability of GeneralPurposeIO space
} //End GPI2
Device (DEVB) //Access some GPIO Pins from this device scope to change the device's power mode
{
...//Other required stuff for this device
Name(_DEP, Package() {"\\_SB.GPI2"}) //OpRegion Dependency hint for OSPM
Field(\_SB.GPI2.GPO2, ByteAcc, NoLock, Preserve)
{
Connection (GMOD), // Re-Use an existing connection (defined elsewhere)
MODE, 2, // Power Mode
Connection (GpioIo(Exclusive, PullUp, , , , "\\_SB.GPI2") {7}),
Where:
• RegionName specifies a name for this region (for example, TOP1).
• RegionSpace must be set to GenericSerialBus (operation region type value 0x09).
• Offset specifies the initial command value offset for the target device. For example, the value
0x00 refers to a command value offset of zero (0). Raw protocols ignore this value.
• Length is set to the 0x100 (256), representing the maximum number of possible command
values.
Note: The Operation Region must be declared within the scope of the Serial Bus controller device.
The following ASL code shows the use of the OperationRegion, Field, and Offset terms as they
apply to SPB space.
<…>
Scope(\_SB.I2C){
OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100) // GenericSerialBus device at command
// offset 0x00
Where:
• RegionName specifies the operation region name previously defined for the device.
• AccessType must be set to BufferAcc. This indicates that access to field elements will be done
using a region-specific data buffer. For this access type, the field handler is not aware of the data
buffer’s contents which may be of any size. When a field of this type is used as the source
argument in an operation it simply evaluates to a buffer. When used as the destination, however,
the buffer is passed bi-directionally to allow data to be returned from write operations. The
modified buffer then becomes the execution result of that operation. This is slightly different
than the normal case in which the execution result is the same as the value written to the
destination. Note that the source is never changed, since it could be a read only object (see
Section 5.5.2.4.6.2, “Declaring an GenericSerialBus Data Buffer” and Section 19.2.5, “Opcode
Terms”).
• LockRule indicates if access to this operation region requires acquisition of the Global Lock for
synchronization. This field should be set to Lock on system with firmware that may access the
GenericSerialBus, and NoLock otherwise. On Hardware-reduced ACPI platforms, there is not a
global lock so this parameter is ignored.
• UpdateRule is not applicable to GenericSerialBus operation regions since each virtual register is
accessed in its entirety. This field is ignored for all GenericSerialBus field definitions.
GenericSerialBus operation regions require that all field elements be declared at command value
granularity. This means that each virtual register cannot be broken down to its individual bits within
the field definition.
Access to sub-portions of virtual registers can be done only outside of the field definition. This
limitation is imposed to simplify the GenericSerialBus interface.
GenericSerialBus protocols are assigned to field elements using the AccessAs term within the field
definition. The syntax for this term (from Section 19.2.3, “ASL Root and SecondaryTerms”) is
described below.
AccessAs(
AccessType, //AccessTypeKeyword
AccessAttribute //Nothing | ByteConst | AccessAttribKeyword
)
Where:
• AccessType must be set to BufferAcc.
• AccessAttribute indicates the GenericSerialBus protocol to assign to command values that
follow this term. SeeSection 5.5.2.4.6.3, “Using the GenericSerialBus Protocols,” for a listing of
the GenericSerialBus protocols.
An AccessAs term must appear in a field definition to set the initial GenericSerialBus protocol for
the field elements that follow. A maximum of one GenericSerialBus protocol may be defined for
each field element. Devices supporting multiple protocols for a single command value can be
modeled by specifying multiple field elements with the same offset (command value), where each
field element is preceded by an AccessAs term specifying an alternate protocol.
For GenericSerialBus operation regions, connection attributes must be defined for each set of field
elements. GenericSerialBus resources are assigned to field elements using the Connection term
within the field definition. The syntax for this term (from Section 19.6.15 “Connection (Declare
Field Connection Attributes)”) is described below.
Connection (ConnectionResourceObj)
Where:
• ConnectionResourceObj points to a Serial Bus Resource Connection Descriptor (see
Section 6.4.3.8.2, “Serial Bus Connection Resource Descriptors” for valid types), or a named
object that specifies a buffer field containing the connection resource information.
Each Field definition references the initial command offset specified in the operation region
definition. The offset is iterated for each subsequent field element defined in that respective Field. If
a new connection is described in the same Field definition, the offset will not be returned to its initial
value and a new Field must be defined to inherit the initial command value offset from the operation
region definition. The following example illustrates this point.
<…>
OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100) //Initial offset is 0
Connection(I2CSerialBusV2(0x5c,,100000,, "\_SB.I2C",,,,,RawDataBuffer(){3,1}))
Offset(0x0),
AccessAs(BufferAcc, AttribBytes (12)),
TS1, 8 //TS1 at command value offset 2
}
<…>
For GenericSerialBus operation regions, this data buffer is defined as an arbitrary length buffer that,
if represented using a ‘C’-styled declaration, would be modeled as follows:
typedef struct
{
BYTEStatus; // Byte 0 of the data buffer
BYTELength; // Byte 1 of the data buffer
BYTE[x-1]Data; // Bytes 2-x of the arbitrary length data buffer,
} // where x is the last index of the overall buffer
Where:
• Status (byte 0) indicates the status code of a given GenericSerialBus transaction.
• Length (byte 1) specifies the number of bytes of valid data that exists in the data buffer. Use of
this field is only defined for the Read/Write Block protocol. For other protocols—where the data
length is implied by the protocol—this field is reserved.
• Data (bytes 2-x) represents an arbitrary length buffer, and is the location where actual data is
stored.
For example, the following ASL shows the use of the GenericSerialBus data buffer for performing
transactions to a Smart Battery device.
/* Create the GenericSerialBus data buffer */
Name(BUFF, Buffer(34){}) // Create GenericSerialBus data buffer as BUFF
CreateByteField(BUFF, 0x00, STAT) // STAT = Status (Byte)
CreateByteField(BUFF, 0x01, LEN) // LEN = Length (Byte)
CreateWordField(BUFF, 0x02, DATW) // DATW = Data (Word – Bytes 2 & 3)
CreateField(BUFF, 0x10, 256, DBUF) // DBUF = Data (Block – Bytes 2-33)
Notice the use of the CreateField primitives to access the data buffer’s sub-elements (Status,
Length, and Data), where Data (bytes 2-33) is ‘typecast’ as both word (DATW) and block (DBUF)
data.
The example above demonstrates the use of the Store() operator to invoke a Read Block transaction
to obtain the name of the battery manufacturer. Evaluation of the source operand (MFGN) results in
a 34-byte buffer that gets copied by Store() to the destination buffer (BUFF).
Capturing the results of a write operation, for example to check the status code, requires an
additional Store() operator, as shown below.
Note that the outer Store() copies the results of the Write Block transaction back into BUFF. This is
the nature of BufferAcc’s bi-directionality. It should be noted that storing (or parsing) the result of a
GenericSerialBus Write transaction is not required although useful for ascertaining the outcome of a
transaction.
GenericSerialBus Process Call protocols require similar semantics due to the fact that only
destination operands are passed bi-directionally. These transactions require the use of the double-
Store() semantics to properly capture the return results.
In this example, a single field element (FLD0) at offset 0 is defined to represent the protocol’s data
byte. Access to FLD0 will cause a GenericSerialBus transaction to occur to the device. Reading the
field results in a Receive Byte, and writing to the field results in a Send Byte.
5.5.2.4.6.3.3 Read/Write Byte (AttribByte)
The GenericSerialBus Read/Write Byte protocol (AttribByte) also transfers a single byte of data.
But unlike Send/Receive Byte, this protocol uses a command value to reference up to 256 byte-sized
virtual registers.
The following ASL code illustrates how a device supporting the Read/Write Byte protocol should be
accessed:
In this example, three field elements (FLD0, FLD1, and FLD2) are defined to represent the virtual
registers for command values 0, 1, and 2. Access to any of the field elements will cause a
GenericSerialBus transaction to occur to the device. Reading FLD1 results in a Read Byte with a
command value of 1, and writing to FLD2 results in a Write Byte with command value 2.
5.5.2.4.6.3.4 Read/Write Word (AttribWord)
The GenericSerialBus Read/Write Word protocol (AttribWord) transfers 2 bytes of data. This
protocol also uses a command value to reference up to 256 word-sized virtual device registers.
The following ASL code illustrates how a device supporting the Read/Write Word protocol should
be accessed:
OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100) // GenericSerialBus device at command value
offset 0
Field(TOP1, BufferAcc, NoLock, Preserve)
{
Connection(I2CSerialBusV2(0x5a,,100000,,"\_SB.I2C",,,,,RawDataBuffer(){1,6}))
AccessAs(BufferAcc, AttribWord)// Use the GenericSerialBus Read/Write Word protocol
FLD0, 8, // Virtual register at command value 0.
FLD1, 8, // Virtual register at command value 1.
FLD2, 8 // Virtual register at command value 2.
}
// Read two bytes of data from the device using command value 1
Store(FLD1, BUFF) // Invoke a Read Word transaction
If(LEqual(STAT, 0x00)) // Successful?
{
In this example, three field elements (FLD0, FLD1, and FLD2) are defined to represent the virtual
registers for command values 0, 1, and 2. Access to any of the field elements will cause a
GenericSerialBus transaction to occur to the device. Reading FLD1 results in a Read Word with a
command value of 1, and writing to FLD2 results in a Write Word with command value 2.
Notice that although accessing each field element transmits a word (16 bits) of data, the fields are
listed as 8 bits each. The actual data size is determined by the protocol. Every field element is
declared with a length of 8 bits so that command values and byte offsets are equivalent.
5.5.2.4.6.3.5 Read/Write Block (AttribBlock)
The GenericSerialBus Read/Write Block protocol (AttribBlock) transfers variable-sized data. This
protocol uses a command value to reference up to 256 block-sized virtual registers.
The following ASL code illustrates how a device supporting the Read/Write Block protocol should
be accessed:
OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100)
Field(TOP1, BufferAcc, NoLock, Preserve)
{
Connection(I2CSerialBusV2(0x5a,,100000,,"\_SB.I2C",,,,,RawDataBuffer(){1,6}))
Offset(0x0),
AccessAs(BufferAcc, AttribBlock),
TFK1, 8,
TFK2, 8
}
<…>
In this example, two field elements (TFK1, and TFK2) are defined to represent the virtual registers
for command values 0 and 1. Access to any of the field elements will cause a GenericSerialBus
transaction to occur to the device.
Writing blocks of data requires similar semantics, such as in the following example.
// Process Call with input value ‘0x5416’ to the device using command value 1
Store(0x5416, DATA) // Save 0x5416 into the data buffer
Store(Store(BUFF, FLD1), BUFF) // Invoke a Process Call transaction
If(LEqual(STAT, 0x00)) // Successful?
{
// DATA = Word returned from FLD1…
}
In this example, three field elements (FLD0, FLD1, and FLD2) are defined to represent the virtual
registers for command values 0, 1, and 2. Access to any of the field elements will cause a
GenericSerialBus transaction to occur to the device. Reading or writing FLD1 results in a Process
Call with a command value of 1. Notice that unlike other protocols, Process Call involves both a
write and read operation in a single atomic transaction. This means that the Data element of the
GenericSerialBus data buffer is set with an input value before the transaction is invoked, and holds
the output value following the successful completion of the transaction.
5.5.2.4.6.3.7 Block Process Call (AttribBlockProcessCall)
The GenericSerialBus Block Write-Read Block Process Call protocol (AttribBlockProcessCall)
transfers a block of data bi-directionally (performs a Write Block followed by a Read Block as an
atomic transaction). This protocol uses a command value to reference up to 256 block-sized virtual
registers.
The following ASL code illustrates how a device supporting the Process Call protocol should be
accessed:
// Process Call with input value "ACPI" to the device using command value 1
Connection(I2CSerialBus(0x5b,,100000,,"\_SB.I2C",,,,RawDataBuffer(){2,9}))
// same connection attribute, but different vendor data passed to driver
AccessAs(BufferAcc, AttribByte)
TM1, 8 //TM1 at command value 2
}
//Write to TFK1
Store(Store(BUFF,TFK1), BUFF)
If(LNotEqual(STAT, 0x00)) {
Return(0)
}
Access to any field elements will cause a GenericSerialBus transaction to occur to the device of the
length specified in the AccessAttributes.
Raw accesses assume that the writer has knowledge of the bus that the access is made over and the
device that is being accessed. The protocol may only ensure that the buffer is transmitted to the
appropriate driver, but the driver must be able to interpret the buffer to communicate to a register.
Raw accesses assume that the writer has knowledge of the bus that the access is made over and the
device that is being accessed. The protocol may only ensure that the buffer is transmitted to the
appropriate driver, but the driver must be able to interpret the buffer to communicate to a register.
System bus The bus-master status bit provides feedback from the hardware as to when a bus master
master request cycle has occurred. This is necessary for supporting the processor C3 power savings
state. For more information, see the description of the BM_STS bit of the PM1x fixed
register block in Section 4.8.3.1, “PM1 Event Grouping.”
Global release This status is raised as a result of the Global Lock protocol, and is handled by OSPM as
status part of Global Lock synchronization. For more information, see the description of the
GBL_STS bit of the PM1x fixed register block in Section 4.8.3.1, “PM1 Event Grouping.”
For more information on Global Lock, see Section 5.2.10.1, “Global Lock.”
• While the corresponding general-purpose enable bit is enabled, the SCI interrupt is asserted.
• If the system is sleeping, this will cause the hardware, if possible, to transition the system into
the S0 state.
• Once the system is running, OSPM will dispatch the corresponding GPE handler.
• The handler needs to determine which device object has signaled wake and performs a wake
Notify
• command on the corresponding device object(s) that have asserted wake.
• In turn OSPM will notify OSPM native driver(s) for each device that will wake its device to
service it.
Events that wake may not be intermixed with non-wake (runtime) events on the same GPE input.
The only exception to this rule is made for the special devices below. Only the following devices are
allowed to utilize a single GPE for both wake and runtime events:
1. Button Devices
• PNP0C0C — Power Button Device
• PNP0C0D — Lid Device
• PNP0C0E — Sleep Button Device
2. PCI Bus Wakeup Event Reporting (PME)
• PNP0A03 — PCI Host Bridge
All wake events that are not exclusively tied to a GPE input (for example, one input is shared for
multiple wake events) must have individual enable and status bits in order to properly handle the
semantics used by the system.
5.6.4.2.2 Determining the System Wake Source Using _Wxx Control Methods
After a transition to the S0 state, OSPM may evaluate the _SWS object in the \_GPE scope to
determine the index of the GPE that was the source of the transition event. When a single GPE is
shared among multiple devices, the platform provides a _Wxx control method, where xx is GPE
index as described in Section 5.6.4.2.2, that allows the source device of the transition to be
determined. If implemented, the _Wxx control method must exist in the \_GPE scope or in the scope
of a GPE block device.
If _Wxx is implemented, either hardware or firmware must detect and save the source device as
described in Section 7.4.3, “_SWS (System Wake Source)”. During invocation, the _Wxx control
method determines the source device and issues a Notify(<device>,0x2) on the device that caused
the system to transition to the S0 state. If the device uses a bus-specific method of arming for
wakeup, then the Notify must be issued on the parent of the device that has a _PRW method. The
_Wxx method must issue a Notify(<device>,0x2) only to devices that contain a _PRW method
within their device scope. OSPM’s evaluation of the _SWS and _Wxx objects is indeterminate. As
such, the platform must not rely on _SWS or _Wxx evaluation to clear any hardware state, including
GPEx_STS bits, or to perform any wakeup-related actions.
If the GPE index returned by the _SWS object is only referenced by a single _PRW object in the
system, it is implied that the device containing that _PRW is the wake source. In this case, it is not
necessary for the platform to provide a _Wxx method.
Example:
Device (\_SB.GPI2)
{
Name(_HID, “XYZ0003”)
Name(_UID, 2) //Third instance of this controller on the platform
Name(_CRS, ResourceTemplate ()
{
//Register Interface
MEMORY32FIXED(ReadWrite, 0x30000000, 0x200, )
//Interrupt line (GSIV 21)
Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) {21}
})
Name(_AEI, ResourceTemplate ()
{
//Thermal Zone Event
GpioInt(Edge, ActiveHigh, Exclusive, PullDown, , " \\_SB.GPI2") {14}
//Power Button
GpioInt(Edge, ActiveLow, ExclusiveAndWake, PullUp, , " \\_SB.GPI2") {36}
})
}
Description
The _EVT method handles a GPIO-signaled event. It must appear within the scope of the GPIO
controller device whose pins are used to signal the event.
OSPM handles GPIO-signaled events as follows:
• The GPIO interrupt is handled by OSPM because it is listed in the _AEI object under a GPIO
controller.
• When the event fires, OSPM handles the interrupt according to its mode and invokes the _EVT
method, passing it the pin number of the event.
• From this point on, handling is exactly like that for GPEs. The _EVT method does a Notify() on
the appropriate device, and OS-specific mechanisms are used to notify the driver of the event.
Note: For event numbers less than 255, _Exx and _Lxx methods may be used instead. In this case, they
take precedence and _EVT will not be invoked.
Example:
Scope (\_SB.GPI2)
{
Method (_EVT,1) { // Handle all ACPI Events signaled by GPIO Controller GPI2
Switch (Arg0)
{
Case (300) {
…
Notify (\_SB.DEVX, 0x80)
}
Case (1801) {
…
Notify (\_SB.DEVY, 0x80)
}
Case (14…) {
…
Notify (\_SB.DEVZ, 0x80)
}
…
}
} //End of Method
} //End of Scope
Below are the notification values defined for specific ACPI devices. For more information
concerning the object-specific notification, see the section on the corresponding device/object.
Hex value Description
0x80 Reserved.
0x81 Graceful Shutdown Request. Used to notify OSPM that a graceful shutdown of the operating
system has been requested. Once the operating system has finished its graceful shutdown
procedure it should initiate a transition to the G2 "soft off" state. The Notify operator must
target the System Bus: (\_SB). See Section 6.3.5 for a description of shutdown processing.
0x82 Device Lists Changed. Used to notify OSPM that the thermal zone device lists (_ALx,
_PSL, _TZD) have changed.
0x83 Thermal / Active Cooling Relationship Table Changed. Used to notify OSPM that values
in the either the thermal relationship table or the active cooling relationship table have
changed.
0x84-0xBF Reserved.
Note: Plug and Play IDs that are not defined by the ACPI specification are defined and described in the
“Links to ACPI-Related Documents” (http://uefi.org/acpi) under the heading "Legacy PNP
Guidelines".
ACPI0001 SMBus 1.0 Host Controller. An SMBus host controller (SMB-HC) compatible with the
embedded controller-based SMB-HC interface (as specified in Section 12.9 “SMBus Host
Controller Interface via Embedded Controller”) and implementing the SMBus 1.0
Specification.
ACPI0002 Smart Battery Subsystem. The Smart battery Subsystem specified in Section 10, “Power
Source Devices.”
ACPI0003 Power Source Device. The Power Source device specified in Section 10, “Power Source
Devices.” This can represent either an AC Adapter (on mobile platforms) or a fixed Power
Supply.
ACPI0004 Module Device. This device is a container object that acts as a bus node in a namespace. A
Module Device without any of the _CRS, _PRS and _SRS methods behaves the same way
as the Generic Container Devices (PNP0A05 or PNP0A06). If the Module Device contains a
_CRS method, only these resources described in the _CRS are available for consumption by
its child devices. Also, the Module Device can support _PRS and _SRS methods if _CRS is
supported.
ACPI0005 SMBus 2.0 Host Controller. An SMBus host controller (SMB-HC compatible with the
embedded controller-based SMB-HC interface (as specified in Section 12.9, “SMBus Host
Controller Interface via Embedded Controller”) and implementing the SMBus 2.0
Specification.
ACPI0006 GPE Block Device. This device allows a system designer to describe GPE blocks beyond
the two that are described in the FADT.
ACPI0007 Processor Device. This device provides an alternative to declaring processors using the
Processor ASL statement. See Section 8.4, “Declaring Processors”, for more details.
ACPI0008 Ambient Light Sensor Device. This device is an ambient light sensor. See Section 9.3,
“Ambient Light Sensor Device”.
ACPI0009 I/OxAPIC Device. This device is an I/O unit that complies with both the APIC and SAPIC
interrupt models.
ACPI000A I/O APIC Device. This device is an I/O unit that complies with the APIC interrupt model.
ACPI000B I/O SAPIC Device. This device is an I/O unit that complies with the SAPIC interrupt model.
ACPI000C Processor Aggregator Device. This device provides a control point for all processors in the
platform. See Section 8.5, “Processor Aggregator Device”.
Note: All names that begin with an underscore are reserved for ACPI use only
Arguments:
None
Return Value:
A resource template Buffer containing only Interrupt Resource descriptors.
Note: For event numbers less than 255, _Exx and _Lxx methods may be used instead. In this case, they
take precedence and _EVT will not be invoked.
Example:
Device (\_SB.GED1)
{
Name(HID,”ACPI0013”)
Name(_CRS, ResourceTemplate ()
{
Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) {41}
Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) {42}
Interrupt(ResourceConsumer, Level, ActiveHigh, ExclusiveAndWake) {43}
})
…
} //End of Scope
Note: Please refer to Section 5.6.4 for the OSPM requirements of handling an event (steps 1 – 5).
For Interrupt-signaled events, the Event (_EVT) method is used.
Arg0 - EventNumber. An Integer indicating the event number (GSIV number) of the current
event. Must be in the range 0x00000000 - 0xffffffff.
Return Value:
None
Description
The _EVT method handles an Interrupt-signaled event. It must appear within the scope of the GED
whose interrupts are used to signal the event.
OSPM handles Interrupt-signaled events as follows:
• The interrupt is handled by OSPM because it is listed in the _CRS object under a GED.
• When the event fires, OSPM handles the interrupt according to its mode and invokes the _EVT
method, passing it the interrupt number of the event. In the case of level interrupts, the ASL
within the _EVT method must be responsible for clearing the interrupt at the device.
• From this point on, handling is exactly like that for GPEs. The _EVT method may optionally
call Notify() on the appropriate device, and OS-specific mechanisms are used to notify the driver
of the event.
Example:
Device (\_SB.GED1)
{
Name(HID,”ACPI0013”)
Name(_CRS, ResourceTemplate ()
{
Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) {41}
Interrupt(ResourceConsumer, Edge, ActiveHigh, Shared) {42}
Interrupt(ResourceConsumer, Level, ActiveHigh, ExclusiveAndWake) {43}
}
Method (_EVT,1) { // Handle all ACPI Events signaled by the Generic Event Device(GED1)
Switch (Arg0) // Arg0 = GSIV of the interrupt
{
Case (41) { // interrupt 41
Store(One, ISTS) // clear interrupt status register at device X
// which is mapped via an operation region
Notify (\_SB.DEVX, 0x0) // insertion request
}
Case (42) { // interrupt 42
Notify (\_SB.DEVX, 0x3) // ejection request
}
Case (43) { // interrupt 43
Store(One, ISTS) // clear interrupt status register at device X
// which is mapped via an operation region
Notify (\_SB.DEVX, 0x2) // wake event
}
}
} //End of Method
} //End of GED1 Scope
Device (\_SB.DEVX)
{
…
Name(_PRW,Package()
{
Package(2){ // EventInfo
\_SB.GED1, // device reference
0x2 // event (zero-based CRS index) = 2 (maps to interrupt 43)
},
0x03, // Can wake up from S3 state
PWRA // PWRA must be ON for DEVX to wake system
})
…
} //End of DEVX Scope
OSPM enables or disables the device wake function by enabling or disabling its corresponding event
and by executing its _PSW control method (which is used to take care of the second-level enables).
When the event is asserted, OSPM still executes the corresponding event control method that
determines which device wakes are asserted and notifies the corresponding device objects. The
native OS driver is then notified that its device has asserted wake, for which the driver powers on its
device to service it.
If the system is in a sleeping state when the enabled event is asserted the hardware will transition the
system into the S0 state, if possible.
The _OSI method requires one argument and returns an integer. The argument is a string that
contains an optional ACPI-defined OsVendorString followed by a required FeatureGroupString. The
feature group string can be either ACPI-defined or OS vendor defined.
_OSI cannot and should not be used by the firmware in an attempt to identify the host operating
system; rather, this method is intended to be used to identify specific features and interfaces that are
supported by the OS. The example below illustrates this:
_OSI (“Windows 2009”)
In the _OSI invocation above, “Windows” is the OsVendorString, and “2009” is the vendor-defined
FeatureGroupString. A return value of TRUE (Ones) from this call does NOT indicate that the
executing operating system is Windows. It simply indicates that the actual OS conforms to
“Windows 2009” features and interfaces, and is thus compatible with Windows 2009. ACPI
implementations other than Windows often reply TRUE to all Windows _OSI requests.
The OsVendorString should always be accompanied by a FeatureGroupString. However, the
OsVendorString itself is optional and can be omitted if the feature group string applies to all
operating systems. The ACPI-defined feature group strings may be used in this standalone manner.
For example:
_OSI ("3.0 Thermal Model")
Arguments: (1)
Arg0 – A String containing the optional OS vendor prefix (as defined in Table 5-182) and/or the
required Feature Group string (as ACPI-defined in Table 5-183 , or a vendor-defined custom feature/
interface string). The optional OS vendor string is not needed in the case of the ACPI-defined feature
group strings.
Return Value:
An Integer containing a Boolean that indicates whether the requested feature is supported:
0x0 (Zero) – The interface, behavior, or feature is not supported
Ones (-1) – The interface, behavior, or feature is supported. Note: The value of Ones is
0xFFFFFFFF in 32-bit mode (DSDT revision 1) or 0xFFFFFFFFFFFFFFFF in 64-bit mode (DSDT
revision 2 and greater).
OSPM may indicate support for multiple OS interface / behavior strings if the operating system
supports the behaviors. For example, a newer version of an operating system may indicate support
for strings from all or some of the prior versions of that operating system.
_OSI provides the platform with the ability to support new operating system versions and their
associated features when they become available. OSPM can choose to expose new functionality
based on the _OSI argument string. That is, OSPM can use the strings passed into _OSI to ensure
compatibility between older platforms and newer operating systems by maintaining known
compatible behavior for a platform. As such, it is recommended that _OSI be evaluated by the
\_SB.INI control method so that platform compatible behavior or features are available early in
operating system initialization.
Since feature group functionality may be dependent on OSPM implementation, it may be required
that OS vendor-defined strings be checked before feature group strings.
Platform developers should consult OS vendor specific information for OS vendor defined strings
representing a set of OS interfaces and behaviors. ACPI defined strings representing an operating
system and an ACPI feature group are listed in the following tables.
_OSI Examples
Use of standard ACPI-defined feature group strings:
Scope (_SB)
{
Name (PAD1, 0)
Name (MDEV, 0)
Method (_INI)
{
If (CondRefOf (\_OSI) // Ensure _OSI exists in the OS
{
If (\_OSI (“Processor Aggregator Device”)
{
Store (1, PAD1)
}
If (\_OSI (“Module Device”)
{
Return Value:
A String containing the operating system name.
Package {
DeviceLockMutex // Reference to a Mutex object
Resources // Buffer or Reference (Resource Template)
}
Example:
Device (DEV1)
{
Mutex (MTX1, 0)
Name (RES1, ResourceTemplate ()
{
I2cSerialBusV2 (0x0400, DeviceInitiated, 0x00001000,
AddressingMode10Bit, "\\_SB.DEV1",
0, ResourceConsumer, I2C1)
})
Device (DEV2)
{
Mutex (MTX2, 0)
Mutex (MTX3, 0)
Name (_DLM, Package (2)
{
Package (2)
{
\DEV2.MTX2,
ResourceTemplate ()
{
I2cSerialBusV2 (0x0400, DeviceInitiated, 0x00001000,
AddressingMode10Bit, "\\_SB.DEV2",
0, ResourceConsumer, I2C2)
}
},
Package (1) // Optional resource not needed
{
\DEV2.MTX3
}
})
}
Arguments: (1)
Arg0 – An Integer containing a code for the current interrupt model:
0– PIC mode
1– APIC mode
2– SAPIC mode
Other values –Reserved
Return Value:
None
6 Device Configuration
This section specifies the objects OSPM uses to configure devices. There are three types of
configuration objects:
Device identification objects associate platform devices with Plug and Play IDs.
• Device configuration objects declare and configure hardware resources and characteristics for
devices enumerated via ACPI.
• Device insertion and removal objects provide mechanisms for handling dynamic insertion and
removal of devices.
This section also defines the ACPI device–resource descriptor formats. Device–resource descriptors
are used as parameters by some of the device configuration objects.
For any device that is on a non-enumerable type of bus (for example, an ISA bus), OSPM
enumerates the devices' identifier(s) and the ACPI system firmware must supply an _HID object
(plus one or more optional objects such as _CID, _CLS, _HRV, _SUB) for each device to enable
OSPM to do that. For devices on an enumerable type of bus, such as a PCI bus, the ACPI system
must identify which device on the enumerable bus is identified by a particular address; the ACPI
system firmware must supply an _ADR object for each device to enable this. A device object must
contain either an _HID object or an _ADR object, but should not contain both.
If any of these objects are implemented as control methods, these methods may depend on operation
regions. Since the control methods may be evaluated before an operation region provider becomes
available, the control method must be structured to execute in the absence of the operation region
provider. (_REG methods notify the platform runtime firmware of the presence of operation region
providers.) When a control method cannot determine the current state of the hardware due to a lack
of operation region provider, it is recommended that the control method should return the condition
that was true at the time that control passed from the platform boot firmware to the OS. (The control
method should return a default, boot value).
Where:
cc – hexadecimal representation of the Class Code byte
ss – hexadecimal representation of the Subclass Code byte
Example ASL:
Device (XYZ) {
Name (_HID, EISAID ("PNP0303")) // PC Keyboard Controller
Name (_CID, EISAID ("PNP030B"))
}
A list of available class codes and programming interface codes is provided by the PCI SIG. See
"PCI Code and ID Assignment Specification", available from "Links to ACPI-Related Documents"
(http://uefi.org/acpi) under the heading "PCI Code and ID Assignment Specification
Example ASL:
Device(SATA) //AHCI- compatible SATA controller
{
Name(_HID, "…")
Name(_CLS, Package (3)
{
0x01, // Base Class (01h == Mass Storage)
0x06, // Sub-Class (06h == SATA)
0x01, // Programming Interface (01h == AHCI)
})
Name(_CRS, ResourceTemplate()
{
… // AHCI-defined system resources
})
}
Example ASL:
Name (_HID, EISAID ("PNP0C0C")) // Control-Method Power Button
Name (_HID, EISAID ("INT0800")) // Firmware Hub
Name (_HID, "ACPI0003") // AC adapter device
Name (_HID, "MSFT0003") // Vendor-defined device
Name (_HID, "80860003") // PCI-assigned device identifier
Arguments:
None
Return Value:
An Integer (DWORD) containing the hardware revision number
Example ASL:
Name (_HRV, 0x0003)// Revision number 3 of this hardware device
LanguageDescriptor[n] // Package
}
Each Language Descriptor sub-Package contains the elements described below:
Package {
LanguageId // String
UnicodeDescription // Buffer
}
LanguageId is a string identifying the language. This string follows the format specified in the
Internet RFC 3066 document (Tags for the Identification of Languages). In addition to supporting
the existing strings in RFC 3066, Table 6-187 lists aliases that are also supported.
UnicodeDescription is a Buffer containing a Unicode (UTF-16) string. This string contains the
language-specific description of the device corresponding to the LanguageID. The Unicode() ASL
macro can be used to create this Buffer.
Example:
Device (XYZ) {
Name (_ADR, 0x00020001)
Name ( _MLS, Package(){(2){“en”, Unicode("ACME super DVD controller")}})
}
Top
Top Panel
Origin
Back
Panel
Origin
Left
Panel Front
Origin Panel Right
Panel
Origin
Origin Bottom
Bottom Panel
Origin
The data bits also assume that if the system is capable of opening up like a laptop that the device
may exist on the base of the laptop system or on the lid. In the case of the latter, the “Lid” bit
(described below) should be set indicating the device connection point is on the lid. If the device is
on the lid, the description describes the device’s connection point location when the system is
opened with the lid up. If the device connection point is not on the lid, then the description describes
the device’s connection point location when the system with the lid closed.
Figure 6-35 Laptop Panel and Panel Origin Positions
Front
Panel (base)
Lid Top Panel
Origin
Lid
Front Panel
Origin
(base)
Front Panel
Origin
To render a view of a system Panel, all _PLDs that define the same Panel and Lid values are
collected. The _PLDs are then sorted by the value of their Order field and the view of the panel is
rendered by drawing the shapes of each connection point (in their correct Shape, Color, Horizontal
Offset, Vertical Offset, Width, Height, and Orientation) starting with all Order = 0 _PLDs first.
Refer to Figure 6-37 for an example.
The location of a device connection point may change as a result of the system connecting or
disconnecting to a docking station or a port replicator. As such, Notify event of type 0x09 will cause
OSPM to re-evaluate the _PLD object residing under the particular device notified. If a platform is
unable to detect the change of connecting or disconnecting to a docking station or port replicator, a
_PLD object should not be used to describe the device connection points that will change location
after such an event.
Arguments:
None
Return Value:
A variable-length Package containing a list of Buffers
This method returns a package containing a single or multiple buffer entries. At least one buffer
entry must be returned using the bit definitions below.
Horizontal 2 72 2
Position on
the panel
where the
device
connection
point resides.
Card Cage For single card cage system, this field is 2 106 8
Number always 0.
Note: All additional buffer entries returned may contain OEM-specific data, but must begin in a {GUID,
data} pair. These additional data may provide complimentary physical location information specific
to certain systems or class of machines.
Height
Height
Width
Width Width
Origin: Lower, Left Origin: Lower, Left Origin: Lower, Left
Shape = Chamfered
Rotation = 0 for all
The Origin of a shape is always in displayed reference
the in lower left corner. Height shapes
Width
Origin: Lower, Left
Name
Ignore Color
Width
Height
VOff
HOff
Shape
Notation
Goup Position
Rota-tion
Back Yes 0 0 0 2032 4318 0 0 V Rect 1 0
Panel
MB Yes 0 0 0 445 1556 1588 127 V Rect 2 0
Conn
area
Power Yes 0 0 0 1524 889 3302 127 H Rect 2 0
Supply
USB No 0 0 0 125 52 2223 159 H Rect C1 3 90
Port 1
USB No 0 0 0 125 52 2223 254 H Rect C2 3 90
Port 2
USB No 0 0 0 125 52 2223 350 H Rect C3 3 90
Port 3
USB No 0 0 0 125 52 2223 445 H Rect C4 3 90
Port 4
USB No 0 0 0 125 52 2007 159 H Rect C5 3 90
Port 5
USB No 0 0 0 125 52 2007 254 H Rect C6 3 90
Port 6
Ethern No 0 0 0 157 171 2007 350 V Rect C7 3 90
et
Audio No FF FF FF 127 127 1945 151 Round C8 3 90
1
Audio No 15 24 12 127 127 1945 286 Round C9 3 90
2 1 7 7
Audio No 0 0 0 127 127 1945 427 Round C10 3 90
3
SPDIF No 0 0 0 112 126 1756 176 V Trap C11 3 90
Audio No 0 FF 0 127 127 1765 288 Round C12 3 90
4
Audio No 0 0 FF 127 127 1765 429 Round C13 3 90
5
SATA No 0 0 0 239 88 3091 159 H Rect C14 3 90
1394 No 0 0 0 112 159 2890 254 H Trap C15 3 0
Coax No 0 0 0 159 159 2842 143 Round C16 3 90
Name
Ignore Color
Width
Height
VOff
HOff
Shape
Notation
Goup Position
Rota-tion
PCI 2 No 0 0 0 1016 127 334 127 H Rect 2 3 0
PCI 3 No 0 0 0 1016 127 540 127 H Rect 3 3 0
PCI 4 No 0 0 0 1016 127 747 127 H Rect 4 3 0
PCI 5 No 0 0 0 1016 127 953 127 H Rect 5 3 0
PCI 6 No 0 0 0 1016 127 1159 127 H Rect 6 3 0
PCI 7 No 0 0 0 1016 127 1366 127 H Rect 7 3 0
Note that the origin is in the lower left hand corner of the Back Panel, where positive Horizontal and
Vertical Offset values are to the right and up, respectively.
Figure 6-37 PLD Back Panel Rendering
Power Supply
C
Motherboard
14 C15
connector area
C16
C1 C2 C3 C4
C5 C6 C7
7
6 System
5 Backpanel
4
3
2
1
0
6.1.9 _SUB
This object is used to supply OSPM with the device's Subsystem ID. The use of _SUB is optional.
Arguments:
None
Return Value:
A String containing the SUB
A _SUB object evaluates to a string and the format must be a valid PNP or ACPI ID with no asterisk
or other leading characters.
See the definition of _HID (Section 6.1.5) for the definition of PNP and ACPI ID strings.
Example ASL:
Name (_SUB, "MSFT3000")// Vendor-defined subsystem
Example ASL:
Device (XYZ) {
Name (_ADR, 0x00020001)
Name (_STR, Unicode ("ACME super DVD controller"))
}
Then, when all else fails, an OS can use the info included in the _STR object to describe the
hardware to the user.
Note: these objects must only be provided for devices that cannot be configured by any other hardware
standard such as PCI, PCMCIA, and so on.
When OSPM enumerates a device, it calls _PRS to determine the resource requirements of the
device. It may also call _CRS to find the current resource settings for the device. Using this
information, the Plug and Play system determines what resources the device should consume and
sets those resources by calling the device’s _SRS control method.
In ACPI, devices can consume resources (for example, legacy keyboards), provide resources (for
example, a proprietary PCI bridge), or do both. Unless otherwise specified, resources for a device
are assumed to be taken from the nearest matching resource above the device in the device
hierarchy.
Some resources, however, may be shared amongst several devices. To describe this, devices that
share a resource (resource consumers) must use the extended resource descriptors (0x7-0xA)
described in Section 6.4.3, “Large Resource Data Type.” These descriptors point to a single device
object (resource producer) that claims the shared resource in its _PRS. This allows OSPM to clearly
understand the resource dependencies in the system and move all related devices together if it needs
to change resources. Furthermore, it allows OSPM to allocate resources only to resource producers
when devices that consume that resource appear.
The device configuration objects are listed in Table 6-189
Return Value:
An Integer (DWORD) containing a clock domain identifier.
In the case the platform does not convey any clock domain information to OSPM via the SRAT or
the _CDM object, OSPM assumes all logical processors to be on a common clock domain. If the
platform defines _CDM object under a logical processor then it must define _CDM objects under all
logical processors whose clock domain information is not provided via the SRAT.
2. Plug and Play BIOS Specification Version 1.0A, May 5, 1994, Compaq Computer Corp., Intel Corp., Phoe-
nix Technologies Ltd.
//
// The _DMA method returns a resource template describing the
// addresses that are decoded on the child side of this
// bridge. The contained resource descriptors thus indicate
// the address ranges that bus masters living below this
// bridge can use to send accesses through the bridge toward a
// destination elsewhere in the system (e.g. main memory).
//
// In our case, any bus master addresses need to fall between
// 0 and 0x80000000 and will have 0x200000000 added as they
// cross the bridge. Furthermore, any child-side accesses
// falling into the range claimed in our _CRS will be
// interpreted as a peer-to-peer traffic and will not be
// forwarded upstream by the bridge.
//
// Our upstream address decoder will only claim one range from
// 0x20000000 to 0x5fffffff in the _CRS. Therefore _DMA
// should return two QWORDMemory descriptors, one describing
// the range below and one describing the range above this
// "peer-to-peer" address range.
//
Method(_DMA, ResourceTemplate()
{
QWORDMemory(
ResourceConsumer,
PosDecode, // _DEC
MinFixed, // _MIF
MaxFixed, // _MAF
Prefetchable, // _MEM
ReadWrite, // _RW
0, // _GRA
0, // _MIN
0x1fffffff, // _MAX
0x200000000, // _TRA
0x20000000, // _LEN
,
,
,
)
QWORDMemory(
ResourceConsumer,
PosDecode, // _DEC
MinFixed, // _MIF
MaxFixed, // _MAF
Prefetchable, // _MEM
ReadWrite, // _RW
0, // _GRA
0x60000000, // _MIN
0x7fffffff, // _MAX
0x200000000, // _TRA
0x20000000, // _LEN
,
,
,
)
})
}
Examples:
Note: The UUID used in the following examples is assumed to define the data format for Data Structure
as a list of packages of length 2 (Properties) whose first element (Key) must be a String and the
second element is a Value associated with that key. The set of valid Keys and the format and
interpretation of the Values associated with them is then dependent on the PNP or ACPI device ID
of the device.
Device (MDEV) {
Name (_HID, “PNP####”)
//
// PWM controller with two pins that can be driven and a device using
// those pins with the periods of 5000000 and 4500000 nanoseconds,
// respectively.
//
Device (\_SB.PCI0.PWM) {
Name (_HID, “PNP####”)
}
})
}
Device (\_SB.PCI0.BL) {
Name (_HID, “ACPI####”)
}
}
})
}
//
// SPI controller using a fixed frequency clock represented by the CLKO
// device object.
//
Device (\_SB_.PCI0) {
Device (CLK0) {
Name (_HID, “PNP####”)
Device (SPI0) {
Name (_HID, “PNP####”)
...
}
}
registers. This object evaluates to a package of Plug and Play-compatible IDs (32-bit compressed
EISA type IDs) that correlate to the fixed-hardware register blocks defined in the FADT. The device
under which _FIX appears plays a role in the implementation of the fixed-hardware (for example,
implements the hardware or decodes the hardware’s address). _FIX conveys to OSPM whether a
given device can be disabled, powered off, or should be treated specially by conveying its role in the
implementation of the ACPI fixed-hardware register interfaces. This object takes no arguments.
The _CRS object describes a device’s resources. That _CRS object may contain a superset of the
resources in the FADT, as the device may actually decode resources beyond what the FADT
requires. Furthermore, in a machine that performs translation of resources within I/O bridges, the
processor-relative resources in the FADT may not be the same as the bus-relative resources in the
_CRS.
Arguments:
None
Return Value:
A variable-length Package containing a list of Integers, each containing a PNP ID
Each of fields in the FADT has its own corresponding Plug and Play ID, as shown below:
PNP0C20 - SMI_CMD
PNP0C21 - PM1a_EVT_BLK / X_ PM1a_EVT_BLK
PNP0C22 - PM1b_EVT_BLK / X_PM1b_EVT_BLK
PNP0C23 - PM1a_CNT_BLK / X_PM1a_CNT_BLK
PNP0C24 - PM1b_CNT_BLK / X_ PM1b_CNT_BLK
PNP0C25 - PM2_CNT_BLK / X_ PM2_CNT_BLK
PNP0C26 - PM_TMR_BLK / X_ PM_TMR_BLK
PNP0C27 - GPE0_BLK / X_GPE0_BLK
PNP0C28 - GPE1_BLK / X_ GPE1_BLK
PNP0B00 – FIXED_RTC
PNP0B01 – FIXED_RTC
PNP0B02 – FIXED_RTC
}
} // end APIC
} // end scope SB
Example ASL for _GSB usage for a PCI-based I/O APIC Device:
Scope(\_SB) {
Device(PCI0) // Host bridge
Name(_HID, EISAID("PNP0A03")) // Need _HID for root device
Device(PCI1) { // I/O APIC PCI Device
Name(_ADR,0x00070000)
Method(_GSB){
Return (0x18) // Global System Interrupt Base for I/O APIC starts at 24
}
} // end PCI1
} // end PCI0
} // end scope SB
Example:
Method (_HPP, 0) {
Return (Package(4){
0x08, // CacheLineSize in DWORDS
0x40, // LatencyTimer in PCI clocks
0x01, // Enable SERR (Boolean)
0x00 // Enable PERR (Boolean)
})
}
Device (P2P2) { // Second PCI-to-PCI bridge (Bus contains Hot plug slots)
Name(_ADR,0x000E0000) // Device#Eh, Func#0 on bus PCI0
Name(_PRT, Package(){ // Need PCI IRQ routing for PCI bridge
// Package with PCI IRQ routing table information
})
Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
OSPM will configure a PCI device on a card hot-plugged into slot 1 or slot 2, with a cache line size
of 32 (Notice this field is in DWORDs), latency timer of 64, enable SERR, but leave PERR alone.
The format of data returned by the _HPX object is extensible. The Setting Type and Revision
number determine the format of the Setting Record. OSPM ignores Setting Records of types that it
does not understand. A Setting Record with higher Revision number supersedes that with lower
revision number, however, the _HPX method can return both together, OSPM shall use the one with
highest revision number that it understands.
_HPX may return multiple types or Record Settings (each setting in a single sub-package.) OSPM is
responsible for detecting the type of hot plugged device and for applying the appropriate settings.
OSPM is also responsible for detecting the device / port type of the PCI Express device and applying
the appropriate settings provided. For example, the Secondary Uncorrectable Error Severity and
Secondary Uncorrectable Error Mask settings of Type 2 record are only applicable to PCI Express to
PCI-X/PCI Bridge whose device / port type is 1000b. Similarly, AER settings are only applicable to
hot plug PCI Express devices that support the optional AER capability.
Arguments:
None
Return Value:
A variable-length Package containing a list of Packages, each containing a single PCI or PCI-X
Record Setting as described below
The _HPX object supersedes the _HPP object. If the _HPP and _HPX objects exist within a device’s
scope, OSPM will only evaluate the _HPX object.
Note: OSPM may override the settings provided by the _HPX object’s Type2 record (PCI Express
Settings) when OSPM has assumed native control of the corresponding feature. For example, if
OSPM has assumed ownership of AER (via _OSC), OSPM may override AER related settings
returned by _HPX.
Note: The _HPX object may exist under PCI compatible buses including host bridges except when the
host bridge spawns a PCI Express hierarchy. For PCI Express hierarchies, the _HPX object may
only exist under a root port or a switch downstream port.
Note: Since error status registers do not drive error signaling, OSPM is not required to clear error status
registers as part of _HPX handling.
Enable PERR Integer When set to 1, indicates that action must be performed to enable PERR
in the command register.
If the hot plug device includes bridge(s) in the hierarchy, the above settings apply to the primary side
(command register) of the hot plugged bridge(s). The settings for the secondary side of the bridge(s)
(Bridge Control Register) are assumed to be provided by the bridge driver.
The Type 0 record is applicable to hot plugged PCI, PCI-X and PCI Express devices. OSPM will
ignore settings provided in the Type0 record that are not applicable (for example, Cache-line size
and Latency Timer are not applicable to PCI Express).
For simplicity, OSPM could use the Average Maximum Outstanding Split Transactions value as the
Maximum Outstanding Split Transactions register value in the PCI-X command register for each
PCI-X device. Another alternative is to use a more sophisticated policy and the Total Maximum
Outstanding Split Transactions Value to gain even more performance. In this case, the OS would
examined each PCI-X device that is directly attached to the host bridge, determine the number of
outstanding split transactions supported by each device, and configure each device accordingly. The
goal is to ensure that the aggregate number of concurrent outstanding split transactions does not
exceed the Total Maximum Outstanding Split Transactions Value: an integer denoting the number of
concurrent outstanding split transactions the host bridge can support (the minimum value is 1).
This object does not address providing additional information that would be used to configure
registers in bridge devices, whether architecturally-defined or specification-defined registers or
device specific registers. It is expected that a driver for a bridge would be the proper implementation
mechanism to address both of those issues. However, such a bridge driver should have access to the
data returned by the _HPX object for use in optimizing its decisions on how to configure the bridge.
Configuration of a bridge is dependent on both system specific information such as that provided by
the _HPX object, as well as bridge specific information.
0x01, // Revision 1
0x03, // Maximum Memory Read Byte Count
0x04, // Average Maximum Outstanding Split Transactions
0x07 // Total Maximum Outstanding Split Transactions
}
})
}
capabilities. When supported, _OSC is invoked by OSPM immediately after placing the device in
the D0 power state. Device specific objects are evaluated after _OSC invocation. This allows the
values returned from other objects to be predicated on the OSPM feature support / capability
information conveyed by _OSC. OSPM may evaluate _OSC multiple times to indicate changes in
OSPM capability to the device but this may be precluded by specific device requirements. As such,
_OSC usage descriptions in Section 9, “ACPI-Defined Devices and Device Specific Objects”, or
other governing specifications describe superseding device specific _OSC capabilities and / or
preclusions.
_OSC enables the platform to configure its ACPI namespace representation and object evaluations
to match the capabilities of OSPM. This enables legacy operating system support for platforms with
new features that make use of new namespace objects that if exposed would not be evaluated when
running a legacy OS. _OSC provides the capability to transition the platform to native operating
system support of new features and capabilities when available through dynamic namespace
reconfiguration. _OSC also allows devices with Compatible IDs to provide superset functionality
when controlled by their native (For example, _HID matched) driver as appropriate objects can be
exposed accordingly as a result of OSPM’s evaluation of _OSC.
Arguments: (4)
Arg0 – A Buffer containing a UUID
Arg1 – An Integer containing a Revision ID of the buffer format
Arg2 – An Integer containing a count of entries in Arg3
Arg3 – A Buffer containing a list of DWORD capabilities
Return Value:
A Buffer containing a list of capabilities
Argument Information
Arg0: UUID – used by the platform in conjunction with Revision ID to ascertain the format of the
Capabilities buffer.
Arg1: Revision ID – The revision of the Capabilities Buffer format. The revision level is specific to
the UUID.
Arg2: Count – Number of DWORDs in the Capabilities Buffer in Arg3
Arg3: Capabilities Buffer – Buffer containing the number of DWORDs indicated by Count. The first
DWORD of this buffer contains standard bit definitions as described below. Subsequent DWORDs
contain UUID-specific bits that convey to the platform the capabilities and features supported by
OSPM. Successive revisions of the Capabilities Buffer must be backwards compatible with earlier
revisions. Bit ordering cannot be changed.
Capabilities Buffers are device-specific and as such are described under specific device definitions.
See Section 9, “ACPI Devices and Device Specific Objects” for any _OSC definitions for ACPI
devices. The format of the Capabilities Buffer and behavior rules may also be specified by OEMs
and IHVs for custom devices and other interface or device governing bodies for example, the PCI
SIG.
The first DWORD in the capabilities buffer is used to return errors defined by _OSC. This DWORD
must always be present and may not be redefined/reused by unique interfaces utilizing _OSC.
• Bit [0]- Query Support Flag. If set, the _OSC invocation is a query by OSPM to determine or
negotiate with the platform the combination of capabilities for which OSPM may take control.
In this case, OSPM sets bits in the subsequent DWORDs to specify the capabilities for which
OSPM intends to take control. If clear, OSPM is attempting to take control of the capabilities
corresponding to the bits set in subsequent DWORDs. OSPM may only take control of
capabilities as indicated by the platform by the result of the query.
• Bit [1] – Always clear (0).
• Bit [2] – Always clear (0).
• Bit [3] – Always clear (0).
• All others – reserved.
Note: OSPM must not use the results of _OSC evaluation to choose a compatible device driver. OSPM
must use _HID, _CID, or native enumerable bus device identification mechanisms to select an
appropriate driver for a device.
The platform may issue a Notify(device, 0x08) to inform OSPM to re-evaluate _OSC when the
availability of feature control changes. Platforms must not rely, however, on OSPM to evaluate
_OSC after issuing a Notify for proper operation as OSPM cannot guarantee the presence of a target
entity to receive and process the Notify for the device. For example, a device driver for the device
may not be loaded at the time the Notify is signaled. Further, the issuance and processing rules for
notification of changes in the Capabilities Buffer is device specific. As such, the allowable behavior
is governed by device specifications either in Section 9, “ ACPI-Specific Device Objects”, for
ACPI-define devices, or other OEM, IHV, or device governing body’s’ device specifications.
It is permitted for _OSC to return all bits in the Capabilities Buffer cleared. An example of this is
when significant time is required to disable platform-based feature support. The platform may then
later issue a Notify to tell OSPM to re-evaluate _OSC to take over native control. This behavior is
also device specific but may also rely on specific OS capability.
In general, platforms should support both OSPM taking and relinquishing control of specific feature
support via multiple invocations of _OSC but the required behavior may vary on a per device basis.
Since platform context is lost when the platform enters the S4 sleeping state, OSPM must re-
evaluate _OSC upon wake from S4 to restore the previous platform state. This requirement will vary
depending on the device specific _OSC functionality.
Note: * As part of the handshake provided through _OSC the OS will pass in flags to indicate whether it
supports Platform Coordinated Low Power Idle or OS Initiated Low Power Idle or both (see “Idle
State Coordination”, Section 8.4.4.2), through flags 7 and 8. The platform will indicate which of the
modes it supports in its response by clearing flags that are not supported. If both are supported,
the default is platform coordinated and OSPM can switch the platform to OS Initiated via a
processor architecture specific mechanism. By setting either flag 7 or 8 or both, the OSPM is
asserting it supports any objects associated with Low Power Idle states (see LPI in
Section 8.4.4.3, RDI in Section 8.5, and passive power resources in Section 7.2.5), and supports
processor containers (see Section 8.4.3.1).
Note: The PCI SIG owns the definition of _OSC behavior and parameter bit definitions for PCI devices.
In the event of a discrepancy between the following example and the PCI Firmware Specification,
the latter has precedence.
The _OSC interface defined in this section applies only to “Host Bridge” ACPI devices that
originate PCI, PCI-X or PCI Express hierarchies. These ACPI devices must have a _HID of (or
_CID including) either EISAID(“PNP0A03”) or EISAID(“PNP0A08”). For a host bridge device that
originates a PCI Express hierarchy, the _OSC interface defined in this section is required. For a host
bridge device that originates a PCI/PCI-X bus hierarchy, inclusion of an _OSC object is optional.
• The _OSC interface for a PCI/PCI-X/PCI Express hierarchy is identified by the following
UUID:
33DB4D5B-1FF7-401C-9657-7441C03DD766
A revision ID of 1 encompasses fields defined in this section of this revision of this specification,
comprised of 3 DWORDs, including the first DWORD described by the generic ACPI definition of
_OSC.
The first DWORD in the _OSC Capabilities Buffer contain bits are generic to _OSC and include
status and error information.
The second DWORD in the _OSC capabilities buffer is the Support Field. Bits defined in the
Support Field provide information regarding OS supported features. Contents in the Support Field
are passed one-way; the OS will disregard any changes to this field when returned. See Table 6-192
for descriptions of capabilities bits in this field passed as a parameter into the _OSC control method.
The third DWORD in the _OSC Capabilities Buffer is the Control Field. Bits defined in the Control
Field are used to submit request by the OS for control/handling of the associated feature, typically
(but not excluded to) those features that utilize native interrupts or events handled by an OS-level
driver. See Table 6-194 for descriptions of capabilities bits in this field passed as a parameter into
the _OSC control method. If any bits in the Control Field are returned cleared (masked to zero) by
the _OSC control method, the respective feature is designated unsupported by the platform and must
not be enabled by the OS. Some of these features may be controlled by platform firmware prior to
OS boot or during runtime for a legacy OS, while others may be disabled/inoperative until native OS
support is available. See Table 6-195 for descriptions of capabilities bits in this returned field.
If the _OSC control method is absent from the scope of a host bridge device, then the OS must not
enable or attempt to use any features defined in this section for the hierarchy originated by the host
bridge. Doing so could contend with platform firmware operations, or produce undesired results. It
is recommended that a machine with multiple host bridge devices should report the same capabilities
for all host bridges, and also negotiate control of the features described in the Control Field in the
same way for all host bridges.
Method(_OSC,4)
{ // Check for proper UUID
If(LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
{
// Create DWord-adressable fields from the Capabilities Buffer
CreateDWordField(Arg3,0,CDW1)
CreateDWordField(Arg3,4,CDW2)
CreateDWordField(Arg3,8,CDW3)
If(LNotEqual(Arg1,One))
{ // Unknown revision
Or(CDW1,0x08,CDW1)
}
If(LNotEqual(CDW3,CTRL))
{ // Capabilities bits were masked
Or(CDW1,0x10,CDW1)
}
// Update DWORD3 in the buffer
Store(CTRL,CDW3)
Return(Arg3)
} Else {
Or(CDW1,4,CDW1) // Unrecognized UUID
Return(Arg3)
}
} // End _OSC
} // End PCI0
Arguments:
None
Return Value:
A Package containing variable-length list of PCI interrupt mapping packages, as described below
Note: The PCI function number in the Address field of the _PRT packages must be 0xFFFF, indicating
“any” function number or “all functions”.
The _PRT mapping packages have the fields listed in Table 6-198.
There are two ways that _PRT can be used. Typically, the interrupt input that a given PCI interrupt is
on is configurable. For example, a given PCI interrupt might be configured for either IRQ 10 or 11
on an 8259 interrupt controller. In this model, each interrupt is represented in the ACPI namespace
as a PCI Interrupt Link Device.
These objects have _PRS, _CRS, _SRS, and _DIS control methods to allocate the interrupt. Then,
OSPM handles the interrupts not as interrupt inputs on the interrupt controller, but as PCI interrupt
pins. The driver looks up the device’s pins in the _PRT to determine which device objects allocate
the interrupts. To move the PCI interrupt to a different interrupt input on the interrupt controller,
OSPM uses _PRS, _CRS, _SRS, and _DIS control methods for the PCI Interrupt Link Device.
In the second model, the PCI interrupts are hardwired to specific interrupt inputs on the interrupt
controller and are not configurable. In this case, the Source field in _PRT does not reference a
device, but instead contains the value zero, and the Source Index field contains the global system
interrupt to which the PCI interrupt is hardwired.
Name(_UID, 1)
Name(_PRS, ResourceTemplate(){
Interrupt(ResourceProducer,…) {10,11} // IRQs 10,11
})
Method(_DIS) {…}
Method(_CRS) {…}
Method(_SRS, 1) {…}
}
Device(LNKB){
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
Name(_UID, 2)
Name(_PRS, ResourceTemplate(){
Interrupt(ResourceProducer,…) {11,12} // IRQs 11,12
})
Method(_DIS) {…}
Method(_CRS) {…}
Method(_SRS, 1) {…}
}
Device(LNKC){
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
Name(_UID, 3)
Name(_PRS, ResourceTemplate(){
Interrupt(ResourceProducer,…) {12,14} // IRQs 12,14
})
Method(_DIS) {…}
Method(_CRS) {…}
Method(_SRS, 1) {…}
}
Device(LNKD){
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
Name(_UID, 4)
Name(_PRS, ResourceTemplate(){
Interrupt(ResourceProducer,…) {10,15} // IRQs 10,15
})
Method(_DIS) {…}
Method(_CRS) {…}
Method(_SRS, 1) {…}
}
Device(PCI0){
…
Name(_PRT, Package{
Package{0x0004FFFF, 0, \_SB_.LNKA, 0}, // Slot 1, INTA // A fully
Package{0x0004FFFF, 1, \_SB_.LNKB, 0}, // Slot 1, INTB // qualified
Package{0x0004FFFF, 2, \_SB_.LNKC, 0}, // Slot 1, INTC // pathname
Package{0x0004FFFF, 3, \_SB_.LNKD, 0}, // Slot 1, INTD // can be used,
Package{0x0005FFFF, 0, LNKB, 0}, // Slot 2, INTA // or a simple
Package{0x0005FFFF, 1, LNKC, 0}, // Slot 2, INTB // name segment
Package{0x0005FFFF, 2, LNKD, 0}, // Slot 2, INTC // utilizing the
Package{0x0005FFFF, 3, LNKA, 0}, // Slot 2, INTD // search rules
Package{0x0006FFFF, 0, LNKC, 0} // Video, INTA
})
}
}
behavior based on this. For example, in a system with four processors and six memory devices, there
might be two separate proximity domains (0 and 1), each with two processors and three memory
devices. In this case, the OS may decide to run some software threads on the processors in proximity
domain 0 and others on the processors in proximity domain 1. Furthermore, for performance
reasons, it could choose to allocate memory for those threads from the memory devices inside the
proximity domain common to the processor and the memory device rather than from a memory
device outside of the processor’s proximity domain. _PXM can be used to identify any device
belonging to a proximity domain. Children of a device belong to the same proximity domain as their
parent unless they contain an overriding _PXM. Proximity domains do not imply any ejection
relationships.
An OS makes no assumptions about the proximity or nearness of different proximity domains. The
difference between two integers representing separate proximity domains does not imply distance
between the proximity domains (in other words, proximity domain 1 is not assumed to be closer to
proximity domain 0 than proximity domain 6).
If the Local APIC ID / Local SAPIC ID / Local x2APIC ID or the GICC ACPI Processor UID of a
dynamically added processor is not present in the System Resource Affinity Table (SRAT), a _PXM
object must exist for the processor’s device or one of its ancestors in the ACPI Namespace.
Arguments:
None
Return Value:
An Integer (DWORD) containing a proximity domain identifier.
Return Value:
A Buffer containing a system locality information table
If System Locality i ≥ N, where N is the number of System Localities, the _SLI method returns a
buffer that contains these relative distances:
[(i, 0), (i, 1), …, (i, i-1), (i, i), (0, i), (1, i), …(i-1, i), (i, i)]
If System Locality i < N, the _SLI method returns a buffer that contains these relative distances:
[(i, 0), (i, 1), …, (i, i), …,(i, N-1), (0, i), (1, i),…(i, i), …, (N-1, i)]
Interconnect
Figure 6-38diagrams a 4-node system where the nodes are numbered 0 through 3 (Node n = Node 3)
and the granularity is at the node level for the NUMA distance information. In this example we
assign System Localities / Proximity Domain numbers equal to the node numbers (0-3). The NUMA
relative distances between proximity domains as implemented in this system are described in the
matrix represented in Table 6-199. Proximity Domains are represented by the numbers in the top
row and left column. Distances are represented by the values in cells internal in the table from the
domains.
If a new node, “Node 4”, is added, then Table 6-201 represents the updated system’s NUMA relative
distances of proximity domains.
Proximity Domain 0 1 2 3 4
3 18 24 12 10 23
4 17 21 14 23 10
The new node’s _SLI object would evaluate to a buffer containing [17,21,14,23,10,17,21,14,23,10].
Note: Some systems support interleave memory across the nodes. The SLIT representation of these
systems is implementation specific.
__CCA objects are only relevant for devices that can access CPU-visible memory, such as devices
that are DMA capable. On ARM based systems, the _CCA object must be supplied all such devices.
On Intel platforms, if the _CCA object is not supplied, the OSPM will assume the devices are
hardware cache coherent.
Arguments:
None
Return Value:
An Integer indicating the device's support for hardware cache coherency
0- The device does not have hardware managed cache coherency
1- The device has hardware managed cache coherency
Other Values - Reserved
Note: There are restrictions related to when this object is evaluated which have implications for
implementing this object as a control method. The _CCA method must only access Operation
Regions that have been indicated to be available as defined by the _REG method. The _REG method
is described in Section 6.5.4, "_REG (Region)."
…
}
…
Device (SPI1) {
…
Name (_CRS, ResourceTemplate()
{
FixedDMA(…)// Sharing the DMA, thus inherits coherency from it
…
…
})
… // _CCA not valid
}
}
The system is more stable when removable devices have a software-controlled, VCR-style ejection
mechanism instead of a “surprise-style” ejection mechanism. In this system, the eject button for a
device does not immediately remove the device, but simply signals the operating system. OSPM
then shuts down the device, closes open files, unloads the driver, and sends a command to the
hardware to eject the device.
1. If the device is physically inserted while the system is in the working state (in other words, hot
insertion), the hardware generates a general-purpose event.
2. The control method servicing the event uses the Notify(device,0) command to inform OSPM of
the bus that the new device is on or the device object for the new device. If the Notify command
points to the device object for the new device, the control method must have changed the
device’s status returned by _STA to indicate that the device is now present. The performance of
this process can be optimized by having the object of the Notify as close as possible, in the
namespace hierarchy, to where the new device resides. The Notify command can also be used
from the _WAK control method (for more information about _WAK, see Section 7.4.5 “\_WAK
(System Wake)”) to indicate device changes that may have occurred while the system was
sleeping. For more information about the Notify command, see Section 5.6.3 “Device Object
Notification.”
3. OSPM uses the identification and configuration objects to identify, configure, and load a device
driver for the new device and any devices found below the device in the hierarchy.
4. If the device has a _LCK control method, OSPM may later run this control method to lock the
device.
The new device referred to in step 2 need not be a single device, but could be a whole tree of devices.
For example, it could point to the PCI-PCI bridge docking connector. OSPM will then load and
configure all devices it found below that bridge. The control method can also point to several
different devices in the hierarchy if the new devices do not all live under the same bus. (in other
words, more than one bus goes through the connector).
For removing devices, ACPI supports both hot removal (system is in the S0 state), and warm
removal (system is in a sleep state: S1-S4). This is done using the _EJx control methods. Devices
that can be ejected include an _EJx control method for each sleeping state the device supports (a
maximum of 2 _EJx objects can be listed). For example, hot removal devices would supply an _EJ0;
warm removal devices would use one of _EJ1-EJ4. These control methods are used to signal the
hardware when an eject is to occur.
The sequence of events for dynamically removing a device goes as follows:
1. The eject button is pressed and generates a general-purpose event. (If the system was in a
sleeping state, it should wake the system).
2. The control method for the event uses the Notify(device, 3) command to inform OSPM which
specific device the user has requested to eject. Notify does not need to be called for every device
that may be ejected, but for the top-level device. Any child devices in the hierarchy or any
ejection-dependent devices on this device (as described by _EJD, below) are automatically
removed.
3. The OS shuts down and unloads devices that will be removed.
4. If the device has a _LCK control method, OSPM runs this control method to unlock the device.
5. The OS looks to see what _EJx control methods are present for the device. If the removal event
will cause the system to switch to battery power (in other words, an undock) and the battery is
low, dead, or not present, OSPM uses the lowest supported sleep state _EJx listed; otherwise it
uses the highest state _EJx. Having made this decision, OSPM runs the appropriate _EJx control
method to prepare the hardware for eject.
6. Warm removal requires that the system be put in a sleep state. If the removal will be a warm
removal, OSPM puts the system in the appropriate Sx state. If the removal will be a hot removal,
OSPM skips to step 8, below.
7. For warm removal, the system is put in a sleep state. Hardware then uses any motors, and so on,
to eject the device. Immediately after ejection, the hardware transitions the system to S0. If the
system was sleeping when the eject notification came in, the OS returns the system to a sleeping
state consistent with the user’s wake settings.
8. OSPM calls _STA to determine if the eject successfully occurred. (In this case, control methods
do not need to use the Notify(device,3) command to tell OSPM of the change in _STA) If there
were any mechanical failures, _STA returns 3: device present and not functioning, and OSPM
informs the user of the problem.
Note: This mechanism is the same for removing a single device and for removing several devices, as in
an undock.
ACPI does not disallow surprise-style removal of devices; however, this type of removal is not
recommended because system and data integrity cannot be guaranteed when a surprise-style removal
occurs. Because the OS is not informed, its device drivers cannot save data buffers and it cannot stop
accesses to the device before the device is removed. To handle surprise-style removal, a general-
purpose event must be raised. Its associated control method must use the Notify command to
indicate which bus the device was removed from.
The device insertion and removal objects are listed in Table 6-202.
Return Value:
A variable-length Package containing a list of namespace references
Before OSPM ejects a device via the device’s _EJx methods, all dependent devices listed in the
package returned by _EDL are prepared for removal. Notice that _EJx methods under the dependent
devices are not executed.
When describing a platform that includes a docking station, an _EDL object is declared under the
docking station device. For example, if a mobile system can attach to two different types of docking
stations, _EDL is declared under both docking station devices and evaluates to the packaged list of
devices that must be ejected when the system is ejected from the docking station.
An ACPI-compliant OS evaluates the _EDL method just prior to ejecting the device.
Note: OSPM will not execute a dependent device’s _EJx methods when the device indicated by _EJD is
ejected.
When describing a platform that includes a docking station, usually more than one _EJD object will
be needed. For example, if a dock attaches both a PCI device and an ACPI-configured device to a
mobile system, then both the PCI device description package and the ACPI-configured device
description package must include an _EJD object that evaluates to the name of the docking station
(the name specified in an _ADR or _HID object in the docking station’s description package). Thus,
when the docking connector signals an eject request, OSPM first attempts to disable and unload the
drivers for both the PCI and ACPI configured devices.
Note: An ACPI 1.0 OS evaluates the _EJD methods only once during the table load process. This
greatly restricts a table designer’s freedom to describe dynamic dependencies such as those
created in scenarios with multiple docking stations. This restriction is illustrated in the example
below; the _EJD information supplied via and ACPI 1.0-compatible namespace omits the IDE2
device from DOCK2’s list of ejection dependencies. Starting in ACPI 2.0, OSPM is presented with
a more in-depth view of the ejection dependencies in a system by use of the _EDL methods.
Example
An example use of _EJD and _EDL is as follows:
Scope(\_SB.PCI0) {
OSPM evaluates the _STA method. For _ADR devices, OSPM checks with the bus driver for that
device.
For warm removal, the _EJ1–_EJ4 control methods do not cause the device to be immediately
ejected. Instead, they set proprietary registers to prepare the hardware to eject when the system goes
into the given sleep state. The hardware ejects the device only after OSPM has put the system in a
sleep state by writing to the SLP_EN register. After the system resumes, OSPM calls _STA to
determine if the eject succeeded.
A device object may have multiple _EJx control methods. First, it lists an EJx control method for the
preferred sleeping state to eject the device. Optionally, the device may list an EJ4 control method to
be used when the system has no power (for example, no battery) after the eject. For example, a hot-
docking notebook might list _EJ0 and _EJ4.
Arguments: (3)
Arg0 – An Integer containing the source event
Arg1 – An Integer containing the status code
Arg2 – A Buffer containing status information
Return Value:
None
Argument Information:
Arg0 – source_event: DWordConst
If the value of source_event is <= 0xFF, this argument is the ACPI notification value whose
processing generated the status indication. This is the value that was passed into the Notify operator.
If the value of source_event is 0x100 or greater then the OSPM status indication is a result of an
OSPM action as indicated in Table 6-203. For example, a value of 0x103 will be passed into _OST
for this argument upon the failure of a user interface invoked device ejection.
If OSPM is unable to identify the originating notification value, OSPM invokes _OST with a value
that contains all bits set (ones) for this parameter.
Arg1 – Status Code: DWordConst. OSPM indicates a notification value specific status. See Table 6-
204, Table 6-205, and Table 6-207 for status code descriptions.
Arg2 – A buffer containing detailed OSPM-specific information about the status indication. This
argument may be null.
Table 6-205 Operating System Shutdown Processing (Source Events : 0x100) Status Codes
Status Code Description
0x80 OS Shutdown Request denied
0x81 OS Shutdown in progress
0x82 OS Shutdown completed
0x83 OS Graceful Shutdown not supported
0x84-0xFFFFFFFF Reserved
Table 6-206 Ejection Request / Ejection Processing (Source Events: 0x03 and 0x103) Status
Codes
Status Code Description
0x80 Device ejection not supported by OSPM
0x81 Device in use by application
0x82 Device Busy
0x83 Ejection dependency is busy or not supported for ejection by OSPM
0x84 Ejection is in progress (pending)
0x85-0xFFFFFFFF Reserved
It is possible for the platform to issue multiple notifications to OSPM and for OSPM to process the
notifications asynchronously. As such, OSPM may invoke _OST for notifications independent of the
order the notification are conveyed by the platform or by software to OSPM.
The figure below provides and example event flow of device ejection on a platform employing the
_OST object.
OSPM Processes
Ejection Request
Yes
Evaluate _EJx
OSPM places
Platform ejection Platform wakeup
x = 0 in _EJx? No system into sleep
occurs occurs
state
Yes
Note: To maintain compatibility with OSPM implementations of previous revisions of the ACPI
specification, the platform must not rely on OSPM’s evaluation of the _OST object for proper
platform operation.
Scope(\_SB.PCI4) {
OperationRegion(LED1, SystemIO, 0x10C0, 0x20)
Field(LED1, AnyAcc, NoLock, Preserve)
{ // LED controls
S0LE, 1, // Slot 0 Ejection Progress LED
S0LF, 1, // Slot 0 Ejection Failure LED
S1LE, 1, // Slot 1 Ejection Progress LED
S1LF, 1, // Slot 1 Ejection Failure LED
S2LE, 1, // Slot 2 Ejection Progress LED
S2LF, 1, // Slot 2 Ejection Failure LED
S3LE, 1, // Slot 3 Ejection Progress LED
S3LF, 1 // Slot 3 Ejection Failure LED
}
Scope (\_GPE)
{
Method(_E13)
{
Store(One, \_SB.PCI4.S3LE) // Turn on ejection request LED
Notify(\_SB.PCI4.SLT3, 3) // Ejection request driven from GPE13
}
}
Note: Operating Systems implementing ACPI 1.0 interpret the presence of this object to mean that the
device is removable.
Return Value:
An Integer containing a device status bitmap:
Bit [0] – Set if the device is present.
Bit [1] – Set if the device is enabled and decoding its resources.
Bit [2] – Set if the device should be shown in the UI.
Bit [3] – Set if the device is functioning properly (cleared if device failed its diagnostics).
Bit [4] – Set if the battery is present.
Bits [31:5] – Reserved (must be cleared).
The following small information items are currently defined for Plug and Play devices:
Note: Low true, level sensitive interrupts may be electrically shared, but the process of how this might
work is beyond the scope of this specification.
Note: If byte 3 is not included, High true, edge sensitive, non-shareable is assumed.
See Section 19.6.66, “IRQ (Interrupt Resource Descriptor Macro),” and Section 19.6.67,
“IRQNoFlags (Interrupt Resource Descriptor Macro),” for a description of the ASL macros that
create an IRQ descriptor.
See Section 19.6.32, “DMA (DMA Resource Descriptor Macro),” for a description of the ASL
macro that creates a DMA descriptor.
Start Dependent Function fields may be of length 0 or 1 bytes. The extra byte is optionally used to
denote the compatibility or performance/robustness priority for the resource group following the
Start DF tag. The compatibility priority is a ranking of configurations for compatibility with legacy
operating systems. This is the same as the priority used in the PNPBIOS interface. For example, for
compatibility reasons, the preferred configuration for COM1 is IRQ4, I/O 3F8-3FF. The
performance/robustness performance is a ranking of configurations for performance and robustness
reasons. For example, a device may have a high-performance, bus mastering configuration that may
not be supported by legacy operating systems. The bus-mastering configuration would have the
highest performance/robustness priority while its polled I/O mode might have the highest
compatibility priority.
If the Priority byte is not included, this indicates the dependent function priority is ‘acceptable’. This
byte is defined as:
Notice that if multiple Dependent Functions have the same priority, they are further prioritized by
the order in which they appear in the resource data structure. The Dependent Function that appears
earliest (nearest the beginning) in the structure has the highest priority, and so on.
See Section 19.6.129, “StartDependentFn (Start Dependent Function Resource Descriptor Macro),”
for a description of the ASL macro that creates a Start Dependent Function descriptor.
See Section 19.6.39, “EndDependentFn (End Dependent Function Resource Descriptor Macro,” for
a description of the ASL macro that creates an End Dependent Functions descriptor.
See Section 19.6.65, “IO (IO Resource Descriptor Macro,” for a description of the ASL macro that
creates an I/O Port descriptor.
See Section 19.6.50, “FixedIO (Fixed I/O Resource Descriptor Macro,” for a description of the ASL
macro that creates a Fixed I/O Port descriptor.
See VendorShort (page 1006) for a description of the ASL macro that creates a short vendor-defined
resource descriptor.
Note: If the checksum field is zero, the resource data is treated as if the checksum operation
succeeded. Configuration proceeds normally.
The End Tag is automatically generated by the ASL compiler at the end of the ResourceTemplate
statement.
Note: 24-bit Memory Range descriptors are used for legacy devices.
Note: Mixing of 24-bit and 32-bit memory descriptors on the same device is not allowed.
See Section 19.6.81, “Memory24 (Memory Resource Descriptor Macro),” for a description of the
ASL macro that creates a 24-bit Memory descriptor.
This specification (ACPI) defines the UUID specific descriptor subtype field and the UUID field to
address potential collision of the use of this descriptor. It is strongly recommended that all newly
defined vendor descriptors use these fields prior to Vendor Defined Data.
See VendorLong (page 1006) for a description of the ASL macro that creates a long vendor-defined
resource descriptor.
Note: Mixing of 24-bit and 32-bit memory descriptors on the same device is not allowed.
See Section 19.6.82, “Memory32 (Memory Resource Descriptor Macro),” for a description of the
ASL macro that creates a 32-bit Memory descriptor.
Note: Mixing of 24-bit and 32-bit memory descriptors on the same device is not allowed.
See Section 19.6.83, “Memory32Fixed (Memory Resource Descriptor),” for a description of the
ASL macro that creates a 32-bit Fixed Memory descriptor.
See QWordIO (page 981), QWordMemory (page 983) and ASL_QWordAddressSpace for a
description of the ASL macros that creates a QWORD Address Space descriptor.
See DWordIO (page 913), DWordMemory (page 915) and ASL_DWordAddressSpace for a
description of the ASL macro that creates a DWORD Address Space descriptor
Note: This descriptor is exactly the same as the DWORD descriptor specified in Table 6-214; the only
difference is that the address fields are 16 bits wide rather than 32 bits wide.
See WordIO (page 1009), WordBusNumber (page 1008) and ASL_WordAddressSpace for a
description of the ASL macros that create a Word address descriptor.
See Section 19.6.43, “ExtendedSpace (Extended Address Space Resource Descriptor Macro),” for a
description of the ASL macro that creates an Extended Address Space descriptor.
(Notice: OSPM ignores this field in the Extended address space descriptor. Instead it uses the
Type Specific Attributes field to determine memory attributes)
Bit [0] Write status, _RW
1 This memory range is read-write.
0 This memory range is read-only.
Bits Meaning
Bit [5] Sparse Translation, _TRS. This bit is only meaningful if Bit [4] is set.
1 SparseTranslation: The primary-side memory address of any specific I/O port within the
secondary-side range can be found using the following function.
address = (((port & 0xFFFc) << 10) || (port & 0xFFF)) + _TRA
In the address used to access the I/O port, bits[11:2] must be identical
to bits[21:12], this gives four bytes of I/O ports on each 4 KB page.
0 DenseTranslation: The primary-side memory address of any specific I/O port within the
secondary-side range can be found using the following function.
address = port + _TRA
Bit [4] I/O to Memory Translation, _TTP
1 TypeTranslation: This resource, which is I/O on the secondary side of the bridge, is
memory on the primary side of the bridge.
0 TypeStatic: This resource, which is I/O on the secondary side of the bridge, is also I/O
on the primary side of the bridge.
Bit [3:2] Reserved (must be 0)
Bit [1:0] _RNG
3 Memory window covers the entire range
2 ISARangesOnly. This flag is for bridges on systems with multiple bridges. Setting this bit
means the memory window specified in this descriptor is limited to the ISA I/O addresses
that fall within the specified window. The ISA I/O ranges are: n000-n0FF, n400-n4FF,
n800-n8FF, nC00-nCFF. This bit can only be set for bridges entirely configured through
ACPI namespace.
1 NonISARangesOnly. This flag is for bridges on systems with multiple bridges. Setting this
bit means the memory window specified in this descriptor is limited to the non-ISA I/O
addresses that fall within the specified window. The non-ISA I/O ranges are: n100-n3FF,
n500-n7FF, n900-nBFF, nD00-nFFF. This bit can only be set for bridges entirely
configured through ACPI namespace.
0 Reserved
Table 6-233 Bus Number Range Resource Flag (Resource Type = 2) Definitions
Bits Meaning
Bit [7:0] Reserved (must be 0)
Note: Low true, level sensitive interrupts may be electrically shared, the process of how this might work
is beyond the scope of this specification.
If the OS is running using the 8259 interrupt model, only interrupt number values of 0-15 will be
used, and interrupt numbers greater than 15 will be ignored.
See Interrupt (page 944) for a description of the ASL macro that creates an Extended Interrupt
descriptor.
See Register (page 987) for a description of the ASL macro that creates a Generic Register resource
descriptor.
For IO Connections:
Bit [7:4] Reserved (must be 0)
Bit [3] IO Sharing, _SHR
0x0 = Exclusive: This IO connection is used exclusively by
one device.
0x1 = Shared: This IO connection is shared by two or more
devices.
Bit [2] Reserved (must be 0)
Bit [1:0] IO Restriction _IOR
0x0 = This pin or pins can be used for either Input or Output.
0x1 = This pin or pins can only be used for Input, and the
pin configuration must be preserved while not in use.
0x2 = This pin or pins can only be used for Output, and the
pin configuration must be preserved while not in use.
0x3 = This pin or pins can be used for either input or output,
but the configuration must be preserved until
explicitly changed.
Byte 8 Interrupt and IO Bit [15:8] Reserved (must be 0)
Flags, bits
[15:8]
2 SPI
3 UART
4-191 Reserved
Bit [1]
Consumer/Producer:
0x1: This device consumes this resource
0x0: This device produces and consumes this
resource
Bit [2]
Connection Sharing, _SHR
0x0: Exclusive: This Serial Bus connection is used
exclusively by one device.
0x1: Shared: This Serial Bus connection is shared by
two or more devices.
Bit [0]
Slave Mode.
0x0: The communication over this connection is
initiated by the controller.
0x1: The communication over this connection is
initiated by the device.
Byte 7 Type Specific Flags, bits[7:0] Flags specific to the indicated Serial Bus Type (see
above).
Byte 8 Type Specific Flags, Flags specific to the indicated Serial Bus Type (see
bits[15:8] above).
Byte 9 Type Specific Revision ID Revision ID for the data describing the serial bus
connection specified by Serial Bus Type (see above).
Byte 10 Type Data Length, bits[7:0] Variable length, minimum size depends on the indicated
Serial Bus Type (see above).
Byte 11 Type Data Length, bits [15:8] Variable length, minimum size depends on the indicated
Serial Bus Type (see above).
Bit [1]
Consumer/Producer:
0x1: This device consumes this resource
0x0: This device produces and consumes this
resource
Bit [0]
Slave Mode. _SLV
0x0: The communication over this connection is
initiated by the controller.
0x1: The communication over this connection is
initiated by the device.
Byte 7 Type Specific Flags, bits[7:0] Bits[7:1]
Reserved. Must be 0.
Bit [0]
10-bit addressing mode. _MOD
0x1: The connection uses 10-bit addressing
0x0: The connection uses 7-bit addressing.
Bits [6:0]
The lowest 7 bits of the address. In 7-bit addressing
mode this represents the complete address.
Byte 17 Slave Address, bits[15:8] Upper eight bits of the I2C bus address for this
connection. The upper eight bits are to support 10-bit
addressing and should be set to 0 if 7-bit addressing is
being used. _ADR[15:8]
Bits [15:10]
Reserved. Must be 0.
Bits [9:8]
In 7-bit addressing mode these are reserved and must be
0. In 10-bit addressing mode these are the highest two
bits of the address.
Byte 18 Vendor-defined Data (Optional) Data specific to the controller device supplied
by a vendor. The number of bytes in this field is Type
Data Length – 6.
… … (Optional) Additional vendor supplied data.
String Resource Source (Length = Name of the serial bus controller device to which this
L) connection descriptor applies. The name can be a fully
qualified path, a relative path, or a simple name segment
that utilizes the namespace search rules
Bit [1]
Consumer/Producer:
0x1: This device consumes this resource
0x0: This device produces and consumes this resource
Bit [0]
Slave Mode. _SLV
0x0: The communication over this connection is initiated by
the controller.
0x1: The communication over this connection is initiated by
the device.
Byte 7 Type Specific Flags, Bits [7:2]
bits[7:0] Reserved (must be 0)
Bit [1]: Device Polarity. _DPL
1 – The device selection line is active high
0 – The device selection line is active low
Bit [0]: Wire Mode. _MOD
1 – The connection is over 3 wires
0 – The connection is over 4 wires
Byte 8 Type Specific Flags, Reserved. Must be 0.
bits[15:8]
Byte 9 Type Specific Revision ID Indicates the revision of the SPI-specific Serial Bus
Connection Descriptor Data. This value must be 1.
Byte 10 Type Data Length, bits[7:0] Variable length, minimum value = 0x9 (9).
Byte 11 Type Data Length, bits Variable length, minimum size = 0x0 (0)
[15:8]
Byte 12 Connection Speed, bits Connection speed bits [7:0] of the maximum speed in hertz
[7:0] supported by this connection. _SPE[7:0]
1 –Start High
Byte 19 Device Selection, bits [7:0] Lower eight bits of the device selection value. This value is
specific to the device and may refer to a chip-select line, GPIO
line or other line selection mechanism. _ADR[7:0]
Byte 20 Device Selection, bits Upper eight bits of the device selection value. This value is
[15:8] specific to the device and may refer to a chip-select line, GPIO
line or other line selection mechanism. _ADR[15:8]
Byte 21 Vendor Defined Data (Optional) Data specific to the controller device supplied by a
vendor. The number of bytes in this field is Type Data Length
– 9.
… … (Optional) Additional vendor supplied data.
String Resource Source (Length Name of the serial bus controller device to which this
= L) connection descriptor applies. The name can be a fully
qualified path, a relative path, or a simple name segment that
utilizes the namespace search rules.
Bit [1]
Consumer/Producer:
0x1: This device consumes this resource
0x0: This device produces and consumes this
resource
Bit [0]
Slave Mode. _SLV
0x0: The communication over this connection is initiated by
the controller.
0x1: The communication over this connection is initiated by
the device.
Byte 7 Type Specific Flags, Bit [7] – Endian-ness. _END
bits[7:0] Little Endian = 0
Big Endian = 1
Bit [6:4] – Data bits. Number of bits per byte. _LEN
000B – 5 bits
001B – 6 bits
010B – 7 bits
011B – 8 bits
100B – 9 bits
Bits [3:2] – Stop Bits. Number of stop bits per character. _STB
00B (0) – none
01B (1) – 1
10B (2) – 1.5
11B (3) – 2
Bits [1:0] – Flow control. Indicates type of flow control for the
connection. _FLC
00B (0) – None
01B (1) – Hardware flow control
10B (2) – XON/XOFF
Byte 8 Type Specific Flags, Reserved. Must be 0.
bits[15:8]
Byte 9 Type Specific Revision ID Indicates the revision of the UART-specific Serial Bus
Connection Descriptor Data. This value must be 1.
Byte 10 Type Data Length, bits[7:0] Variable length, minimum value = 0x0A (10).
Byte 11 Type Data Length, bits Variable length, minimum size = 0x0 (0)
[15:8]
Byte 12 Default Baud rate, bits[7:0] Default baud rate of connection, in bits-per-second.
_SPE[7:0]
Bits [7:0]
already been loaded, OSPM will not evaluate the _INI method, nor examine the children for _INI
methods.
The OSPM performed _INI object actions based upon the _STA Present and Functional bits are
summarized in the table below.
The _INI control method is generally used to switch devices out of a legacy operating mode. For
example, platform boot firmware often configures CardBus controllers in a legacy mode to support
legacy operating systems. Before enumerating the device with an ACPI operating system, the
CardBus controllers must be initialized to CardBus mode. For such systems, the vendor can include
an _INI control method under the CardBus controller to switch the device into CardBus mode.
In addition to device initialization, OSPM unconditionally evaluates an _INI object under the \_SB
namespace, if present, at the beginning of namespace initialization.
Note: When _DCK is called with 0, OSPM will ignore the return value. The _STA object that follows the
_EJx control method will notify whether or not the portable has been ejected.
Arguments:
None
Return Value:
An Integer that contains the EISA Dock ID
_BDN must appear under a device object that represents the dock, that is, the device object with
_Ejx methods. This object must return a DWORD that is the EISA-packed DockID returned by the
Plug and Play BIOS Function 5 (Get Docking Station Identifier) for a dock.
Note: If the machine does not support PNPBIOS, this object is not required.
2. OSPM must make Embedded Controller operation regions, accessed via the Embedded
Controllers described in ECDT, available before executing any control method. These operation
regions may become inaccessible after OSPM runs _REG(EmbeddedControl, 0).
Place _REG in the same scope as operation region declarations. The OS will run the _REG in a
given scope when the operation regions declared in that scope are available for use.
Example:
Scope(\_SB.PCI0) {
OperationRegion(OPR1, PCI_Config, ...)
Method(_REG, 2) {...} // OSPM executes this when PCIO operation region handler
// status changes
Device(PCI1) {
Method(2) {...}
Device(ETH0) {
OperationRegion(OPR2, PCI_Config, ...)
Method(_REG,2) {...}
}
}
Device(ISA0) {
OperationRegion(OPR3, SystemIO, ...)
Method(_REG, 2) {...} // OSPM executes this when ISAO operation region handler
// status changes
Device(EC0) {
Name(_HID, EISAID("PNP0C09"))
OperationRegion(OPR4, EmbeddedControl, ...)
Method(_REG, 2) {...} // OSPM executes this when EC operation region
// handler status changes
}
}
}
When the PCI0 operation region handler is ready, OSPM will run the _REG method declared in
PCI0 scope to indicate that PCI Config space operation region access is available within the PCI0
scope (in other words, OPR1 access is allowed). When the ISA0 operation handler is ready, OSPM
will run the _REG method in the ISA0 scope to indicate that the I/O space operation region access is
available within that scope (in other words, OPR3 access is allowed). Finally, when the Embedded
Controller operation region handler is ready, OSPM will run the _REG method in the EC0 scope to
indicate that EC space operation region access is available within the EC0 scope (in other words,
OPR4 access is allowed). It should be noted that PCI Config Space Operation Regions are ready as
soon the host controller or bridge controller has been programmed with a bus number. PCI1’s _REG
method would not be run until the PCI-PCI bridge has been properly configured. At the same time,
the OS will also run ETH0’s _REG method since its PCI Config Space would be also available. The
OS will again run ETH0’s _REG method when the ETH0 device is started. Also, when the host
controller or bridge controller is turned off or disabled, PCI Config Space Operation Regions for
child devices are no longer available. As such, ETH0’s _REG method will be run when it is turned
off and will again be run when PCI1 is turned off.
Note: The OS only runs _REG methods that appear in the same scope as operation region declarations
that use the operation region type that has just been made available. For example, _REG in the
EC device would not be run when the PCI bus driver is loaded since the operation regions
declared under EC do not use any of the operation region types made available by the PCI driver
(namely, config space, I/O, and memory).
6.5.6.1 Example
Device(ND0) { // this is a node 0
Name(_HID, “ACPI0004”)
Name(_ADR, 0x00000000)
Name(_SEG, 0) // The buses below the host bridge belong to PCI segment 0
…
Name(_BBN, 0)
…
}
Device(PCI1) {
…
Name(_SEG, 0) // The buses below the host bridge belong to PCI segment 0
…
Name(_BBN, 16)
…
}
…
}
Device(ND1) { // this is a node 1
Name(_HID, “ACPI0004”)
Note: Default behavior: if _GLK is not present within the scope of a given device, then the Global Lock is
not required for that device.
Arguments:
None
Return Value:
An Integer that contains the Global Lock requirement code
0 – The Global Lock is not required for this device
1 – The Global lock is required for this device
An example of device resource contention is a device driver for an SMBus-based device contending
with SMM-based code for access to the Embedded Controller, SMB-HC, and SMBus target device.
In this case, the device driver must acquire and release the Global Lock when accessing the device to
avoid resource contention with SMM-based code that accesses any of the listed resources.
6.5.8.1 Example
Device(\_SB.TC3) {
…
OperationRegion(OPRG,
GenericSerialBus,
0x00,
0x100)
…
}
Device(\_SB.TP1) {
…
Name (_DEP, Package() {\_SB.TC3})
…
}
Note: NFIT is an ACPI table enumerated at OS boot. In case of hot plug of NVDIMMs, the
corresponding NFIT structures will not be present in NFIT. _FIT method is also used to provide
these structures dynamically during hot plug.
Arguments:
None
Return Value:
A Buffer containing a list of NFIT Structures
Example ASL for _FIT usage:
Scope (\_SB) {
Device (NVDR) {
Name(_HID, “ACPI0012”)
OperationRegion (OPRN, SystemMemory,
Offset in system memory of NFIT Structures,
Length in bytes)
Field (OPRN, ByteAcc, NoLock, Preserve) {
FITD, Length in bits
}
Method (_FIT, 0) {
Return (FITD)
}
…
} // end NVDR
…
} // end scope \_SB
Return Value:
A Package containing the Label Storage Area information as described below
Return Value Information:
_LSI returns a package in the format below
Package {
Status // Integer (DWORD)
SizeOfLabelStorageArea // Integer (DWORD)
MaxTransferLength // Integer (DWORD)
}
0x00000000 - the NVDIMM does not support
label storage.
A non-zero value – the NVDIMM supports label
storage.
This section specifies the objects that support the device power management and system power
management models described in Section 3. OSPM uses these objects to manage the platform by
achieving a desirable balance between performance and energy conservation goals.
The system state indicator objects are also specified in this section.
Table 7-251 Power Resource Object Provisions for Information and Control
Power System entity Platform Object Comments
management performing it information providing
function to be required information
performed
Choose a Device Power List of states _PRx, D3cold support is indicated by
supported device Policy Owner (D0 through PSx explicitly providing _PR3. D3hot
state to save D3hot, and is assumed to be supported in
power while D3cold) all cases.
device is idle supported by
the device
Choose a Device Power List of states _PRx, _PRx maps device states to
supported device Policy Owner (D0 through Power Power Resources, Power
state to enable a D3hot, and Resource Resource definition maps Power
targeted system D3cold) Declaration, Resources to system states.
sleep or Low- supported by _SxD _SxD provides the system state-
power Idle state the device in to-device state mapping
the targeted explicitly in case power
system sleep resources do not produce the
state information.*(See Note, below.)
Note: *Support for Low-power Idle states requires the use of power resources to describe the device
state and wake dependencies. See _RDI, Section 8.5, and _LPI, Section 8.4.4.3I.
PowerResource(PIDE, 0, 0) {
Method(_STA) {
Return (Xor (GIO.IDEI, One, Zero)) // inverse of isolation
}
Method(_ON) {
Store (One, GIO.IDEP) // assert power
Sleep (10) // wait 10ms
Store (One, GIO.IDER) // de-assert reset#
Stall (10) // wait 10us
Store (Zero, GIO.IDEI) // de-assert isolation
}
Method(_OFF) {
Store (One, GIO.IDEI) // assert isolation
Store (Zero, GIO.IDER) // assert reset#
Store (Zero, GIO.IDEP) // de-assert power
}
}
7.2.2 _OFF
This power resource control method puts the power resource into the OFF state. The control method
must not complete until the power resource is off, including any required sequencing delays
between, or after, operations on the power resource. OSPM is required to turn on or off only one
resource at a time. The AML code can use Stall or Sleep within the method to cause the proper
sequencing delays. OSPM is not required to run the _STA method to confirm that the resource has
been successfully turned off, and may run the _OFF method repeatedly, even if the resource is
already off.
Arguments:
None
Return Value:
None
7.2.3 _ON
This power resource control method puts the power resource into the ON state. The control method
must not complete until the power resource is on, including any required sequencing delays between,
or after, operations on the power resource. OSPM is required to turn on or off only one resource at a
time. The AML code can use Stall or Sleep within the method to cause the proper sequencing delays.
OSPM is not required to run the _STA method to confirm that the resource has been successfully
turned on, and may run the _ON method repeatedly, even if the resource is already on.
Arguments:
None
Return Value:
None
the platform will manipulate them. The dependencies between LPI states and power resources are
described in the _RDI object. See RDI Section 8.4.4.4 for additional details.
Object Description
_PS2 Control method that puts the device in the D2 device state.
_PS3 Control method that puts the device in the D3 device state (device off).
_PSC Object that evaluates to the device’s current power state.
_PR0 Object that evaluates to the device’s power requirements in the D0 device state (device fully on).
_PR1 Object that evaluates to the device’s power requirements in the D1 device state. The only
devices that supply this level are those that can achieve the defined D1 device state according to
the related device class.
_PR2 Object that evaluates to the device’s power requirements in the D2 device state. The only
devices that supply this level are those that can achieve the defined D2 device state according to
the related device class.
_PR3 Object that evaluates to the device’s power requirements in the D3hot device state.
_PRW Object that evaluates to the device’s power requirements in order to wake the system from a
system sleeping state.
_PSW Control method that enables or disables the device’s wake function.
_IRC Object that signifies the device has a significant inrush current draw.
_S1D Shallowest D-state supported by the device in the S1 state
_S2D Shallowest D-state supported by the device in the S2 state
_S3D Shallowest D-state supported by the device in the S3 state
_S4D Shallowest D-state supported by the device in the S4 state
_S0W Deepest D-state supported by the device in the S0 state which can wake the device
_S1W Deepest D-state supported by the device in the S1 state which can wake the system.
_S2W Deepest D-state supported by the device in the S2 state which can wake the system.
_S3W Deepest D-state supported by the device in the S3 state which can wake the system.
_S4W Deepest D-state supported by the device in the S4 state which can wake the system.
_RST Control method that executes a function level reset of the device.
_PRR Object that evaluates to the device's platform level reset requirements.
Compatibility Note: The _PSW method is deprecated in ACPI 3.0. The _DSW method should be
used instead. OSPM will only use the _PSW method if OSPM does not support _DSW or if the
_DSW method is not present.
Arguments: (3)
Arg0 – An Integer that contains the device wake capability control
0 – Disable the device’s wake capabilities
1 – Enable the device’s wake capabilities
Arg1 – An Integer that contains the target system state (0-4)
Arg2 – An Integer that contains the target device state
0 – The device will remain in state D0
1 – The device will be placed in either state D0 or D1
2 – The device will be placed in either state D0, D1, or D2
3 – The device will be placed in either state D0, D1, D2, or D3
Return Value:
None
Arguments:
None
Return Value:
None
Arguments: (1)
Arg1 – An Integer indicating whether Enumeration power has been turned ON or will be turned
OFF.
0 – OFF
1 – ON
Return Value:
None
_PR0 must return the same data each time it is evaluated. All power resources referenced must exist
in the namespace.
Return Value:
A variable-length Package containing a list of References to power resources
This object evaluates to a package as defined in Table 7-255.
_PR1 must return the same data each time it is evaluated. All power resources referenced must exist
in the namespace.
• It is up to OSPM to determine whether to use D3 or D3hot. If there is a _PR3 for the device, it is
up to OSPM to decide whether to keep those power resources on or off after executing _PS3.
The decision may be based on other factors (e.g., being armed for wake).
interrupt must be wake-capable and enabled by the driver. See Section 3.11.1.1"Interrupt-based
Wake Events".
Arguments:
None
Return Value:
A variable-length Package containing wake information and a list of References to power resources
Additional Information
For OSPM to have the defined wake capability properly enabled for the device, the following must
occur:
1. All Power Resources referenced by elements 2 through N are put into the ON state.
a If present, the _DSW control method is executed to set the device-specific registers to
enable the wake functionality of the device.
b The D-state being entered must be deeper than or equal to that specified in the _SxD state
but shallower than or equal to that specified in the _SxW state.
Then, if the system enters a sleeping state OSPM must ensure:
Note: Regarding compatability--The _PSW method is deprecated in ACPI 3.0. OSPM must use _DSW if
it is present. Otherwise, it may use _PSW.
Arguments: (1)
Arg0 – An Integer containing a wake capability control
0 – Disable the device’s wake capabilities
1 – Enable the device’s wake capabilities
Return Value:
None
It is important to note that OSPM does not evaluate the _IRC object. It has no defined input
arguments nor does it return any value. OSPM derives meaning simply from the existence of the
_IRC object.
the S2 system sleeping state is supported in any deeper D-state unless specified by a corresponding
_S2W object. The table below provides a mapping from Desired Actions to Resultant D-state
entered based on the values returned from the _S2D, _PRW, and _S2W objects if they exist . (D/C
means Don’t Care – evaluation is irrelevant, and N/A means Non Applicable – object does not
exist).
_S3W must return the same integer each time it is evaluated. This value allows OSPM to choose a
deeper S-state to D-state mapping than specified by _S3D. This value must always be greater than or
equal to _S3D, if _S3D is present.
Arguments:
None
Return Value:
A single element Package containing a Reference to the power reset resource.
Note: Compatibility issue: The _BFS (Back From Sleep) and _GTS (Going To Sleep) methods are
deprecated in ACPI 5.0A.
The _PTS control method cannot modify the current configuration or power state of any device in
the system. For example, _PTS would simply store the sleep type in the embedded controller in
sequencing the system into a sleep state when the SLP_EN bit is set.
The platform must not make any assumptions about the state of the machine when _PTS is called.
For example, operation region accesses that require devices to be configured and enabled may not
succeed, as these devices may be in a non-decoding state due to plug and play or power management
operations.
States S1–S4 represent some system sleeping state. The S0 state is the system working state.
Transition into the S0 state from some other system state (such as sleeping) is automatic, and, by
virtue that instructions are being executed, OSPM assumes the system to be in the S0 state.
Transition into any system sleeping state is only accomplished by the operating software directing
the hardware to enter the appropriate state, and the operating software can only do this within the
requirements defined in the Power Resource and Bus/Device Package objects.
All run-time system state transitions (for example, to and from the S0 state), except S4 and S5, are
done similarly such that the code sequence to do this is the following:
/*
* Intel Architecture SetSleepingState example
*/
ULONG
SetSystemSleeping (
IN ULONG NewState
)
{
PROCESSOR_CONTEXT Context;
ULONG PowerSeqeunce;
BOOLEAN FlushCaches;
USHORT SlpTyp;
_asm {
lea eax, OsResumeContext
push eax ; Build real mode handler the resume
push offset sp50 ; context, with eip = sp50
call SaveProcessorState
cmp FlushCaches, 0
jz short sp10 ; If needed, ensure no dirty data in
sp50:
}
// Done..
*ResumeVector = NULL;
return 0;
}
On HW-reduced ACPI platforms all run-time system state transitions (for example, to and from the
S0 state) are done similarly, but include the following instead of PM1*_BLK register bit
manipulation:
After ensuring that any desired wake-capable interrupts are enabled, OSPM writes the HW-
reduced Sleep Type value to the Sleep Control Register and spins waiting for the WAK_STS bit
of the Sleep Status Register to be set, indicating a platform transition to the Working state.
• Devices states are compatible with the current Power Resource states. Only devices that solely
reference Power Resources that are in the ON state for a given device state can be in that device
state. In all other cases, the device is in the D3 (off) state1.
• Devices that are enabled to wake the system and that can do so from their current device state
can initiate a hardware event that transitions the system state to S0. This transition causes the
processor to continue execution where it left off.
To transition into the S1 state, the OSPM must flush all processor caches.
1. Or it is at least assumed to be in the D3 state by its device driver. For example, if the device doesn’t explic-
itly describe how it can stay in some non-off state while the system is in a sleeping state, the operating software must
assume that the device can lose its power and state.
• Devices that are enabled to wake the system and that can do so from their current device state
can initiate a hardware event that transitions the system state to S0. This transition causes the
processor to begin execution at its boot location. The platform runtime firmware performs
initialization of core functions as necessary to exit an S3 state and passes control to the firmware
resume vector. See Section 16.3.2 for more details on platform firmware initialization.
From the software viewpoint, this state is functionally the same as the S2 state. The operational
difference can be that some Power Resources that could be left ON to be in the S2 state might not be
available to the S3 state. As such, additional devices may need to be in a deeper state for S3 than S2.
Similarly, some device wake events can function in S2 but not S3.
Because the processor context can be lost while in the S3 state, the transition to the S3 state requires
that the operating software flush all dirty cache to DRAM.
implementation must also take care to ensure that events that occur subsequent to the wakeup source
being saved do not overwrite the original wakeup source.
The source event data returned by _SWS must be determined for each transition into the S0 state.
The value returned by _SWS must also be persistent during the system’s residency in the S0 state as
OSPM may evaluate _SWS multiple times. In this case, the platform must return the same source
event information for each invocation.
After evaluating an _SWS object within the \_GPE scope or within the scope of a GPE block device,
OSPM will invoke the _Wxx control method corresponding to the GPE index returned by _SWS if it
exists. This allows the platform to further determine source event if the GPE is shared among
multiple devices. See Section 5.6.4.2.2 for details.
types of notifications, see Section 5.6.6, “Device Object Notifications”). Notice that a device check
notification from the \_SB node will cause OSPM to re-enumerate the entire tree2.
Hardware is not obligated to track the state needed to supply the resulting status; however, this
method must return status concerning the last sleep operation initiated by OSPM. The return values
can be used to provide additional information to OSPM or user.
Arguments: (1)
Arg0 – An Integer containing the value of the sleeping state (1 for S1, 2 for S2, etc.)
Return Value:
A Package containing two Integers containing status and the power supply S-state
2. Only buses that support hardware-defined enumeration methods are done automatically at run-time. This
would include ACPI-enumerated devices.
9. _WAK is run
10. OSPM notifies all native device drivers of the return from the sleep state transition
11. _TTS(0) is run to indicate the return to the S0 state
_TTS() _TTS()
__PTS() __WAK()
This section describes the configuration and control of the processor’s power and performance
states. The major controls over the processors are:
• Processor power states: C0, C1, C2, C3, … Cn
• Processor clock throttling
• Processor performance states: P0, P1, … Pn
These controls are used in combination by OSPM to achieve the desired balance of the following
sometimes conflicting goals:
• Performance
• Power consumption and battery life
• Thermal requirements
• Noise-level requirements
Because the goals interact with each other, the operating software needs to implement a policy as to
when and where tradeoffs between the goals are to be made1. For example, the operating software
would determine when the audible noise of the fan is undesirable and would trade off that
requirement for lower thermal requirements, which can lead to lower processing performance. Each
processor configuration and control interface is discussed in the following sections along with how
controls interacts with the various goals.
1. A thermal warning leaves room for operating system tradeoffs to occur (to start the fan or to reduce perfor-
mance), but a critical thermal alert does not occur.
2. Notice that these CPU states map into the G0 working state. The state of the CPU is undefined in the G3
sleeping state, the Cx states only apply to the G0 state.
below.
THT_EN=1
and
DTY=value
Performance
State Px C0 Throttling
THT_EN=0
Interrupt or
HLT BM Access
P_LVL2 Interrupt
Interrupt P_LVL3,
ARB_DIS=1
C1 C2 C3
G0
Working
ACPI defines logic on a per-CPU basis that OSPM uses to transition between the different processor
power states. This logic is optional, and is described through the FADT table and processor objects
(contained in the hierarchical namespace). The fields and flags within the FADT table describe the
symmetrical features of the hardware, and the processor object contains the location for the
particular CPU’s clock logic (described by the P_BLK register block and _CST objects).
The P_LVL2 and P_LVL3 registers provide optional support for placing the system processors into
the C2 or C3 states. The P_LVL2 register is used to sequence the selected processor into the C2
state, and the P_LVL3 register is used to sequence the selected processor into the C3 state.
Additional support for the C3 state is provided through the bus master status and arbiter disable bits
(BM_STS in the PM1_STS register and ARB_DIS in the PM2_CNT register). System software
reads the P_LVL2 or P_LVL3 registers to enter the C2 or C3 power state. The Hardware must put
the processor into the proper clock state precisely on the read operation to the appropriate P_LVLx
register. The platform may alternatively define interfaces allowing OSPM to enter C-states using the
_CST object, which is defined in Section 8.4.2.1, “_CST (C States)”.
Processor power state support is symmetric when presented via the FADT and P_BLK interfaces;
OSPM assumes all processors in a system support the same power states. If processors have non-
symmetric power state support, then the platform runtime firmware will choose and use the lowest
common power states supported by all the processors in the system through the FADT table. For
example, if the CPU0 processor supports all power states up to and including the C3 state, but the
CPU1 processor only supports the C1 power state, then OSPM will only place idle processors into
the C1 power state (CPU0 will never be put into the C2 or C3 power states). Notice that the C1
power state must be supported. The C2 and C3 power states are optional (see the PROC_C1 flag in
the FADT table description in Section 5.2.6, “System Description Table Header”).
The following sections describe processor power states in detail.
duty value
clock off time
clock on time
duty width
The FADT contains the duty offset and duty width values. The duty offset value determines the
offset within the P_CNT register of the duty value. The duty width value determines the number of
bits used by the duty value (which determines the granularity of the throttling logic). The
performance of the processor by the clock logic can be expressed with the following equation:
d u ty se ttin g
% P e r fo rm a n c e * 100%
2 d u ty w id th
Figure 8-43 Equation 1 Duty Cycle Equation
Nominal performance is defined as “close as possible, but not below the indicated performance
level.” OSPM will use the duty offset and duty width to determine how to access the duty setting
field. OSPM will then program the duty setting based on the thermal condition and desired power of
the processor object. OSPM calculates the nominal performance of the processor using the equation
expressed in Equation 1. Notice that a dutysetting of zero is reserved.For example, the clock logic
could use the stop grant cycle to emulate a divided processor clock frequency on an IA processor
(through the use of the STPCLK# signal). This signal internally stops the processor’s clock when
asserted LOW. To implement logic that provides eight levels of clock control, the STPCLK# pin
could be asserted as follows (to emulate the different frequency settings):
Duty Width (3-bits)
0 1 2 3 4 5 6 7
dutysetting
0 - Reserved Value
1
STPCLK# Signal
2
3
CPU Clock Stopped
4 CPU Clock Running
5
6
7
Figure 8-44 Example Control for the STPCLK#
To start the throttling logic OSPM sets the desired duty setting and then sets the THT_EN bit HIGH.
To change the duty setting, OSPM will first reset the THT_EN bit LOW, then write another value to
the duty setting field while preserving the other unused fields of this register, and then set the
THT_EN bit HIGH again.
The example logic model is shown below:
System
Clock Logic
Arbiter
-- duty width
THT_EN THTL_DTY
P_CNT.4 P_CNT.x
Implementation of the ACPI processor power state controls minimally requires the support a single
CPU sleeping state (C1). All of the CPU power states occur in the G0/S0 system state; they have no
meaning when the system transitions into the sleeping state(S1-S4). ACPI defines the attributes
(semantics) of the different CPU states (defines four of them). It is up to the platform
implementation to map an appropriate low-power CPU state to the defined ACPI CPU state.
ACPI clock control is supported through the optional processor register block (P_BLK). ACPI
requires that there be a unique processor register block for each CPU in the system. Additionally,
ACPI requires that the clock logic for multiprocessor systems be symmetrical when using the
P_BLK and FADT interfaces; if the P0 processor supports the C1, C2, and C3 states, but P1 only
supports the C1 state, then OSPM will limit all processors to enter the C1 state when idle.
The following sections define the different ACPI CPU sleeping states.
the C3 state, the processor’s caches maintain state but the processor is not required to snoop bus
master or multiprocessor CPU accesses to memory.
The hardware can exit this state for any reason, but must always exit this state when an interrupt is to
be presented to the processor or when BM_RLD is set and a bus master is attempting to gain access
to memory.
OSPM is responsible for ensuring that the caches maintain coherency. In a uniprocessor
environment, this can be done by using the PM2_CNT.ARB_DIS bus master arbitration disable
register to ensure bus master cycles do not occur while in the C3 state. In a multiprocessor
environment, the processors’ caches can be flushed and invalidated such that no dynamic
information remains in the caches before entering the C3 state.
There are two mechanisms for supporting the C3 power state:
• Having OSPM flush and invalidate the caches prior to entering the C3 state.
• Providing hardware mechanisms to prevent masters from writing to memory (uniprocessor-only
support).
In the first case, OSPM will flush the system caches prior to entering the C3 state. As there is
normally much latency associated with flushing processor caches, OSPM is likely to only support
this in multiprocessor platforms for idle processors. Flushing of the cache is accomplished through
one of the defined ACPI mechanisms (described below in Section 8.2, “Flushing Caches”).
In uniprocessor-only platforms that provide the needed hardware functionality (defined in this
section), OSPM will attempt to place the platform into a mode that will prevent system bus masters
from writing into memory while the processor is in the C3 state. This is accomplished by disabling
bus masters prior to entering a C3 power state. Upon a bus master requesting an access, the CPU will
awaken from the C3 state and re-enable bus master accesses.
OSPM uses the BM_STS bit to determine the power state to enter when considering a transition to or
from the C2/C3 power state. The BM_STS is an optional bit that indicates when bus masters are
active. OSPM uses this bit to determine the policy between the C2 and C3 power states: a lot of bus
master activity demotes the CPU power state to the C2 (or C1 if C2 is not supported), no bus master
activity promotes the CPU power state to the C3 power state. OSPM keeps a running history of the
BM_STS bit to determine CPU power state policy.
The last hardware feature used in the C3 power state is the BM_RLD bit. This bit determines if the
Cx power state is exited as a result of bus master requests. If set, then the Cx power state is exited
upon a request from a bus master. If reset, the power state is not exited upon bus master requests. In
the C3 state, bus master requests need to transition the CPU back to the C0 state (as the system is
capable of maintaining cache coherency), but such a transition is not needed for the C2 state. OSPM
can optionally set this bit when using a C3 power state, and clear it when using a C1 or C2 power
state.
If the platform supports neither of the first two flushing options, then OSPM can attempt to manually
flush the cache if it meets the following criteria:
• A cache-enabled sequential read of contiguous physical memory of not more than 2 MB will
flush the platform caches.
• There are two additional FADT fields needed to support manual flushing of the caches:
• FLUSH_SIZE, typically twice the size of the largest cache in the system.
• FLUSH_STRIDE, typically the smallest cache line size in the system.
Return Value:
None
The buffer argument contains a list of DWORDs in the following format:
RevisionId – Revision of the buffer format
Count – The number of capability values in the capabilities array
Capabilities[Count] – Capabilities array
Each DWORD entry in the capabilities array is a bitfield that defines capabilities and features
supported by OSPM for processor configuration and power management as specified by the CPU
manufacturer.
The use of _PDC is deprecated in ACPI 3.0 in favor of _OSC. For backwards compatibility, _PDC
may be implemented using _OSC as follows:
Method(_PDC,1)
{
CreateDWordField (Arg0, 0, REVS)
CreateDWordField (Arg0, 4, SIZE)
//
// Local0 = Number of bytes for Arg0
//
Store (SizeOf (Arg0), Local0)
//
// Local1 = Number of Capabilities bytes in Arg0
//
Store (Subtract (Local0, 8), Local1)
//
// TEMP = Temporary field holding Capability DWORDs
//
CreateField (Arg0, 64, Multiply (Local1, 8), TEMP)
//
// Create the Status (STS0) buffer with the first DWORD = 0
// This is required to return errors defined by _OSC.
//
Name (STS0, Buffer () {0x00, 0x00, 0x00, 0x00})
//
// Concatenate the _PDC capabilities bytes to the STS0 Buffer
// and store them in a local variable for calling OSC
//
Concatenate (STS0, TEMP, Local2)
//
// Note: The UUID passed into _OSC is CPU vendor specific. Consult CPU
// vendor documentation for UUID and Capabilities Buffer bit definitions
//
_OSC (ToUUID("4077A616-290C-47BE-9EBD-D87058713953"), REVS, SIZE, Local2)
}
Section 6.2.11, “_OSC (Operating System Capabilities)”, describes the _OSC object, which can be
used to convey processor related OSPM capabilities to the platform. Consult CPU vendor specific
documentation for the UUID and Capabilities Buffer bit definitions used by _OSC for a specific
processor.
Return Value:
A variable-length Package containing a list of C-state information Packages as described below
Package {
Count // Integer
CStates[0] // Package
….
CStates[Count-1] // Package
}
The platform must expose a _CST object for either all or none of its processors. If the _CST object
exists, OSPM uses the C state information specified in the _CST object in lieu of P_LVL2 and
P_LVL3 registers defined in P_BLK and the P_LVLx_LAT values defined in the FADT. Also
notice that if the _CST object exists and the _PTC object does not exist, OSPM will use the
Processor Control Register defined in P_BLK and the C_State_Register registers in the _CST
object.
The platform may change the number or type of C States available for OSPM use dynamically by
issuing a Notify event on the processor object with a notification value of 0x81. This will cause
OSPM to re-evaluate any _CST object residing under the processor object notified. For example, the
platform might notify OSPM that the number of supported C States has changed as a result of an
asynchronous AC insertion / removal event.
The platform must specify unique C_State_Register addresses for all entries within a given _CST
object.
_CST eliminates the ACPI 1.0 restriction that all processors must have C State parity. With _CST,
each processor can have its own characteristics independent of other processors. For example,
processor 0 can support C1, C2 and C3, while processor 1 supports only C1.
The fields in the processor structure remain for backward compatibility.
Example
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBlk system IO address
6 ) // PBlkLen
{
Name(_CST, Package()
{
4, // There are four C-states defined here with three semantics
// The third and fourth C-states defined have the same C3 entry semantics
Package(){ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}, 1, 20, 1000},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x161)}, 2, 40, 750},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x162)}, 3, 60, 500},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x163)}, 3, 100, 250}
})
}
Notice in the example above that OSPM should anticipate the possibility of a _CST object providing
more than one entry with the same C_State_Type value. In this case OSPM must decide which
C_State_Register it will use to enter that C state.
Example
This is an example usage of the _CST object using the typical values as defined in ACPI 1.0.
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBLK system IO address
6 ) // PBLK Len
{
Name(_CST, Package()
{
2, // There are two C-states defined here – C2 and C3
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x124)}, 2, 2, 750},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x125)}, 3, 65, 500}
})
}
The platform will issue a Notify(\_SB.CPU0, 0x81) to inform OSPM to re-evaluate this object when
the number of available processor power states changes.
Num Integer The number of processors belonging to the domain for the particular C-state.
Processors (DWORD) OSPM will not start performing power state transitions to a particular C-state
until this number of processors belonging to the same domain for the
particular C-state have been detected and started.
Index Integer Indicates the index of the C-State entry in the _CST object for which the
(DWORD) dependency applies.
Given that the number or type of available C States may change dynamically, ACPI supports Notify
events on the processor object, with Notify events of type 0x81 causing OSPM to re-evaluate any
_CST objects residing under the particular processor object notified. On receipt of Notify events of
type 0x81, OSPM should re-evaluate any present _CSD objects also.
Example
This is an example usage of the _CSD structure in a Processor structure in the namespace. The
example represents a two processor configuration. The C1-type state can be independently entered
on each processor. For the C2-type state, there exists dependence between the two processors, such
that one processor transitioning to the C2-type state, causes the other processor to transition to the
C2-type state. A similar dependence exists for the C3-type state. OSPM will be required to
coordinate the C2 and C3 transitions between the two processors. Also OSPM can initiate a
transition on either processor to cause both to transition to the common target C-state.
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBlk system IO address
6 ) // PBlkLen
{
Name (_CST, Package()
{
3, // There are three C-states defined here with three semantics
Package(){ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}, 1, 20, 1000},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x161)}, 2, 40, 750},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x162)}, 3, 60, 500}
})
Name(_CSD, Package()
{
Package(){6, 0, 0, 0xFD, 2, 1} , // 6 entries,Revision 0,Domain 0,OSPM Coordinate
// Initiate on Any Proc,2 Procs, Index 1 (C2-type)
Package(){6, 0, 0, 0xFD, 2, 2} // 6 entries,Revision 0 Domain 0,OSPM Coordinate
// Initiate on Any Proc,2 Procs, Index 2 (C3-type)
})
}
Processor (
\_SB.CPU1, // Processor Name
2, // ACPI Processor number
, // PBlk system IO address
) // PBlkLen
{
Name(_CST, Package()
{
3, // There are three C-states defined here with three semantics
Package(){ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}, 1, 20, 1000},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x161)}, 2, 40, 750},
Package(){ResourceTemplate(){Register(SystemIO, 8, 0, 0x162)}, 3, 60, 500}
})
Name(_CSD, Package()
{
Package(){6, 0, 0, 0xFD, 2, 1}, // 6 entries,Revision 0,Domain 0,OSPM Coordinate
// Initiate on any Proc,2 Procs, Index 1 (C2-type)
Package(){6, 0, 0, 0xFD, 2, 2} // 6 entries,Revision 0,Domain 0,OSPM Coordinate
// Initiate on any Proc,2 Procs,Index 2 (C3-type)
})
}
When the platform issues a Notify(\_SB.CPU0, 0x81) to inform OSPM to re-evaluate _CST when
the number of available processor power states changes, OSPM should also evaluate _CSD.
belong to a container if they are associated in some way, such as a shared cache or a low power
mode which affects them all.
Parent for cluster 0 and Root
cluster 1
System
Cluster 0's children
Leaves
Figure 8-46 depicts an example system, which comprises a system level processor container, which
in turn contains two cluster processor containers, each of which contains two processors. The overall
collection is called the processor hierarchy and standard tree terminology is used to refer to different
parts of it. For example, an individual processor or container is called a node, the nodes which reside
within a processor container are called children of that parent, etc. This example is symmetric but
that is not a requirement. For example, a system may contain a different number of processors in
different containers or an asymmetric hierarchy where one side of the topology tree is deeper than
another. Also note that while this example includes a single top level processor container
encompassing all processors, this is not a requirement. It is legal for a system to be described using a
collection of trees.
The processor hierarchy can be used to describe a number of different characteristics of system
topology. The main example is shared power states, see the Low Power Idle states in Section 8.4.4
for details.
hierarchy is herein referred to as a node. The processor container device is declared using the
hardware identifier (_HID) ACPI0010.
To aid support of operating systems which do not parse processor containers, a container can carry a
Compatible ID (_CID) of PNP0A05, which represents a generic container device (see Section 5.6.7)
A processor container declaration must supply a _UID method returning an ID that is unique in the
processor container hierarchy. A processor container must contain either other processor containers
or other processor devices declared within its scope. In addition, a processor container may also
contain the following methods in its scope:
_LPI may be present under a processor device, and is described in Section 8.4.4.3 _RDI can only be
present under a singular top level processor container object, and is described below.
ACPI allows the definition of more than one root level processor container. In other words, it is
possible to define multiple top level containers. For example, in a NUMA system if there are no idle
states or other objects that need to be encapsulated at the system level, multiple NUMA-node level
processor containers may be defined at the top level of the hierarchy.
Processor Container Device objects are only valid for implementations conforming to ACPI 6.0 or
higher. A platform can ascertain whether an operating system supports parsing of processor
container objects via the _OSC method (see Section 6.2.11.2).
When the OS running on a given processor detects there is no more work to schedule on that
processor, it needs to select an idle state. The state may affect more than just that processor. A
processor going idle could be the last one in the system, or in a processor container, and therefore
may select a power state what affects multiple processors. In order to select such a state, the OS
needs to choose a local power state for each affected level in the processor hierarchy.
Cluster 0's children
Level ID: 3
System _LPI:
1: Power Down
LevelID: 2 LevelID: 2
_LPI: Cluster _LPI: Shallower states
1: Clock Gate Cluster1 1: Clock Gate
Cluster0's local states 2: Retention 0 2: Retention
3: Power Down 3: Power Down Deeper states
Consider a situation where Core 0 is the last active core depicted in the example system, Figure 8-
47. It may put the system into the lowest possible idle state. To do so, the OS chooses local state 3
(Power Down) for Core0, local state 3 (Power Down) for Cluster0, and local state 1 (Power Down)
for the system. However, most HW architectures only support a single power state request from the
OS to the platform. That is, it is not possible to make a separate local power state request per
hierarchy node to the platform. Therefore, the OS must combine the per level local power states into
a single Composite power state. The platform then acts on the Composite power state request.
A platform can only support a limited set of Composite power states, and not every combination of
Local Power states across levels is valid. The valid power states in our example system are depicted
in the following table:
together. For the sake of efficiency, the platform should generally not enter a power state with a
higher minimum residency than the requested one. However, this is not a strict functional
requirement. The platform may resolve to a state with higher minimum residency if it believes that is
the most efficient choice based on the specific states and circumstances.
Using the above example in Figure 8-47, a simple flow would look like this:
• Core0 goes idle – OS requests Core0 Power Down, Cluster0 Retention
• Platform receives Core0 requests – place Core0 in the Power Down state
• Core1 goes idle – OS requests Core1 Power Down, Cluster0 Power Down
• Platform receives Core1 request – puts Core1 in the Power Down state, and takes shallowest
vote for Cluster0, thus placing it into the Retention state
If the OSPM wanted to request power states beyond the cluster level, then Core0 and Core1 would
both vote for an idle state at System level too, and the platform would resolve the final state selection
across their votes and votes from any other processors under the System hierarchy via the method
described above.
As mentioned above, certain platforms support a mechanism called autopromotion where the votes
for higher level states may be implicit rather than explicit. In this scheme, the platform provides
OSPM with commands to request idle states at a lower level of the processor hierarchy which
automatically imply a specific idle state request at the respective higher level of the hierarchy. There
is no command to explicitly request entry into the higher level state, only the implicit request based
on the lower level state.
For example, if the platform illustrated in Figure 8-47 uses autopromotion for the Cluster0 Clock
Gated state, neither Core0 nor Core1 can explicitly request it. However, a core level Clock Gate
request from either Core0 or Core1 would imply a Cluster0 Clock Gate request. Therefore, if both
cores request core clock gating (or deeper), Cluster0 will be clock gated automatically by the
platform. Additional details on how autopromotion is supported by ACPI can be found in
Section 8.4.4.3.4.
8.4.4.2.2 OS Initiated
In the OS Initiated coordination scheme, OSPM only requests an idle state for a particular hierarchy
node when the last underlying processor goes to sleep. Obviously a processor always selects an idle
state for itself, but idle states for higher level hierarchy nodes like clusters are only selected when the
last processor in the cluster goes idle. The platform only considers the most recent request for a
particular node when deciding on its idle state.
The main motivations for OS Initiated coordination are:
1. Avoid overhead of OSPM evaluating selection for higher level idle states which will not be used
since other processors are still awake
2. Allow OSPM to make higher level idle state selections based on the latest information by taking
only the most recent request for a particular node and ignoring requests from processors which
went to sleep in the past (and may have been based on information which is now stale)
Using the above example in a simple flow would look like this:
Step OS View of power Platform view of
states power states
0: Cores 0 and 1 are both awake and running code Core0: Running Core0: Running
Core1: Running Core1: Running
Cluster0: Running Cluster0: Running
1 OS on Core0 requests Core0 PowerDown Core0: PowerDown Core0: Running
Core1: Running Core1: Running
Cluster0: Running Cluster0: Running
2 Platform observes request and places Core0 into Core0: PowerDown Core0: PowerDown
power down Core1: Running Core1: Running
Cluster0: Running Cluster0: Running
3 OS on Core1 requests Core1 PowerDown and Core0: PowerDown Core0: PowerDown
Cluster0 PowerDown Core1: PowerDown Core1: Running
Cluster0: PowerDown Cluster0: Running
4 Platform observes requests for Core1 and Core0: PowerDown Core0: PowerDown
Cluster0 and processes them Core1: PowerDown Core1: PowerDown
Cluster0: PowerDown Cluster0: PowerDown
Note that Core1 is making a cluster decision which affects both Core0 and Core1 so OSPM should
consider expected sleep duration, wake up latency requirements, device dependencies, etc. for both
cores and not just Core1 when requesting the cluster state.
The platform is still responsible for ensuring functional correctness. For example, if Core0 wakes
back up, the cluster state requested by Core1 in the above example should be exited or the entry into
the state should be aborted. OSPM has no responsibility to guarantee that the last core down is also
the first core up, or that a core does not wake up just as another is requesting a higher level sleep
state.
Once control is returned to the OS, it can handle as it sees fit – likely just re-evaluating the idle state
on both cores. When requests are received out of order, some overhead is introduced by rejecting the
command and forcing the OS to re-evaluate, but this is expected to be rare. Requests sent by the OS
should be seen by the platform in the same order the vast majority of the time, and in this case, the
idle command will proceed as normal.
It is possible that the OS may choose to keep a particular hierarchy node running even if all CPUs
underneath it are asleep. This gives rise to another potential corner case – see below.
Step OS View of power Platform view of
states power states
0: Core0 in PowerDown, and Core1 is running Core0: PowerDown Core0: PowerDown
Core1: Running Core1: Running
Cluster0: Running Cluster0: Running
1 Core1 goes idle – the OSPM OS requests Core1 Core0: PowerDown Core0: PowerDown
PowerDown and Cluster0 Retention Core1: PowerDown Core1: Running
Cluster0: Retention Cluster0: Running
2 Core0 receives an interrupt and wakes up into platform Core0: PowerDown Core0: Running
Core1: PowerDown Core1: Running
Cluster0: Retention Cluster0: Running
3 Core0 moves into OSPM and starts processing Core0: Running Core0: Running
interrupt Core1: PowerDown Core1: Running
Cluster0: Running Cluster0: Running
4 Core0 goes idle and OSPM request Core0 Power Core0: PowerDown Core0: Running
Down and requests Cluster0 to stay running Core1: PowerDown Core1: Running
Cluster0: Running Cluster0: Running
5 Core0’s idle request “passes” Core1’s request. Core0: PowerDown Core0: PowerDown
Platform puts Core0 to PowerDown. Core1: PowerDown Core1: Running
Even though the OS made a request for the cluster Cluster0: Running Cluster0: Running
to run, Platform does not know to reject Core0’s
request since it doesn’t include a Cluster idle state
As before, once control is returned to the OS, it can handle as it sees fit – likely just re-requesting the
idle state on both cores.
It is not required that all processors or processor containers include _LPI objects. However, if a
processor container includes an _LPI object, then all children processors or processor containers
must have _LPI objects.
The following sections describe the more complex properties of LPI in more detail, as well as rules
governing wakeup for LPI states.
LPI States are 1-indexed. Much like C and S states, LPI0 is considered to be a running state. For a
given LPI, the EPS is a 1 based index into the processor containers’ _LPI states. The index points at
the deepest local power state of the parent processor that the given LPI state enables. Every
shallower power state in the parent is also enabled. Taking the system described in Figure 8-47, the
states and EPS value for the states is described in Table 8-268.
Note that other worst case paths could end up determining the WCWL, but what is described above
is expected to be the most common. For example, there could be another period between the OS
making the idle request and the point of no return where the platform does not check for wake up
events, and which is longer than the time taken to enter and exit the power state. In that case that
period would become the worst case wakeup latency.
Minimum residency (MR) is the time after which a state becomes more energy efficient than any
shallower state. This parameter answers the fundamental question: how long does the hierarchy node
need to stay in the idle state to overcome the energy cost of transitioning in/out, and make choosing
that state a net win relative to shallower alternatives? Note that this also includes comparing against
not entering an idle state and keeping the node running. This is illustrated in Figure 8-49 which
shows the energy associated with three different state choices as a function of the sleep duration.
Note that State A’s MR relative to keeping the node running is not pictured.
Generally minimum residency and worst case wakeup latency will be larger for deeper states,
however this may not always be the case. Taking a different example to the above, consider two
system level states, StateY and StateZ, with similar entry overhead but where StateZ saves more
power than StateY. An abstract state list might look like:
StateX: MR = 100 us
StateY: MR = 1000 us
StateZ: MR = 800 us, power resource A must be OFF
From an energy perspective, StateZ is always preferred, but in this example, StateZ is only available
when certain device dependencies are met. This makes StateY attractive when the dependencies
cannot be met. Despite being the deeper (lower power) state, StateZ has a lower MR than StateY
since the entry overheads are similar and StateZ’s lower power more quickly amortizes the transition
cost. Although the crossover, which sets MR, should generally be versus the next shallowest state,
MR is defined relative to any shallower (higher power) state to deal with cases like this. In this case,
StateZ’s MR is set by the crossover with StateX since StateZ (if allowed based on device
dependencies) is always preferred to StateY. To achieve the lowest energy, OSPM must select the
deepest (lowest power) state for which all entry constraints are satisfied and should not assume that
deeper states are not viable just because a shallower state’s WCWL/MR threshold was not met.
Since WCWL may be used by OSPM to restrict idle state selection and guarantee response times to
critical interrupts, it should be set conservatively (erring on the high side) so that OSPM is not
surprised with worse than specified interrupt response time. On the other hand, MR helps OSPM
make efficient decisions. If MR is inaccurate in a certain scenario and OSPM chooses a state which
is deeper or shallower than optimal for a particular idle period, there may be some wasted energy but
the system will not be functionally broken. This is not to say that MR doesn’t matter –energy
efficiency is important – just that the platform may choose to optimize MR based on the typical case
rather than the worst case.
8.4.4.3.3.1 Minimum Residency and Worst Case Wakeup Latency Combination Across Hierarchy
Levels
The WCWL in _LPI is for a particular local state. When evaluating composite state choices versus
system latency tolerance as part of idle state selection, OSPM will add wakeup latencies across
hierarchy levels. For example, if a system has core powerdown with WCWL = 50 us and cluster
powerdown with WCWL = 20 us then the core powerdown + cluster powerdown composite state
latency is calculated as 70 us.
MRs defined in _LPI apply to a particular hierarchy node. The implicit assumption is that each
hierarchy node represents an independent power manageable domain and can be considered
separately. For example, assume that a cluster retention state is legal if the underlying cores are in
core powerdown or core retention. The MR for cluster retention is based on the energy cost of taking
shared logic outside of the cores in and out of retention versus the steady state power savings
achieved in that shared logic while in that state. The key is that the specific state chosen at the core
level does not fundamentally affect the cluster level decision since it is tied to properties of shared
logic outside the core. The energy cost of entering/exiting the cluster state and the power savings it
provides are independent of whether the core is in retention or powerdown. Based on this, MRs are
considered independent per level in ACPI. That is, when comparing MR for different states to
expected sleep duration for a particular node, OSPM uses the MRs defined in that node’s _LPI as is
with no adjustment based on states at lower levels of hierarchy (though of course the state must be
legal based on the lower level state’s Enabled Parent State property).
8.4.4.3.3.2 Known Limitations with Minimum Residency and Worst Case Wakeup Latency
Note that the WCWL and MR parameters are not perfect. For example, they do not scale with
frequency, voltage, temperature, and various other factors which may affect them. Nor are the rules
for how they combine across levels perfect. For example, cluster level MRs may move slightly based
on core state choice since the entry latency of the core state will delay entry into the cluster state,
derating the expected sleep duration. The cluster level MR can be adjusted to comprehend this, but if
multiple core level states with different entry latencies enable the same cluster state, then its MR
cannot perfectly comprehend them all. With that said, this set of parameters and combination
scheme is believed to strike a good balance between simplicity/usability and accuracy.
Reg = SelectedLocalState(CurrentProcessor).EntryMethod
WCWL = SelectedLocalState(CurrentProcessor).WCWL
MR = SelectedLocalState(CurrentProcessor).MR
CompositeState.EntryMethod = Reg
CompositeState.WCWL=WCWL
CompositeState.MR=MR
In OS Initiated mode it is also necessary for the OSPM to tell the platform on which hierarchy level the
calling processor is the last to go idle and request a power state. To do this, the algorithm above is modified
as follows:
Reg = SelectedLocalState(CurrentProcessor).EntryMethod
WCWL = SelectedLocalState(CurrentProcessor).WCWL
MR = SelectedLocalState(CurrentProcessor).MR
RegDecided = False
// Retrieve Level Index from Processor’s _LPI object
LastLevel = GetLevelIDOfLevel(CurrentProcessor)
If LocalState == Run
break
EM = LocalState.EntryMethod
WCWL = WCWL+ LocalState.WCWL
EM = LocalState.EntryMethod
If IsInteger(EM)
Reg.Addr = Reg.Addr+ZeroExtend(EM)
Else
// Entry method is register
Reg = EM
If IsProcessorLastInLevel(CurrentProcessor,level)
// If calling processor is last one to go idle in
// current level, retrieve Level Index from
// the container’s _LPI object
LastLevel = GetLevelIDOfLevel(level)
Reg.Addr = Reg.Addr+LastLevel
CompositeState.EntryMethod = Reg
CompositeState.WCWL=WCWL
CompositeState.MR=MR
In a platform coordinated system, it is possible for an LPI belonging to a hierarchy node above the
processor level to use an integer value of zero as its entry method. Since entry method composition
is done by addition, this results in the entry command for that state being the same as for a composite
state which only includes its children. An entry value of 0 essentially identifies a state as
“autopromotable.” This means that the OS does not explicitly request entry into this state, but that
the platform can automatically enter it when all children have entered states which allow the parent
state based on their EPS properties. OSPM should follow normal composition procedure for other
parameters (worst case wakeup latency, minimum residency, etc.) when including composite states
involving autopromotable local states.
This is described in the following example:
Device (SYSM) { // System level states
Name (_HID, "ACPI0010")
Name (_UID, 0)
Name (_LPI,
Package() {
0, // Version
0, // Level ID
1, // Count
Name(PLPI,
Package() {
0, // Version
0, // Level ID
2, // Count
Package () { // Retention state for CPU
40, // Min residency (uS)
20, // Wake latency (uS)
... // (skipped fields). . .
1, // Parent node can be
// in retention or running
ResourceTemplate () {
// Register Entry method
Register(FFH,
0x20,0x00,
0x000000000000DEAF,0x3),
}
... // (skipped fields). . .
},
Package () { // Power Gating state for CPU
100, // Min residency (uS)
80, // Wake latency (uS)
... // (skipped fields). . .
2, // Parent node can be in any state
ResourceTemplate () {
// Register Entry method
Register(FFH,
0x20,0x00,
0x0000000000000DEAD,0x3),
}
... // (skipped fields). . .
}
}
)
} // end of NOD0
....
}
} // End of SYM
In the example above, the OSPM on CPU0 and CPU1 would be able to select the following
composite states:
Power Down Power Down Run Core Power Down|Cluster Power Down
Register: 0xDEAD Integer: Register 0xDEAD+0x1020000 =
0x1020000 0x102DEAD
Power Down Power Down Power Down System Power Down
Register: 0xDEAD Integer: Register : Register 0xDECEA5ED
0x1020000 0xDECEA5ED
As can be seen in the example, the cluster level retention state defines the integer value of 0 as its
entry method. By virtue of composition, this means that the entry methods for the composite states
Core Power Down and Core Power Down|Cluster Retention are the same (FFH register 0xDEAD).
Similarly the composite states for Core Retention and Core Retention|Cluster Retention are the same
(FFH register 0xDEAF). Consequently, if both CPU0 and CPU1 are in either Power Down or Power
Retention, then the platform may enter cluster CLU0 into Retention.
The example also shows how a register based entry method at a high level overrides entry method
definitions of lower levels. As pointed above this is only possible if the selected LPI implies specific
LPIs at all lower levels. In this example the System Power Down LPI, entered through FFH register
0xDECEA5ED, implies Power Down LPIs at core and cluster level since based on EPS, no other
core/cluster local states could enable System Power Down.
running counts of their respective statistics. To measure a statistic over some time window, OSPM
should sample at the beginning and end and calculate the delta. Whether the counters restart from 0
on various flavors of reset/S-state exit is implementation defined so OSPM should resynchronize its
baseline on any reset or Sx exit.
The registers are optional, and if the feature is not present the platform must use a NULL register of
the following form:
ResourceTemplate() {Register {(SystemMemory, 0, 0, 0, 0)}}
The Usage Count register counts how many times the local state has been used. Whether it counts
entries or exits is implementation defined.
The Residency register counts how long the hierarchy node has been in the given LPI state, at a rate
given by LPI’s Residency Counter Frequency field. A frequency of 0 indicates that the counter runs
at an architecture-specific frequency. Whether the Residency counter runs continuously while in a
local state or updates only on exit is implementation defined. If OSPM wants to guarantee that the
reading for a particular state is current, it should read from that processor itself (or one of the
underlying child processors in the case of a higher level idle state).
PowerResource(PWRA,0,0) {…}
PowerResource(PWRB,0,0) {…}
PowerResource(PWRC,0,0) {…}
PowerResource(PWRD,0,0) {…}
PowerResource(PWRE,0,1) {…}
Device (FOO) {
_S0W(4) //Device in D3Cold can wake system from S0-idle
Name(_PR0,Package(){PWRA, PWRB, PWRC})
Name(_PR2,Package(){PWRA, PWRB})
Name(_PR3,Package(){PWRA})
Name(_PRE,Package(){PWRD})
Name(_PRW,Package(){0, 0, PWRD} // PWRD must be ON for FOO to wake system
}
Device (BAR) {
_S0W(3) // Device in D3Hot can wake system from S0-idle
Name(_PR0,Package(){PWRA, PWRB})
Name(_PR3,Package(){PWRC})
Name(_PRW,Package(){PWRC}) // PWRC must be ON for BAR to wake system
Device (BAH) {
_S0W(0) // This device can only wake the system from
// S0-idle if it is in D0
Name(_PR0,Package(){PWRA, PWRB, PWRC})
}
Device (SYM) {
Name(_RDI,
Package() {
0, // Version
Package(){} // Local State 1 is Shallow;
// Devices FOO, BAR and BAH can wake
// the system if enabled for wake
Package(){PWRA, PWRB} // RDI for Local State 2. State is deeper
// Device BAH cannot wake the system if this
// state is used, as it needs PWRA and PWRB
// to be able to wake the system
Package(){PWRA, PWRB, PWRC} // RDI for Local State 3.
// Devices BAH and BAR cannot wake
// the system, BAH needs PWRA, PWRB
// and PWRC, and BAR needs PWRC
// for all devices
Package(){PWRA, PWRB, PWRC, PWRD} // None of the devices listed
// above could wake the system
})
…
The example above declares a set of power resources (PWRA/B/C/D). Additionally, it has four
system level local states that have the following dependencies:
• LPI 1: Has no power resources dependencies
• LPI 2: Requires PWRA and PWRB to be off
• LPI 3: Requires PWRA, PWRB and PWRC to be off
• LPI 4: Requires all of the power resources in the example to be off
Device BAH can only wake the system if it is in the D0 state. To be in D0 it requires PWRA, PWRB
and PWRC to be on. Therefore device BAH could only wake the system from LPI 1. If this device is
enabled for wake, then the platform must not enter LPI 2 or deeper.
Device BAR can wake the system in whilst it is in any device state other than D3Cold. However, to
do so, it requires PWRC to be on. Therefore it can only wake the system from LPI 1 or LPI 2. If this
device is enabled for wake, then the platform must not enter LPI 3 or deeper.
Device FOO can wake the system whilst it is in any device state. However to do so, it requires
PWRD to be on. Therefore it can only wake the system from LPI 1 or LPI 2 or LPI 3. If this device
is enabled for wake, then the platform must not enter LPI 4.
None
Return Value:
A variable-length Package containing the resource dependencies with the following format:
Return Value Information
Package {
Revision, // Integer (WORD)
RDI[1], // Package
…
RDI[N] // Package
}
Package {
Resource[0], // Object Reference to a Power Resource Object
…
Resource[M] // Object Reference to a Power Resource Object
}
The Package contains as many RDI packages as there are system level power states in the root
processor container node’s _LPI object. The indexing of LPI power states in this _LPI object
matches the indexing of the RDI packages in the _RDI object. Thus the nth LPI state at the system
level has resource dependencies listed in the nth RDI. Each RDI package returns a list of the power
resource objects (passive or standard power resources) that must be in an OFF state to allow the
platform to enter the LPI state. If a system level LPI does not have any resource dependencies, the
corresponding RDI should be an empty Package.
Both traditional and passive power resources can be listed as dependencies in _RDI. For traditional
power resources, OSPM should ensure that the resource is OFF before requesting a dependent LPI
state. For passive power resources, there are no _ON/_OFF/_STA methods so the only requirement
is to check that the reference count is 0 before requesting a dependent LPI state.
OSPM requirements for ordering between device/power resource transitions and power resource
dependent LPI states differ based on the coordination scheme.
In a platform coordinated system the platform must guarantee correctness and demote the requested
power state to one that will satisfy the resource and processor dependencies. OSPM may use the
dependency info in _RDI as it sees fit, and may select a dependent LPI state even if resources remain
ON.
In an OS initiated system, OSPM must guarantee that all power resources are off (or reference
counts are 0, for passive power resources) before requesting a dependent LPI state.
8.4.4.4.1 Example
The following ASL describes a system that uses _RDI to describe the dependencies between three
power resources and system level power states:
PowerResource(PWRA,0,0) { // power rail local to DEVA
Method(_ON) {…} // active power resource (_OFF turns rail off)
Method(_OFF) {…}
Method(_STA) {…}
}
Device (DEVA) {
Name(_PR0,Package(){PWRA})
}
Device (DEVB) {
Name(_PR0,Package(){PWRB})
}
Device (DEVC) {
Name(_PR0,Package(){PWRC})
}
Device (SYM) {
Name(_RDI,
Package() {
0, // Revision
Package(){} // Local State 1 has no power resource
// dependencies
Package(){PWRA} // Local State 2 cannot be entered if DEVA
// is in D0 due to PWRA
Package(){PWRA, PWRB, PWRC} // Local State 3 cannot be
entered if
// DEVA is in D0 (due to PWRA), DEVB is in
// D0 (due to PWRB) or DEVC is in D0 (due to
// PWRC)
})
…
OSPM will turn the traditional power resource (PWRA) ON or OFF by waiting for the reference
count to reach 0 (meaning DEVA has left D0) and running the _OFF method. Similarly, PWRB is
turned ON or OFF based on the state of DEVB. Note that because the CPUs require the shared
power rail to be ON while they are running, PWRB’s _ON and _OFF drive a vote rather than the
physical HW controls for the power rail. In this case, _STA reflects the status of the vote rather than
the physical state of PWRB.
OSPM guarantees ordering between PWRA/PWRB’s _ON and _OFF transitions and DEVA/
DEVB’s D-state transitions. That is, PWRA can only be turned OFF after DEVA has left D0, and
must be turned ON before transitioning DEVA to D0. However, the OS requirements for ordering
between power resource transitions and power resource dependent LPI states differ based on the
coordination scheme.
In a platform coordinated system, OSPM may or may not track the power state of PWRA before
selecting local state 2 or 3. The platform must independently guarantee that PWRA is OFF before
entering local state 2 or 3, and must demote to a shallower state if OSPM selects local state 2 or 3
when PWRA is still on. Note that because OSPM is required to correctly sequence power resource
transitions with device power transitions, the platform does not need to check the state of DEVA; it
can rely on the state of PWRA to infer that DEVA is in an appropriate D-state.
Similarly, OSPM may or may not track the state of PWRB and PWRC before selecting local state 3,
and the platform must independently guarantee that PWRB is off before entering either state.
Because PWRC is a passive power resource, the platform does not know when the reference count
on the power resource reaches 0 and instead must track DEVC’s state itself. Unless the platform has
other mechanisms to track the state of DEVC, PWRC should be defined as a traditional power
resource so that the platform can use its _ON and _OFF methods to guarantee correctness of
operation.
In an OS initiated system, OSPM is required to guarantee that PWRA is OFF before selecting either
local state 2 or 3. OSPM may meet this guarantee by waiting until it believes a processor is the last
man down in the system, before checking the state of PWRA, and only selecting local state 2 or 3 in
this case. If the processor was the last man down, then the request to enter local state 2 or 3 is legal
and the platform can honor it. If another processor woke up in the meantime and turned PWRA on,
then this becomes a race between processors which is addressed in the OS Initiated Request
Semantics section (Section 8.4.4.2.2.1). Similarly, OSPM must guarantee PWRB is off and PWRC’s
reference count is 0 before selecting local state 3.
In an OS initiated system, because OSPM guarantees that power resources are in their correct states
before selecting system power states, the platform should use passive power resources unless there is
additional runtime power savings to turning a power resource OFF. On a platform that only supports
OS Initiated transitions, PWRB should be defined as a passive power resource because it is shared
with processors and can only be turned off when the system power state is entered.
8.4.4.5 Compatibility
In order to support older operating systems which do not support the new idle management
infrastructure, the _OSC method can be used to detect whether the OSPM supports parsing
processor containers and objects associated with LPIs and (_LPI, _RDI). This is described in
Section 6.2.11.1.
A platform may choose to expose both _CST and _LPI for backward compatibility with operating
systems which do not support _LPI. In this case, if OSPM supports _LPI, then it should be used in
preference to _CST. At run time only one idle state methodology should be used across the entire
processor hierarchy - _LPI or _CST, but not a mixture of both.
P_BLK based throttling state controls are described in Section 4, “ACPI Hardware Specification”
and Section 8.1.1, “Processor Power State C0”. Combined _PTC, _TSS, and _TPC based throttling
state controls expand the functionality of the P_BLK based control allowing the number of T states
to be dynamic and accommodate CPU architecture specific T state control mechanisms as indicated
by registers defined using the Functional Fixed Hardware address space. While platform definition
of the _PTC, _TSS, and _TPC objects is optional, all three objects must exist under a processor for
OSPM to successfully perform processor throttling via these controls.
The platform must expose a _PTC object for either all or none of its processors. Notice that if the
_PTC object exists, the specified register is used instead of the P_CNT register specified in the
Processor term. Also notice that if the _PTC object exists and the _CST object does not exist, OSPM
will use the processor control register from the _PTC object and the P_LVLx registers from the
P_BLK.
Example
This is an example usage of the _PTC object in a Processor object list:
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBlk system IO address
6 ) // PBlkLen
{ // Object List
Example
This is an example usage of the _PTC object using the values defined in ACPI 1.0. This is an
illustrative example to demonstrate the mechanism with well-known values.
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBLK system IO address
6 ) // PBLK Len
{ // Object List
Return Value:
A variable-length Package containing a list of Tstate sub-packages as described below
the corresponding state entry in the _TSS as indicated by the value returned by the _TPC method or
any lower power (higher numbered) state entry in the _TSS.
Arguments:
None
Return Value:
An Integer containing the number of states supported:
0 – states 0 ... nth state available (all states available)
1 – state 1 ... nth state available
2 – state 2 ... nth state available
…
n – state n available only
In order to support dynamic changes of _TPC object, Notify events on the processor object of type
0x82 will cause OSPM to reevaluate any _TPC object in the processor’s object list. This allows
AML code to notify OSPM when the number of supported throttling states may have changed as a
result of an asynchronous event. OSPM ignores _TPC Notify events on platforms that support P-
states unless the platform has limited OSPM’s use of P-states to the lowest power P-state. OSPM
may choose to disregard any platform conveyed T-state limits when the platform enables OSPM
usage of other than the lowest power P-state.
Package {
NumEntries // Integer
Revision // Integer (BYTE)
Domain // Integer (DWORD)
CoordType // Integer (DWORD)
NumProcessors // Integer (DWORD)
}
Example
This is an example usage of the _TSD structure in a Processor structure in the namespace. The
example represents a two processor configuration with three T-states per processor. For all T-states,
there exists dependence between the two processors, such that one processor transitioning to a
particular T-state, causes the other processor to transition to the same T-state. OSPM will be
required to coordinate the T-state transitions between the two processors and can initiate a transition
on either processor to cause both to transition to the common target T-state.
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBlk system IO address
6) // PBlkLen
{ //Object List
Package() {
0x58, // Frequency Percentage (87.5%)
0x0, // Power
0x0, // Transition Latency
0xF, // Control THT_EN:1 THTL_DTY:111
0x0, // Status
}
Package() {
0x4B, // Frequency Percentage (75%)
0x0, // Power
0x0, // Transition Latency
0xE, // Control THT_EN:1 THTL_DTY:110
0x0, // Status
}
})
Processor (
Package() {
0x58, // Frequency Percentage (87.5%)
0x0, // Power
0x0, // Transition Latency
0xF, // Control THT_EN:1 THTL_DTY:111
0x0, // Status
}`
Package() {
0x4B, // Frequency Percentage (75%)
0x0, // Power
0x0, // Transition Latency
0xE, // Control THT_EN:1 THTL_DTY:110
0x0, // Status
}
})
Processor performance control objects include the ‘_PCT’ package, ‘_PSS’ package, and the ‘_PPC’
method as detailed below.
Example
Name (_PCT, Package()
{
ResourceTemplate(){Perf_Ctrl_Register}, //Generic Register Descriptor
ResourceTemplate(){Perf_Status_Register} //Generic Register Descriptor
}) // End of _PCT
performance states including internal CPU core frequency, typical power dissipation, control
register values needed to transition between performance states, and status register values that allow
OSPM to verify performance transition status after any OS-initiated transition change request. The
list is sorted in descending order by typical power dissipation. As a result, the zeroth entry describes
the highest performance state and the ‘nth’ entry describes the lowest performance state.
Arguments:
None
Return Value:
A variable-length Package containing a list of Pstate sub-packages as described below
Argument Information:
Arg1 – Status Code
0: Success – OSPM is now using the performance states specified
1: Failure – OSPM has not changed the number of performance states in use.
Example
This is an example of processor performance control objects in a processor object list.
In this example, a uniprocessor platform that has processor performance capabilities with support for
three performance states as follows:
1. 500 MHz (8.2W) supported at any time
2. 600 MHz (14.9W) supported only when AC powered
3. 650 MHz (21.5W) supported only when docked
It takes no more than 500 microseconds to transition from one performance state to any other
performance state.
During a performance transition, bus masters are unable to access memory for a maximum of 300
microseconds.
The PERF_CTRL and PERF_STATUS registers are implemented as Functional Fixed Hardware.
The following ASL objects are implemented within the system:
\_SB.DOCK: Evaluates to 1 if system is docked, zero otherwise.
\_SB.AC: Evaluates to 1 if AC is connected, zero otherwise.
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBlk system IO address
6 ) // PBlkLen
{
Name(_PCT, Package () // Performance Control object
{
ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}, // PERF_CTRL
ResourceTemplate(){Register(FFixedHW, 0, 0, 0)} // PERF_STATUS
}) // End of _PCT object
The platform will issue a Notify(\_SB.CPU0, 0x80) to inform OSPM to re-evaluate this object when
the number of available processor performance states changes.
Example
This is an example usage of the _PSD structure in a Processor structure in the namespace. The
example represents a two processor configuration with three performance states per processor. For
all performance states, there exists dependence between the two processors, such that one processor
transitioning to a particular performance state, causes the other processor to transition to the same
performance state. OSPM will be required to coordinate the P-state transitions between the two
processors and can initiate a transition on either processor to cause both to transition to the common
target P-state.
Processor (
\_SB.CPU0, // Processor Name
1, // ACPI Processor number
0x120, // PBlk system IO address
6 ) // PBlkLen
{
Name(_PCT, Package () // Performance Control object
{
ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}, // PERF_CTRL
ResourceTemplate(){Register(FFixedHW, 0, 0, 0)} // PERF_STATUS
}) // End of _PCT object
Processor (
\_SB.CPU1, // Processor Name
2, // ACPI Processor number
, // PBlk system IO address
) // PBlkLen
{
Name(_PCT, Package () // Performance Control object
{
ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}, // PERF_CTRL
ResourceTemplate(){Register(FFixedHW, 0, 0, 0)} // PERF_STATUS
}) // End of _PCT object
runtime, OSPM requests desired performance on this abstract scale and the platform entity is
responsible for translating the OSPM performance requests into actual hardware performance states.
The platform may also support the ability to autonomously select a performance level appropriate to
the current workload. In this case, OSPM conveys information to the platform that guides the
platform's performance level selection.
Prior processor performance controls (P-states and T-states) have described their effect on processor
performance in terms of processor frequency. While processor frequency is a rough approximation
of the speed at which the processor completes work, workload performance isn’t guaranteed to scale
with frequency. Therefore, rather than prescribe a specific metric for processor performance,
Collaborative Processor Performance Control leaves the definition of the exact performance metric
to the platform. The platform may choose to use a single metric such as processor frequency, or it
may choose to blend multiple hardware metrics to create a synthetic measure of performance. In this
way the platform is free to deliver the OSPM requested performance level without necessarily
delivering a specific processor frequency. OSPM must make no assumption about the exact meaning
of the performance values presented by the platform, or how they may correlate to specific hardware
metrics like processor frequency.
Platforms must use the same performance scale for all processors in the system. On platforms with
heterogeneous processors, the performance characteristics of all processors may not be identical. In
this case, the platform must synthesize a performance scale that adjusts for differences in processors,
such that any two processors running the same workload at the same performance level will
complete in approximately the same time. The platform should expose different capabilities for
different classes of processors, so as to accurately reflect the performance characteristics of each
processor.
The control mechanisms are abstracted by the _CPC object method, which describes how to control
and monitor processor performance in a generic manner. The register methods may be implemented
in the Platform Communications Channel (PCC) interface (see Section 14). This provides sufficient
flexibility that the entity OSPM communicates with may be the processor itself, the platform chipset,
or a separate entity (e.g., a BMC).
In order to provide backward compatibility with existing tools that report processor performance as
frequencies, the _CPC object can optionally provide processor frequency range values for use by
the OS. If these frequency values are provided, the restrictions on _CPC information usage still
remain: the OSPM must make no assumption about the exact meaning of the performance values
presented by the platform, and all functional decisions and interaction with the platform still happen
using the abstract performance scale. The frequency values are only contained in the _CPC object
to allow the OS to present performance data in a simple frequency range, when frequency is not
discoverable from the platform via another mechanism.
Package
{
NumEntries, // Integer
Revision, // Integer
HighestPerformance, // Integer
or Buffer (Resource Descriptor)
NominalPerformance, // Integer
or Buffer (Resource Descriptor)
LowestNonlinearPerformance, // Integer
or Buffer (Resource Descriptor)
LowestPerformance, // Integer
or Buffer (Resource Descriptor)
GuaranteedPerformanceRegister, // Buffer
(Resource Descriptor)
DesiredPerformanceRegister, // Buffer
(Resource Descriptor)
MinimumPerformanceRegister, // Buffer
(Resource Descriptor)
MaximumPerformanceRegister, // Buffer
(Resource Descriptor)
PerformanceReductionToleranceRegister, // Buffer
(Resource Descriptor)
TimeWindowRegister, // Buffer
(Resource Descriptor)
CounterWraparoundTime, // Integer
or Buffer (Resource Descriptor)
ReferencePerformanceCounterRegister, // Buffer
(Resource Descriptor)
DeliveredPerformanceCounterRegister, // Buffer
(Resource Descriptor)
PerformanceLimitedRegister, // Buffer
(Resource Descriptor)
CPPCEnableRegister // Buffer
(Resource Descriptor)
AutonomousSelectionEnable, // Integer
or Buffer (Resource Descriptor)
AutonomousActivityWindowRegister, // Buffer
(Resource Descriptor)
EnergyPerformancePreferenceRegister, // Buffer
(Resource Descriptor)
ReferencePerformance // Integer
or Buffer (Resource Descriptor)
LowestFrequency, // Integer or Buffer
(Resource Descriptor)
NominalFrequency // Integer or Buffer
(Resource Descriptor)
}
The _CPC object provides OSPM with platform-specific performance capabilities / thresholds and
control registers that OSPM uses to control the platform’s processor performance settings. These are
described in the following sections. While the platform may specify register sizes within an
allowable range, the size of the capabilities / thresholds registers must be compatible with the size of
the control registers. If the platform supports CPPC, the _CPC object must exist under all processor
objects. That is, OSPM is not expected to support mixed mode (CPPC & legacy PSS, _PCT, _PPC)
operation.
Starting with ACPI Specification 6.2, all _CPC registers can be in PCC, System Memory, System
IO, or Functional Fixed Hardware address spaces. OSPM support for this more flexible register
space scheme is indicated by the “Flexible Address Space for CPPC Registers” _OSC bit.
Highest Performance
Nominal Performance
Guaranteed Performance
Allowed Range
Lowest Nonlinear Performance
Lowest Performance
Note: Not all performance levels need be unique. A platform's nominal performance level may also be its
highest performance level, for example.
Notify events of type 0x85 to the processor device object cause OSPM to re-evaluate the Highest
Performance Register, but only when it is encoded as a buffer. Note: OSPM will not re-evaluate the
_CPC object as a result of the notification.
Maximum Performance
Desired Performance Performance
Allowed Range
Performance Reduction Tolerance
Minimum Performance
OSPM may select any performance value within the continuous range of values supported by the
platform. Internally, the platform may implement a small number of discrete performance states and
may not be capable of operating at the exact performance level desired by OSPM. If a platform-
internal state does not exist that matches OSPM’s desired performance level, the platform should
round desired performance as follows:
• If OSPM has selected a desired performance level greater than or equal to guaranteed
performance, the platform may round up or down. The result of rounding must not be less than
guaranteed performance.
• If OSPM has selected a desired performance level less than guaranteed performance and a
maximum performance level not less than guaranteed performance, the platform must round up.
If OSPM has selected both desired performance level and maximum performance level less than
guaranteed performance, the platform must round up if rounding up does not violate the maximum
performance level. Otherwise, round down. OSPM must tolerate the platform rounding down if it
chooses to set the maximum performance level less than guaranteed performance.This approach
favors performance, except in the case where performance has been limited due to a platform or
OSPM constraint.
When Autonomous Selection is enabled, OSPM limits the processor's performance selection by
writing appropriate constraining values to the Minimum and Maximum Performance registers.
Setting Minimum and Maximum to the same value effectively disables Autonomous selection.
Note: When processors are within the same dependency domain, Maximum performance may only be
actually limited when allowed by hardware coordination.
inclusive. Desired performance may take one of two meanings, depending on whether the desired
performance is above or below the guaranteed performance level.
• Below the guaranteed performance level, desired performance expresses the average
performance level the platform must provide subject to the Performance Reduction Tolerance.
• Above the guaranteed performance level, the platform must provide the guaranteed performance
level. The platform should attempt to provide up to the desired performance level, if current
operating conditions allow for it, but it is not required to do so
When Autonomous Selection is enabled, it is not necessary for OSPM to assess processor workload
performance demand and convey a corresponding performance delivery request to the platform via
the Desired Register. If the Desired Performance Register exists, OSPM may provide an explicit
performance requirement hint to the platform by writing a non-zero value. In this case, the delivered
performance is not bounded by the Performance Reduction Tolerance Register, however, OSPM can
influence the delivered performance by writing appropriate values to the Energy Performance
Preference Register. Writing a zero value to the Desired Performance Register or the non-existence
of the Desired Performance Register causes the platform to autonomously select a performance level
appropriate to the current workload.
Note: The Desired Performance Register is optional only when OPSM indicates support for CPPC2 in
the platform-wide _OSC capabilities and the Autonomous Selection Enable field is encoded as an
Integer with a value of 1.
Optional
Attribute: Read/Write
Size: 8-32 bits
The Performance Reduction Tolerance Register is used by OSPM to convey the deviation below
the Desired Performance that is tolerable. It is expressed by OSPM as an absolute value on the
performance scale. Performance Tolerance must be less than or equal to the Desired Performance. If
the platform supports the Time Window Register, the Performance Reduction Tolerance conveys the
minimal performance value that may be delivered on average over the Time Window. If this register
is not implemented, the platform must assume Performance Reduction Tolerance = Desired
Performance.
When Autonomous Selection is enabled, values written to the Performance Reduction Tolerance
Register are ignored.
Optional
Attribute: Read/Write
Size: 8-32 bits
Units: milliseconds
When Autonomous Selection is not enabled, OSPM may write a value to the Time Window
Register to indicate a time window over which the platform must provide the desired performance
level (subject to the Performance Reduction Tolerance). OSPM sets the time window when electing
a new desired performance The time window represents the minimum time duration for OSPM’s
evaluation of the platform’s delivered performance (see Section 8.4.7.1.3.1 “Performance Counters”
for details on how OSPM computes delivered performance). If OSPM evaluates delivered
performance over an interval smaller than the specified time window, it has no expectations of the
performance delivered by the platform. For any evaluation interval equal to or greater than the time
window, the platform must deliver the OSPM desired performance within the specified tolerance
bound.
If OSPM specifies a time window of zero or if the platform does not support the time window
register, the platform must deliver performance within the bounds of Performance Reduction
Tolerance irrespective of the duration of the evaluation interval.
When Autonomous Selection is enabled, values written to the Time Window Register are ignored.
Reads of the Time Window register indicate minimum length of time (in ms) between successive
reads of the platform's performance counters. If the Time Window register is not supported then
there is no minimum time requirement between successive reads of the platform's performance
counters.
The delivered performance should always fall in the range [Lowest Performance, Highest
Performance], inclusive. OSPM may use the delivered performance counters as a feedback
mechanism to refine the desired performance state it selects.
When Autonomous Selection is not enabled, there are constraints that govern how and when the
performance delivered by the platform may deviate from the OSPM Desired Performance.
Corresponding to OSPM setting a Desired Performance: at any time after that, the following
constraints on delivered performance apply
• Delivered performance can be higher than the OSPM requested desired performance if the
platform is able to deliver the higher performance at same or lower energy than if it were
delivering the desired performance.
• Delivered performance may be higher or lower than the OSPM desired performance if the
platform has discrete performance states and needed to round down performance to the nearest
supported performance level in accordance to the algorithm prescribed in the OSPM controls
section.
• Delivered performance may be lower than the OSPM desired performance if the platform’s
efficiency optimizations caused the delievered performance to be less than desired performance.
However, the delivered performance should never be lower than the OSPM specified.
• Performance Reduction Tolerance. The Performance Reduction Tolerance provides a bound to
the platform on how aggressive it can be when optimizing performance delivery. The platform
should not perform any optimization that would cause delivered performance to be lower than
the OSPM specified Performance Reduction Tolerance.
Attribute: Read
Size: 32 or 64 bits
The Reference Performance Counter Register counts at a fixed rate any time the processor is active.
It is not affected by changes to Desired Performance, processor throttling, etc. If Reference
Performance is supported, the Reference Performance Counter accumulates at a rate corresponding
to the Reference Performance level. Otherwise, the Reference Performance Counter accumulates at
the Nominal performance level.
Attribute: Read
Size: 32 or 64 bits
The Delivered Performance Counter Register increments any time the processor is active, at a rate
proportional to the current performance level, taking into account changes to Desired Performance.
When the processor is operating at its reference performance level, the delivered performance
counter must increment at the same rate as the reference performance counter.
Optional
Register or DWORD
Attribute: Read
Size: 32 or 64 bits
Units: seconds
Counter Wraparound Time provides a means for the platform to specify a rollover time for the
Reference/Delivered performance counters. If greater than this time period elapses between OSPM
querying the feedback counters, the counters may wrap without OSPM being able to detect that they
have done so.
If not implemented (or zero), the performance counters are assumed to never wrap during the
lifetime of the platform.
Attribute: Read/Write
Size: >=2 bit(s)
In the event that the platform must constrain the delivered performance to less than the minimum
performance or the desired performance (or, less than the guaranteed performance, if desired
performance is greater than guaranteed performance) due to an unpredictable event, the platform
must set the performance limited indicator to a non-zero value. This indicates to OSPM that an
unpredictable event has limited processor performance, and the delivered performance may be less
than desired / minimum performance.
Bits within the Performance Limited Register are sticky, and will remain non-zero until OSPM
clears the bit. The platform should only issue a Notify when Minimum Excursion transitions from 0
to 1 to avoid repeated events when there is sustained or recurring limiting but OSPM has not cleared
the previous indication.
Note: All accesses to the Performance Limited Register must be made using interlocked operations, by
both accessing entities.
The performance limited register should only be used to report short term, unpredictable events (e.g.,
PROCHOT being asserted). If the platform is capable of identifying longer term, predictable events
that limit processor performance, it should use the guaranteed performance register to notify OSPM
of this limitation. Changes to guaranteed performance should not be more frequent than once per
second. If the platform is not able to guarantee a given performance level for a sustained period of
time (greater than one second), it should guarantee a lower performance level and opportunistically
enter the higher performance level as requested by OSPM and allowed by current operating
conditions.
Optional
Attribute: Read/Write
Size: >=1 bit(s)
If supported by the platform, OSPM writes a one to this register to enable CPPC on this processor.
If not implemented, OSPM assumes the platform always has CPPC enabled.
Optional
Register or DWORD
Attribute: Read/Write
Size: >=1 bit(s)
If supported by the platform, OSPM writes a one to this register to enable Autonomous Performance
Level Selection on this processor. CPPC must be enabled via the CPPC Enable Register to enable
Autonomous Performance Level Selection. Platforms that exclusively support Autonomous
Selection must populate this field as an Integer with a value of 1.
When Autonomous Selection is enabled, the platform is responsible for selecting performance
states. OSPM is not required to assess processor workload performance demand and convey a
corresponding performance delivery request to the platform via the Desired Performance Register.
Optional
Attribute: Read/Write
Size: 10 bit(s)
Units: Bits 06:00 - Significand, Bits 09:07 -
Exponent, Base_Time_Unit = 1E-6 seconds (1 microsecond)
If supported by the platform, OSPM may write a time value (10^3-bit exp * 7-bit mantissa in 1µsec
units: 1us to 1270 sec) to this field to indicate a moving utilization sensitivity window to the
platform's autonomous selection policy. Combined with the Energy Performance Preference
Register value, the Activity Window influences the rate of performance increase / decrease of the
platform's autonomous selection policy. OSPM writes a zero value to this register to enable the
platform to determine an appropriate Activity Window depending on the workload.
Writes to this register only have meaning when Autonomous Selection is enabled.
Optional
Attribute: Read/Write
Size: 4-8 bit(s
If supported by the platform, OSPM may write a range of values from 0 (performance preference) to
0xFF (energy efficiency preference) that influences the rate of performance increase /decrease and
the result of the hardware's energy efficiency and performance optimization policies.This provides a
means for OSPM to limit the energy efficiency impact of the platform's performance-related
optimizations / control policy and the performance impact of the platform's energy efficiency-related
optimizations / control policy.
Writes to this register only have meaning when Autonomous Selection is enabled.
Note: In System-on-Chip-based platforms where the SoC is comprised of multiple device components in
addition to the processor, OSPM’s use of the Desired and Maximum registers for thermal control
may not produce an optimal result because of SoC device interaction. The use of proprietary
package level thermal controls (if they exist) may produce more optimal results.
Table 8-278 PCC Commands Codes used by Collaborative Processor Performance Control
Command Description
0x00 Read registers. Executed to request the platform update all registers for all enabled
processors with their current value.
0x01 Write registers. Executed to notify the platform one or more read/write registers for an
enabled processor has been updated.
0x02-0xFF All other values are reserved.
Processor (\_SB.CPU0, 1, 0, 0)
{
Name(_CPC, Package()
{
21, // NumEntries
2, // Revision
ResourceTemplate(){Register(PCC, 32, 0, 0x120, 2)},
// Highest Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x124, 2)},
// Nominal Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x128, 2)},
// Lowest Nonlinear Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x12C, 2)},
// Lowest Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x130, 2)},
// Guaranteed Performance Register
ResourceTemplate(){Register(PCC, 32, 0, 0x110, 2)},
// Desired Performance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Minimum Performance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Maximum Performance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Performance Reduction Tolerance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Time Window Register
ResourceTemplate(){Register(PCC, 8, 0, 0x11B, 2)},
// Counter Wraparound Time
ResourceTemplate(){Register(PCC, 32, 0, 0x114, 2)},
// Reference Performance Counter Register
ResourceTemplate(){Register(PCC, 32, 0, 0x116, 2)},
// Delivered Performance Counter Register
ResourceTemplate(){Register(PCC, 8, 0, 0x11A, 2)},
// Performance Limited Register
ResourceTemplate(){Register(PCC, 1, 0, 0x100, 2)},
// CPPC Enable Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Autonomous Selection Enable
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Autonomous Activity Window Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Energy Performance Preference Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)}
// Reference Performance
})
}
Processor (\_SB.CPU1, 2, 0, 0)
{
Name(_CPC, Package()
{
21, // NumEntries
2, // Revision
ResourceTemplate(){Register(PCC, 32, 0, 0x220, 2)},
// Highest Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x224, 2)},
// Nominal Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x228, 2)},
// Lowest Nonlinear Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x22C, 2)},
// Lowest Performance
ResourceTemplate(){Register(PCC, 32, 0, 0x230, 2)},
// Guaranteed Performance Register
ResourceTemplate(){Register(PCC, 32, 0, 0x210, 2)},
// Desired Performance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Minimum Performance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Maximum Performance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Performance Reduction Tolerance Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Time Window Register
ResourceTemplate(){Register(PCC, 8, 0, 0x21B, 2)},
// Counter Wraparound Time
ResourceTemplate(){Register(PCC, 32, 0, 0x214, 2)},
// Reference Performance Counter Register
ResourceTemplate(){Register(PCC, 32, 0, 0x216, 2)},
// Delivered Performance Counter Register
ResourceTemplate(){Register(PCC, 8, 0, 0x21A, 2)},
// Performance Limited Register
ResourceTemplate(){Register(PCC, 1, 0, 0x200, 2)},
// CPPC Enable Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Autonomous Selection Enable
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Autonomous Activity Window Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)},
// Energy Performance Preference Register
ResourceTemplate(){Register(SystemMemory, 0, 0, 0, 0)}
// Reference Performance
})
Return Value:
A Package as described below.
Argument Information:
Arg1 – Status Code
0: success – OSPM idled the number of logical processors indicated by the value of Arg2
1: no action was performed
Arg2 – A 4-byte buffer that represents a DWORD that is the number of logical processors that are
now idled)
The platform may request a number of logical processors to be idled that exceeds the available
number of logical processors that can be idled from an OSPM context for the following reasons:
• The requested number is larger than the number of logical processors currently defined.
• Not all the defined logical processors were onlined by the OS (for example. for licensing
reasons)
Logical processors critical to OS function (for example, the BSP) cannot be idled.
This section describes ACPI defined devices and device-specific objects. The system status indicator
objects, declared under the \_SI scope in the ACPI Namespace, are also specified in this section.
Argument Information:
Arg0: UUID – A Buffer containing the UUID (see Section 5.2.4) (16 Bytes)
Arg1: Revision ID – the function’s revision. This revision is specific to the UUID.
Arg2: Function Index – Represents a specific function whose meaning is specific to the UUID
and Revision ID. Function indices should start with 1. Function number zero is a query function (see
the special return code defined below).
Arg3: Function Arguments – a package containing the parameters for the function specified by
the UUID, Revision ID and Function Index.
Successive revisions of Function Arguments must be backward compatible with earlier revisions.
New UUIDs may also be created by OEMs and IHVs for custom devices and other interface or
device governing bodies (e.g. the PCI SIG), as long as the UUID is different from other published
UUIDs. Only the issuer of a UUID can authorize a new Function Index, Revision ID or Function
Argument for that UUID.
Note: For backward compatibility _DSM requires that each Revision ID support all of the functions
defined by all previous Revision IDs for the same UUID.
Implementation Note
Since the purpose of the _DSM method is to avoid the namespace collision, the implementation of
this method shall not use any other method or data object which is not defined in this specification
unless its driver and usage is completely under the control of the platform vendor.
Example:
// _DSM – Device Specific Method
//
// Arg0: UUID Unique function identifier
// Arg1: Integer Revision Level
// Arg2: Integer Function Index (0 = Return Supported Functions)
// Arg3: Package Parameters
Function(_DSM,{IntObj,BuffObj},{BuffObj, IntObj, IntObj, PkgObj})
{
//
// Switch based on which unique function identifier was passed in
//
switch(Arg0)
{
//
// First function identifier
//
case(ToUUID(“893f00a6-660c-494e-bcfd-3043f4fb67c0”))
{
switch(Arg2)
{
//
// Function 0: Return supported functions, based on revision
//
case(0)
{
switch(Arg1)
{
// revision 0: functions 1-4 are supported
case(0) {return (Buffer() {0x1F})}
// revision 1: functions 1-5 are supported
case(1) {return (Buffer() {0x3F})}
}
// revision 2+: functions 1-7 are supported
return (Buffer() {0xFF})
}
//
// Function 1:
//
case(1)
{
… function 1 code …
Return(Zero)
}
//
// Function 2:
//
case(2)
{
… function 2 code …
Return(Buffer(){0x00})
}
case(3) { … function 3 code …}
case(4) { … function 4 code …}
case(5) { if (LLess(Arg1,1) BreakPoint; … function 5 code … }
case(6) { if (LLess(Arg1,2) BreakPoint; … function 6 code … )
case(7) { if (LLess(Arg1,3) BreakPoint; … function 7 code … )
default {BreakPoint }
}
}
//
// Second function identifier
//
case(ToUUID(“107ededd-d381-4fd7-8da9-08e9a6c79644”))
{
//
// Function 0: Return supported functions (there is only one revision)
//
if (LEqual(Arg2,Zero))
return (Buffer() {0x3}) // only one function supported
//
// Function 1
//
if (LEqual(Arg2,One))
{
… function 1 code …
Return(Unicode(“text”))
}
//
// Function 2+: Runtime Error
//
else
BreakPoint;
}
}
//
// If not one of the UUIDs we recognize, then return a buffer
// with bit 0 set to 0 indicating no functions supported.
//
return(Buffer(){0})
}
1 – Working
2 – Waking
3 – Sleeping. Used to indicate system state S1, S2, or S3
4 – Sleeping with context saved to non-volatile storage
Return Value:
None
Additional Information
The battery warning level in the range 0x00000001 – 0x7FFFFFFF (in units of mWh or mAh,
depending on the Power Units value) is the user’s preference for battery warning. If the level
specified is less than the design capacity of warning, it may be ignored by the platform so that the
platform can ensure a successful wake on low battery.
The battery low level in the range 0x00000001 – 0x7FFFFFFF (in units of mWh or mAh, depending
on the Power Units value) is the user’s preference for battery low. If this level is less than the design
capacity of low, it may be ignored by the platform.
The battery wake level in the range 0x00000001 – 0x7FFFFFFF (in units of mWh or mAh,
depending on the Power Units value) is the user’s preference for battery wake. If this level is less
than the platform’s current wake on low battery level, it may be ignored by the platform. If the
platform does not support a configurable wake on low battery level, this may be ignored by the
platform.
9.3.1 Overview
This definition provides a standard interface by which the OS may query properties of the ambient
light environment the system is currently operating in, as well as the ability to detect meaningful
changes in these values when the environment changes. Two ambient light properties are currently
supported by this interface: illuminance and color.
Ambient light illuminance readings are obtained via the _ALI method. Illuminance readings indicate
the amount of light incident upon (falling on) a specified surface area. Values are specified in lux
(lumen per square meter) and give an indication of how “bright” the environment is. For example, an
overcast day is roughly 1000 lux, a typical office environment 300-400 lux, and a dimly-lit
conference room around 10 lux.
A possible use of ambient light illuminance data by the OS is to automatically adjust the brightness
(or luminance) of the display device – e.g. increase display luminance in brightly-lit environments
and decrease display luminance in dimly-lit environments. Note that Luminance is a measure of
light radiated (reflected, transmitted, or emitted) by a surface, and is typically measured in nits. The
_ALR method provides a set of ambient light illuminance to display luminance mappings that can be
used by an OS to calibrate its policy for a given platform configuration.
Ambient light color readings are obtained via the _ALT and/or _ALC methods. Two methods are
defined to allow varying types/complexities of ambient light sensor hardware to be used. _ALT
returns color temperature readings in degrees Kelvin. Color temperature values correlate a light
source to a standard black body radiator and give an indication of the type of light source present in
a given environment (e.g. daylight, fluorescent, incandescent). ALC returns color chromaticity
readings per the CIE Yxy color model. Chromaticity x and y coordinates provide a more
straightforward indication of ambient light color characteristics. Note that the CIE Yxy color model
is defined by the International Commission on Illumination (abbreviated as CIE from its French title
Commission Internationale de l'Eclairage) and is based on human perception instead of absolute
color.
A possible use of ambient light color data by the OS is to automatically adjust the color of displayed
images depending on the environment the images are being viewed in. This may be especially
important for reflective/transflective displays where the type of ambient light may have a large
impact on the colors perceived by the user.
the sensor
Other values –The current ambient light temperature in degrees Kelvin
The return data is specified as a package of packages, where each tuple (inner package) consists of
the pair of Integer values of the form:
{<display luminance adjustment>, <ambient light illuminance>}
Package elements should be listed in monotonically increasing order based upon the ambient light
illuminance value (the Y-coordinate on the graph) to simplify parsing by the OS.
Ambient light illuminance values are specified in lux (lumens per square meter). Display luminance
(or brightness) adjustment values are specified using relative percentages in order simplify the
means by which these adjustments are applied in lieu of changes to the user’s display brightness
preference. A value of 100 is used to indicate no (0%) display brightness adjustment given the lack
of signed data types in ACPI. Values less than 100 indicate a negative adjustment (dimming); values
greater than 100 indicate a positive adjustment (brightening). For example, a display brightness
adjustment value of 75 would be interpreted as a -25% adjustment, and a value of 110 as a +10%
adjustment.
(150,1000)
1200
Brightly-Lit
350 Café
(100,300)
Typical
90 (85,80) Office
20
(73,10)
Dimly-Lit
5 Conference
Room
(70,0)
0
-30% -20% -10% 0% +10% ... +50%
D is p la y L u min a n c e ( B r ig h t n e s s) A d ju s t me n t
Figure 9-52 illustrates the use of five points to approximate an example response curve, where the
dotted line represents an approximation of the desired response (solid curve). Extrapolation of the
values between these points is OS-specific – although for the purposes of this example we’ll assume
a piecewise linear approximation. The ALS response curve (_ALR) would be specified as follows:
Name(_ALR, Package() {
Package{70, 0}, // Min ( -30% adjust at 0 lux)
Package{73, 10}, // ( -27% adjust at 10 lux)
Package{85, 80}, // ( -15% adjust at 80 lux)
Package{100,300}, // Baseline ( 0% adjust at 300 lux)
Package{150,1000} // Max ( +50% adjust at 1000 lux)
})
Within this data set exist three points of particular interest: baseline, min, and max. The baseline
value represents an ambient light illuminance value (in lux) for the environment where this system is
most likely to be used. When the system is operating in this ambient environment the ALS policy
will apply no (0%) adjustment to the default display brightness setting. For example, given a system
with a 300 lux baseline, operating in a typical office ambient environment (~300 lux), configured
with a default display brightness setting of 50% (e.g. 60 nits), the ALS policy would apply no
backlight adjustment, resulting in an absolute display brightness setting of 60 nits.
Min and max are used to indicate cutoff points in order to prevent an over-zealous response by the
ALS policy and to influence the policy’s mode of operation. For example, the min and max points
from the figure above would be specified as (70,0) and (150,1000) respectively – where min
indicates a maximum negative adjustment of 30% and max represents a maximum positive
adjustment of 50%. Using a large display brightness adjustment for max allows an ALS response
that approaches a fully-bright display (100% absolute) in very bright ambient environments
regardless of the user’s display brightness preference. Using a small value for max (e.g. 0% @ 300
lux) would influence the ALS policy to limit the use of this technology solely as a power-saving
feature (never brighten the display). Conversely, setting min to a 0% adjustment instructs ALS
policy to brighten but never dim.
A minimum of two data points are required in the return package, interpreted as min and max. Note
that the baseline value does not have to be explicitly stated; it can be derived from the response
curve. Addition elements can be provided to fine-tune the response between these points. Figure 9-
53 illustrates the use of two data points to achieve a response similar to (but simpler than) that
described in Figure 9-52 .
Brightly-Lit
350 Café
Typical
90 Office
(70,30)
20
Dimly-Lit
5 Conference
Room
(70,0)
0
-30% -20% -10% 0% +10% ... +50%
D is p la y L u min a n c e (B r ig h t n e s s ) A d ju s t me n t
Figure 9-53 A two-point ALS Response Curve
This example lacks an explicit baseline and includes a min with an ambient light value above 0 lux.
The baseline can easily be extrapolated by ALS Policy (e.g. 0% adjustment at ~400 lux). All
ambient light brightness settings below min (20 lux) would be treated in a similar fashion by ALS
policy (e.g. -30% adjustment). This two-point response curve would be modeled as:
Name(_ALR, Package() {
Package{70, 30}, // Min ( -30% adjust at 30 lux)
Package{150,1000} // Max ( +50% adjust at 1000 lux)
})
This model can be used to convey a wide range of ambient light to display brightness responses. For
example, a transflective display – a technology where illumination of the display can be achieved by
reflecting available ambient light, but also augmented in dimly-lit environments with a backlight –
could be modeled as illustrated in Figure 9-54.
Min,
Baseline Max
A mb ie n t L ig h t I llu mi n an c e ( Lu x )
1200 (0,1000)
Brightly-Lit
350 Café
Typical
90 Office
(200,30)
20
Dimly-Lit
Conference
Room
5
(70,0) (180,0)
0
0% +40% +80% +100%
D is p la y L u min a n c e (B r ig h t n e s s ) A d ju s t me n t
This three-point approximation would result in an ALS response that allows the backlight to increase
as the ambient lighting decreases. In this example, no backlight adjustment is needed in bright
environments (1000+ lux), maximum backlight may be needed in dim environments (~30 lux), but a
lower backlight setting may be used in a very-dark room (~0 lux) – resulting in an elbow around 30
lux. This response would be modeled in _ALR as follows:
Name(_ALR, Package() {
Package{180, 0} ( +80% adjust at 0 lux)
Package{200, 30}, // Max (+100% adjust at 30 lux)
Package{0, 1000}, // Min ( 0% adjust at 1,000 lux)
})
Note the ordering of package elements: monotonically increasing from the lowest ambient light
value (0 lux) to the highest ambient light value (1000 lux).
The transflective display example also highlights the need for non-zero values for the user’s display
brightness preference – which we’ll refer to as the reference display brightness value. This
requirement is derived from the model’s use of relative adjustments. For example, applying any
adjustment to a 0% reference display brightness value always results in a 0% absolute display
brightness setting. Likewise, using a very small reference display brightness (e.g. 5%) results in a
muted response (e.g. +30% of 5% = 6.5% absolute). The solution is to apply a reasonably large
value (e.g. 50%) as the reference display brightness setting – even in the case where no backlight is
applied. This allows relative adjustments to be applied in a meaningful fashion while conveying to
the user that the display is still usable (via reflected light) under typical ambient conditions.
The OS derives the user’s display brightness preference (this reference value) either from the
Brightness Control Levels (_BCL) object or another OS-specific mechanism. See Section 9.3.8,
“Relationship to Backlight Control Methods”, for more information.
9.5.1 _LID
Evaluates to the current status of the lid.
Arguments:
None
Return Value:
An Integer containing the current lid status
0– The lid is closed
Non-zero – The lid is open
A generic bus bridge device is typically used for integrated bridges that have no other means of
controlling them and that have a set of well-known devices behind them. For example, a portable
computer can have a “generic bus bridge” known as an EIO bus that bridges to some number of
Super-I/O devices. The bridged resources are likely to be positively decoded as either a function of
the bridge or the integrated devices. In this example, a generic bus bridge device would be used to
declare the bridge then child devices would be declared below the bridge; representing the integrated
Super-I/O devices.
This optional object returns a buffer containing the ATA commands used to restore the drive to boot
up defaults (that is, the state of the drive after POST). The returned buffer is an array with each
element in the array consisting of seven 8-bit register values (56 bits) corresponding to ATA task
registers 1F1 thru 1F7. Each entry in the array defines a command to the drive.
Arguments:
None
Return Value:
A Buffer containing a byte stream of ATA commands for the drive
This object may appear under SATA port device objects or under IDE channel objects.
3. The IDE driver will call the _STM control method passing in transfer timing settings for the
channel, as well as the ATA drive ID block for each drive on the channel. The _STM control
method will configure the IDE channel based on this information.
4. For each drive on the IDE channel, the IDE driver will run the _GTF to determine the ATA
commands required to reinitialize each drive to boot up defaults.
5. The IDE driver will finish initializing the drives by sending these ATA commands to the drives,
possibly modifying or adding commands to suit the features supported by the operating system.
The following shows the namespace for these objects:
\_SB // System bus
PCI0 // PCI bus
IDE1 // First IDE channel
_ADR // Indicates address of the channel on the PCI bus
_GTM // Control method to get current IDE channel settings
_STM // Control method to set current IDE channel settings
_PR0 // Power resources needed for D0 power state
DRV1 // Drive 0
_ADR // Indicates address of master IDE device
_GTF // Control method to get task file
DRV2 // Drive 1
_ _ADR // Indicates address of slave IDE device
_ _GTF // Control method to get task file
IDE2 // Second IDE channel
_ADR // Indicates address of the channel on the PCI bus
_GTM // Control method to get current IDE channel settings
_STM // Control method to set current IDE channel settings
_PR0 // Power resources needed for D0 power state
DRV1 // Drive 0
_ADR // Indicates address of master IDE device
_GTF // Control method to get task file
DRV2 // Drive 1
_ADR // Indicates address of slave IDE device
_GTF // Control method to get task file
Powering down:
• Call _GTM.
• Power down drive (calls _PS3 method and turns off power planes).
Powering up:
• Power up drive (calls _PS0 method if present and turns on power planes).
• Call _STM passing info from _GTM (possibly modified), with ID data from
• each drive.
• Initialize the channel.
• May modify the results of _GTF.
• For each drive:
— Call _GTF.
— Execute task file (possibly modified).
9.9.3.2 Overview
A SATA HBA differs from an IDE controller in a number of ways. First, it can save its complete
device context. Second, it replaces IDE channels, which may support up to 2 attached devices, with
ports, which support only a single attached device, unless a port multiplier is present. See the SATA
spec at “Links to ACPI-Related Documents” (http://uefi.org/acpi) under the heading "SATA
Specification"for more information. Finally, SATA does not require timing information from the
platform, allowing a simplification in how SATA controllers are represented in ACPI. (_GTM and
_STM are replaced by the simpler _SDD method.)
All ports, even those attached off a port multiplier, are represented as children directly under the
SATA controller device. This is practical because the SATA specification does not allow a port
multiplier to be attached to a port multiplier. Each port’s _ADR indicates to which root port they are
connected, as well as the port multiplier location, if applicable. (See Table 6-186 for _ADR format.)
Since this specification only covers the configuration of motherboard devices, it is also the case that
the control methods defined in this section cannot be used to send taskfiles to devices attached via
either an add-in SATA HBA, or attached via a motherboard SATA HBA, if used with a port
multiplier that is not also on the motherboard.
The following shows an example SATA namespace:
\_SB - System bus
PCI0 - PCI bus
SATA - SATA Controller device
ADR - Indicates address of the controller on the PCI bus
PR0 - Power resources needed for D0 power state
PRT0 - Port 0 device
_ADR - Indicates physical port and port multiplier topology
_SDD - Identify information for drive attached to this port
_GTF - Control method to get task file
PRTn - Port n device
_ADR - Indicates physical port and port multiplier topology
_SDD - Identify information for drive attached to this port
_GTF - Control method to get task file
Buffer (){
Floppy 0 // Boolean DWORD
Floppy 1 // Boolean DWORD
Floppy 2 // Boolean DWORD
Floppy 3 // Boolean DWORD
Tape // DWORD – See table below
}
Note: A system designer must describe the GPE block necessary to bootstrap the system in the FADT
as a GPE0/GPE1 block. GPE Block devices cannot be used to implement these GPE inputs.
A GPE Block Device must contain the _Lxx, _Exx, _Wxx, _CRS, _PRS, and _SRS methods
required to use and program that block.
To represent the GPE block associated with the FADT, the system designer shouldinclude in the
namespace a Device object with the ACPI0006 _HID that contains no _CRS, _PRS, _SRS, _Lxx,
_Exx, or _Wxx methods. OSPM assumes that the first such ACPI0006 device is the GPE Block
Device that is associated with the FADT GPEs. (See the example below).
// ASL example of a standard GPE block device
Device(\_SB.PCI0.GPE1) {
Name(_HID, ”ACPI0006”)
Name(_UID, 2)
Name(_CRS, Buffer () {
IO(Decode16, FC00, FC03, 4, 4,)
IRQ( Level, ActiveHigh, Shared,) { 5 }
})
Method(_L02) { … }
Method(_E07) { … }
Method(_W04) { … }
}
// ASL example of a GPE block device that refers to the FADT GPEs.
// Cannot contain any _Lxx, _Exx, _Wxx, _CRS, _PRS, or. _SRS methods.
Device(\_SB.PCI0.GPE0) {
Name(_HID,”ACPI0006”)
Name(_UID,1)
}
Notice that it is legal to replace the I/O descriptors with Memory descriptors if the register is
memory mapped.
If the system must run any GPEs to bootstrap the system (for example, when Embedded Controller
events are required), the associated block of GPEs must be described in the FADT. This register
block is not relocatable and will always be available for the life of the operating system boot.
A GPE block associated with the ACPI0006 _HID can be stopped, ejected, reprogrammed, and so
on. The system can also have multiple such GPE blocks.
Device(GPE5) {
Name(_HID, “ACPI0006”)
Method(_L02) { … }
Method(_E07) { … }
Method(_W04) { … }
}
Example:
Device (\_SB.NOD0) {
Name (_HID, "ACPI0004") // Module device
Name (_UID, 0)
Name (_PRS, ResourceTemplate() {
WordIO (
ResourceProducer,
MinFixed, // _MIF
MaxFixed,,, // _MAF
0x0000, // _GRA
0x0000, // _MIN
0x7FFF, // _MAX
0x0, // _TRA
0x8000) // _LEN
DWordMemory (
ResourceProducer,, // For Main Memory + PCI
MinNotFixed, // _MIF
MaxNotFixed, // _MAF
Cacheable, // _MEM
ReadWrite, // _RW
0x0FFFFFFF, // _GRA
0x40000000, // _MIN
0x7FFFFFFF, // _MAX
0x0, // _TRA
0x00000000) // _LEN
})
Method (_SRS, 1) { ... }
Method (_CRS, 0) { ... }
Cacheable, // _MEM
ReadWrite, // _RW
0x1FFFFFFF, // _GRA
0x40000000, // _MIN
0x7FFFFFFF, // _MAX
0x0, // _TRA
0x20000000) // _LEN
})
Method (_CRS, 0) { ... }
Method (_SRS, 1) { ... }
Method (_DIS, 0) { ... }
}
Device (PCI0) { // PCI Root Bridge
Name (_HID, EISAID("PNP0A03"))
Name (_UID, 0)
Name (_BBN, 0x00)
Name (_PRS, ResourceTemplate () {
WordBusNumber (
ResourceProducer,
MinFixed, // _MIF
MaxFixed,, // _MAF
0x00, // _GRA
0x00, // _MIN
0x7F, // _MAX
0x0, // _TRA
0x80) // _LEN
WordIO (
ResourceProducer,
MinFixed, // _MIF
MaxFixed,,, // _MAF
0x0000, // _GRA
0x0000, // _MIN
0x0CF7, // _MAX
0x0, // _TRA
0x0CF8) // _LEN
WordIO (
ResourceProducer,
MinFixed, // _MIF
MaxFixed,,, // _MAF
0x0000, // _GRA
0x0D00, // _MIN
0x7FFF, // _MAX
0x0, // _TRA
0x7300) // _LEN
DWordMemory (
ResourceProducer,,
MinNotFixed, // _MIF
MaxNotFixed, // _MAF
NonCacheable, // _MEM
ReadWrite, // _RW
0x0FFFFFFF, // _GRA
0x40000000, // _MIN
0x7FFFFFFF, // _MAX
0x0, // _TRA
0x00000000) // _LEN
})
Method (_CRS, 0) { ... }
Method (_SRS, 1) { ... }
}
}
Additional Notes:
The definition of a 'connectable' port is dependent upon the implementation of the USB port within a
particular platform. For example,
• If a USB port is user visible (as indicated by the _PLD object) and connectable, then an end user
can freely connect and disconnect USB devices to the USB port.
• If a USB port is not user visible and is connectable, then an end user cannot freely connect and
disconnect USB devices to the USB port. A USB device that is directly "hard-wired" to a USB
port is an example of a USB port that is not user visible and is connectable.
• If a USB port is not user visible and is not connectable, then the USB port is physically
implemented by the USB host controller, but is not being used by the platform and therefore
cannot be accessed by an end user.
A USB port cannot be specified as both visible and not connectable.
The pins of a Type-C connector support one USB2 signal pair (D+/D-) and two SuperSpeed signal
pairs (SSTXp1/SSTXn1 and SSRXp2/SSRXn2). The use of two SS signal pairs allows the CC wire
and USB SuperSpeed data bus wires to be used for signaling within the cable track without regard to
the orientation and twist of the cable.
Type C connector - USB2 USB2-only receptacles
These only implement the USB2 signal pair, and do not implement the SS signal
pairs.
Type C connector - USB2 and SS with Switch receptacles
These implement the USB2 signal pair, and a Functional Switch with a physical
Multiplexer that is used to dynamically connect one of the two receptacle SuperSpeed
signal pairs to a single USB Host Controller port as function of the Type-C plug
orientation.
Type C connector - USB2 and SS without Switch receptacles
These implement the USB2 signal pair and a Functional Switch by connecting each
receptacle SuperSpeed signal pair to a separate USB Host Controller port.
Note: Refer to section 4.5.1.1 in the USB Type-C Specification for more information.
Example
The following is an example of a port characteristics object implemented for a USB host controller’s
root hub where:
• Three Ports are implemented; Port 1 is not user visible/not connectable and Ports 2 and 3 are
user visible and connectable.
• Port 2 is located on the back panel
• Port 3 has an integrated 2 port hub. Note that because this port hosts an integrated hub, it is
therefore not sharable with another host controller (e.g. If the integrated hub is a USB2.0 hub,
the port can never be shared with a USB1.1 companion controller).
• The ports available through the embedded hub are located on the front panel and are adjacent to
one another.
Root Hub
Integrated Hub
Port 1 Port 2
//
// Root hub device for this host controller. This controller implements 3 root hub ports.
//
Device( RHUB) {
Name( _ADR, 0x00000000) // Value of 0 is reserved for root HUB
// Root hub, port 1
Device( PRT1) {
// Address object for port 1. This value must be 1
Name( _ADR, 0x00000001)
// USB port capabilities object. This object returns the system
// specific USB port configuration information for port number 1
// Because this port is not connectable it is assumed to be not visible.
// Therefore a _PLD descriptor is not required.
Name( _UPC, Package(){
0x00, // Port is not connectable
0xFF, // Connector type (N/A for non-visible ports)
0x00000000, // Reserved 0 – must be zero
0x00000000}) // Reserved 1 – must be zero
} // Device( PRT1)
//
// Root Hub, Port 2
//
Device( PRT2) {
// Address object for port 2. This value must be 2
Name(_ADR, 0x00000002)
Name( _UPC, Package(){
0xFF, // Port is connectable
0x00, // Connector type – Type ‘A’
0x00000000, // Reserved 0 – must be zero
0x00000000}) // Reserved 1 – must be zero
//
// Root Hub, Port 3
//
Device( PRT3) {
// This device is the integrated USB hub.
// Address object for port 3. This value must be 3
Name(_ADR, 0x00000003)
// Because this port is not connectable it is assumed to be not visible.
// Therefore a _PLD descriptor is not required.
Name( _UPC, Package(){
0xFF, // Port is connectable
0xFF, // Connector type (N/A for non-visible ports)
0x00000000, // Reserved 0 – must be zero
0x00000000}) // Reserved 1 - must be zero
//
// Integrated hub, port 1
//
Device( PRT1) {
// Address object for the port. Because the port is implemented on
// integrated hub port #1, this value must be 1
Name( _ADR, 0x00000001)
// USB port characteristics object. This object returns the system
// specific USB port configuration information for integrated hub port
// number 1
Name( _UPC, Package(){
0xFF, // Port is connectable
0x00, // Connector type – Type ‘A’
0x00000000, // Reserved 0 – must be zero
0x00000000}) // Reserved 1 – must be zero
//
// Integrated hub, port 2
//
Device( PRT2) {
// Address object for the port. Because the port is implemented on
// integrated hub port #2, this value must be 2
Name( _ADR, 0x00000002)
// USB port characteristics object. This object returns the system
// specific USB port configuration information for integrated hub port
// number 2
Example
Scope( \_SB) {
…
Device(PCI0) {
…
// Host controller (EHCI)
Device( USB0) {
// PCI device#/Function# for this HC. Encoded as specified in the ACPI
// specification
Name(_ADR, 0xyyyyzzzz)
// Root hub device for this HC #1.
Device(RHUB) {
Name(_ADR, 0x00000000) // must be zero for USB root hub
// Root hub, port 1
Device(PRT1) {
Name(_ADR, 0x00000001)
} // Device( PRT1)
//
// Define other ports, control methods, etc
…
…
} // Device( RHUB)
} // Device( USB0)
Device(PRT1) {
Name(_ADR, 0x00000001)
// USB port configuration object. This object returns the system
// specific USB port configuration information for port number 1
// Must match the _UPC declaration for USB0.RHUB.PRT1 as this host
// controller is a companion to the EHCI host controller
// provide physical port location info for port 1
Name( _UPC, Package(){
0xFF, // Port is connectable
0x00, // Connector type – Type ‘A’
0x00000000, // Reserved 0 – must be zero
0x00000000}) // Reserved 1 – must be zero
Note: This means that the CENTURY field in the Fixed ACPI Description Table may only contain values
between 0 and 63.
Example:
This is an example of how this device could be described:
Device (RTC0) {
Name(_HID, EISAID("PNP0B00"))
Note: This also means that the CENTURY field in the Fixed ACPI Description Table may contain values
between 0 and 255.
Example:
This is an example of how this device could be described:
Device (RTC0) {
Name(_HID, EISAID("PNP0B01"))
The use of polling is allowed but strongly discouraged by this specification. OEMs should design
systems that asynchronously notify OSPM whenever a meaningful change in user presence occurs—
relieving the OS of the overhead associated with polling.
This value is specified as tenths of seconds. For example, a value of 10 would be used to indicate a 1
second polling frequency. As this is a recommended value, OSPM will consider other factors when
determining the actual polling frequency to use.
Note: Because the _CRS and _GSB methods provide sufficient information, it is not necessary to
provide _MAT under an I/O APIC device.
For an I/O APIC device that is described both in the MADT and in the namespace, the base address
described in the MADT entry must be the same as the base address in the IO APIC device _CRS at
boot time. OSPM must use the information from the MADT until such a time as the _CRS and
_GSB methods in the namespace device can be processed. At this point OSPM must ignore the
MADT entry.
expected that the time on the platform will be consistent when different firmware interfaces are used
to query the platform time. For example, a UEFI call to get the time should return the same time as if
the OSPM used the time and alarm device at the same point in time.
The Time and Alarm device can optionally support power management objects (e.g. _PS0, _PS3) to
allow the OS to manage the device's power consumption.
The Time andAlarm device must support control method _PRW for being enabled to wake up the
system. It might support _DSW or _PSW to provide the functionality to enable or disable the
device's ability to wake a sleep system. On Hardware-reduced ACPI platforms, _PRW is only
required if the device depends on ACPI-defined power resources. _PRW’s GPEInfo structure is
ignored by OSPM. For enabling Wakeup, _DSW and _SxW are used, and the wakeup event is
signaled by the GPIO-signaled ACPI event mechanism (Section 5.6.5).
The Plug and Play ID of the Time and Wake Alarm device is ACPI000E.
9.18.1Overview
The Time and Alarm device provides an alternative to the real time clock (RTC), which is defined as
a fixed feature hardware device. The wake timers allow the system to transition from the S3 (or
optionally S4/S5) state to S0 state after a time period elapses. In comparison with the Real Time
Clock (RTC) Alarm, the Time and Alarm device provides a larger scale of flexibility in the
operation of the wake timers, and allows the implementation of the time source to be abstracted from
the OSPM.
Time and Alarm device provides the OSPM with a firmware abstraction of time and alarm services
that can be applicable to a variety of hardware designs. The methods for setting and getting real time
provide an alternative to the (RTC).
Time and Alarm devices that implement AC/DC wake service contain two programmable timers that
can be configured to wake the system depending on the platform's current power source (AC or DC)
when the timers expire. The two timers, which are referred to as the AC timer and the DC timer, are
independent in that they are individually programmable and applicable without interfering each
other. Each of the timers can be programmed with the number of seconds to elapse from the time the
timer is programmed until a wake is requested. When a timer expires, the Time and Alarm device
decides whether to wake the system based on the current power source. If the current power source
is consistent with the timer type that expired, a wake signal will be asserted. Otherwise, the wake
signal will not be asserted.
Time and Alarm devices that implement the AC only (power independent) wake contain one
programmable timer that can be configured to wake up the system regardless of the platform's power
source when the timer expires. To simplify the programming interface the AC wake will use the AC
timer portion of the AC/DC wake; writes to the DC timer when AC only wake is supported will be
ignored.
To simplify the programming interface for the time and alarm device, timer expiration events will
persist. This means that if the OSPM programs a wake timer that expires before the OSPM
completes the transition into S3 (or S4/S5 if supported) the time and alarm device will wake the
system immediately after the OSPM completes the transition. Figure 9-57 illustrates this behavior.
OSPM Wake device
OSPM programs Wake timer completes immediately
the wake timer expires transition wakes the
into S3 system
S0
S3
Time
The time and alarm device will provide the OSPM with an interface to query the status of the wake
timers and discover what timers have expired. This interface enables the OSPM to discover the wake
source. The status of wake timers can be reset by setting the wake alarm; the OSPM may clear the
alarm status using the clear wake status method. All expired wake timer must be cleared if the
OSPM requires the platform to stay in S3 (S4/S5), otherwise the expired timers will immediately
wake up the system.
For the AC/DC wake services, and in case the current power source is inconsistent with the timer
type that expires, an expired timer wake policy value, in units of seconds, is defined that enables the
time and alarm device to wake the system when the power source corresponding to the expired timer
becomes active (wake either immediately, after some time period, or never). The expired timer wake
policy is applicable only on devices that support AC/DC wake and only when the timer expires and
the power source is not consistent with the timer type. The expired timer policy is applied in
conjunction with expired timer persistence described earlier.
For example, if a mobile platform programs the AC timer to be 2 hours long and DC timer to be 4
hours long and then transitions from the S0 state to S3 state at 1:00 AM, the AC timer is set to expire
at 3:00 AM and the DC timer is set to expire at 5:00 AM. For the AC Timer, a expired timer wake
policy value is programmed as 60 seconds.
If the platform is unplugged from AC power at 1:40 AM and remains unplugged, the Time and
Alarm Device will not wake up the system at 3:00 AM. If the platform remains on DC power until
5:00 AM when the DC timer expires, a wake signal will then be asserted. The following graph
illustrates the above example.
2 hours
S0
S3
AC
DC
Time
1:00 AM 1:40 AM 3:00 AM 5:00 AM
4 hours
If the AC power is plugged in again at 4:00 AM, then the system will be woken up at 4:01 AM due
to the AC expired timer wake policy value setting. The following graph illustrates this.
2 hours
S0
S3
AC
DC
4:00 AM
Time
1:00 AM 1:40 AM 3:00 AM 5:00 AM
4 hours
The Time and Alarm device can support a range of services, the OSPM evaluates the _GCP object to
get the supported capabilities of the device. If the capabilities indicate that the device supports time
services, the OSPM evaluates the _GRT and _SRT objects to get and set time respectively.
If alarm services are supported by the device, the OSPM evaluates the _STV object to program both
the AC and DC timer values. The values, which are in units of seconds, indicate the elapsed time
before the timer expires. OSPM evaluates the _TIV object to read the current AC and DC timer
values (seconds remaining until expiration).
OSPM evaluates the _STP object to set timer policies for both the AC and DC timers OSPM reads
the current timer policy by evaluating the _TIP object, which return policy settings for both the AC
and DC timer.
The OSPM evaluates the _GWS object to identify expired timers that may have waked the platform.
The OSPM must evaluate the _CWS object to clear any expired timer events that can prevent the
system from performing a sleep transition according the expired timer wake policy, and the expired
timer persistence described above.
The Time and Alarm device, if implemented with wake support, must support waking up the system
from S3. Waking from S4/S5 support is optional.
Arguments: (0)
Return Value:
A 32-bit integer containing a result bitmask as follows:
Bit [0] - 1 = AC wake implemented, 0 = not supported
Bit [1] - 1 = DC wake implemented, 0 = not supported
Bit [2] - 1 = Get/Set real time features implemented, 0 = not supported
Bit [3] - 1 = Real time accuracy in milliseconds, 0 = Real time accuracy in seconds
Bit [4] - 1 = _GWS returns correct values for wakes from S4/S5 caused by timer. 0 = not supported
Bit [5] - 1 = Wake supported from S4 on AC, 0 = Wake not supported from S4 on AC
Bit [6] - 1 = Wake supported from S5 on AC, 0 = Wake not supported from S5 on AC
Bit [7] - 1 = Wake supported from S4 on DC, 0 = Wake not supported from S4 on DC
Bit [8] - 1 = Wake supported from S5 on DC, 0 = Wake not supported from S5 on DC
Bit [9] to Bit [31] are reserved and must be 0.
Buffer(){
WORD Year; // 1900 - 9999
BYTE Month; // 1 - 12
BYTE Day; // 1 - 31
BYTE Hour; // 0 - 23
BYTE Minute; // 0 - 59
BYTE Second; // 0 - 59
BYTE Pad1;
WORD milliseconds, // 1-1000
WORD TimeZone; // -1440 to 1440 or 2047 (unspecified)
BYTE Daylight;
BYTE Pad2[3]; // Reserved, must be zero
}
Return Value:
An Integer:
0 - success
0xFFFFFFFF- Failed
Note: Time is maintained using a battery backed time device (e.g. a real time clock)
Note: The time will always be local time; the time zone value can be used to determine the offset from
UTC.
Note: Time zone field is the number of minutes that the local time lags behind the UTC time. (i.e. time
zone = UTC - local time). The time zone is in 2's complement format.
Note: Time zone value of 2047, means that time zone value is not specified, and no relation to UTC can
be inferred.
Note: Daylight is a bitmask containing the daylight savings time information for the time, as follows:
Bit [0]: 1 = the time is affected by daylight savings time, 0= time is not affected by daylight
savings. This value does not indicate that the time has been adjusted for daylight savings time.
It indicates only that it should be adjusted when the time enters daylight savings time.
Bit [1]: 1= the time has been adjusted for daylight savings time, 0= the time hasn't been adjusted
for daylight savings.
All other bits must be zero.
When entering daylight saving time, if the time is affected, but hasn't been adjusted (DST = 1), use
the new calculation:
• The date/time should be increased by the appropriate amount.
• The TimeZone should be decreased by the appropriate amount (EX: +480 changes to +420 when
moving from PST to PDT).
• The Daylight value changes to 3.
When exiting daylight saving time, if the time is affected and has been adjusted (DST = 3), use the
new calculation:
• The date/time should be decreased by the appropriate amount.
• The TimeZone should be increased by the appropriate amount.
• The Daylight value changes to 1.
0x00000000 – AC Timer
0x00000001 – DC Timer
Arg1 – ExpiredTimerWakePolicy (Integer(DWORD)): indicates the expired timer wake policy:
0x00000000 – The timer will wake up the system instantly after the power source changes.
0x00000001 – 0xFFFFFFFE: time between the power source changes and the timer wakes up the
system (in units of second).
0xFFFFFFFF – The timer will never wake up the system after the power source changes.
Return Value:
An Integer containing a result code as follows:
0x00000000 – Succeeded to set the expired timer wake policy.
0x00000001 – Failed to set the timer policy. Actual timer policy unknown.
0x00000001 – 0xFFFFFFFE: Time between the power source changes and the timer wakes up the
system ( in units of seconds)
0xFFFFFFFF – The timer will never wake up the system after the power source changes
• If OSPM is trying to set an alarm using EFI runtime services, the alarm should be honored
regardless of the power source (i.e. if the platform has an independent timer for each power
source, they should both be configured with that alarm).
Method(_TIV, 1){
If(LEqual(Arg0, 1) {
Store(…, Local0) //Get DC timer value
}
Else {
Store(…, Local0) //Get AC timer value
}
Return (Local0)
}
Method(_GWS, 1){
If(LEqual(Arg0, 1) {
Store(…, Local0) //Get DC timer wake status
}
Else {
Store(…, Local0) //Get AC timer wake status
}
Return (Local0)
}
Method(_CWS, 2){
If(LEqual(Arg0, 0) {
Store(0, …) //Clear AC Wake status
}
Else {
Store(0, …) //Clear DC Wake status
}
Return(0)
}
} // end of ACPI Wake Alarm device object
Scope(\_GPE) { // Root level event handlers
Method(_Lxx){
Store(One, ...)
Notify(\_SB.AWA, 0x2) //notify the OSPM of device wake
}
} // end of \_GPE scope
H, 8,
Mi,8,
S, 8,
P, 8,
AccessAs(BufferAcc, AttribWord),
Ms, 8,
Tz, 8,
AccessAs(BufferAcc, AttribByte),
Dl, 8,
P2, 8
}
}
Method (_GCP, 0x0, NotSerialized)
{
Return(0x4) //Implements Real Time interface, but no alarms
}
Method(_GRT, 0x0, NotSerialized)
{
If(LNotEqual(\_SB.TC1.AVBL, 1)) // Verify that SPB OpRegion is available for this access
{
Return(0)
}
Name(BUFF, Buffer(4){}) // Create SerialBus data buffer as BUFF
CreateByteField(BUFF, 0x00, STAT) // STAT = Status (Byte)
CreateWordField(BUFF, 0x02, DATA) // DATA = Data (Byte)
Name(BUF2,Buffer(0x10){}) // Create buffer to hold the Real Time structure as BUF2
CreateWordField(BUF2, 0x0,Y) //year
CreateByteField(BUF2,0x2,M) //Month
...
CreateByteField(BUF2,0xc,Dl) //Dl
CreateByteField(BUF2,0xd,P2) //Pad2
Store(\_SB.I2C1.Y, BUFF) //Get each member from the OpRegion and store in the structure
Store(DATA,Y)
Store(\_SB.I2C1.M, BUFF)
Store(DATA,M)
...
Store(\_SB.I2C1.Dl, BUFF)
Store(DATA,Dl)
Store(\_SB.I2C1.P2, BUFF)
Store(DATA,P2)
Return(BUF2) // Success -> return what was last in buffer
}
Method(_SRT,0x1, NotSerialized)
{
Name(BUFF, Buffer(4){}) // Create SerialBus data buffer as BUFF
CreateByteField(BUFF, 0x00, STAT) // STAT = Status (Byte)
CreateWordField(BUFF, 0x02, DATA) // DATA = Data (Byte)
// Verify that SPB OpRegion is available for this access
If(LNotEqual(\_SB.I2C1.AVBL, 1))
{
Return(0)
}
CreateWordField(Arg0,0x0,Y) //Create Fields to access each member of the input data
...
CreateByteField(Arg0,0xd,P2)
Store(Store(Y, \_SB.I2C1.Y), BUFF) //Store each input member into the hardware, and
//set the transaction status into BUFF
If(LEqual(STAT, 0x00)) //Transaction was _NOT_successful
{
Return(0xFFFFFFFF)
...
Store(Store(P2, \_SB.I2C1.P2), BUFF)
If(LEqual(STAT, 0x00)) //Transaction was _NOT_successful
{
Return(0xFFFFFFFF)
}
}
Name(_DEP, Package() {"\\_SB.I2C1"}) //Identify the OpRegion dependency for this device
}
Note: If the Power button is described using this device, it must also support the Power Button Override
feature defined in Section 4.8.2.2.1 Power Button Override.
Note: If there are more HID Button Descriptors returned by _DSD than there are interrupts listed in
_CRS, behavior is OS-specific.
Volume Consumer Page (0x0C) RTC ActiveBoth HID Usage Tables 1.12
Down Volume Decrement Section 15
(0xEA)
Camera Camera Control Page OSC Active High/ Camera Shutter Usage 0x21 is
Shutter (0x90) ActiveLow planned for a future version of the
Camera Shutter (0x21) HID Usage Tables.
Display Consumer Page (0x0C) RTC ActiveBoth Review Request 41
Brightness Display Brightness Display Brightness Controls
Up Increment (0x6F)
Display Consumer Page (0x0C) RTC ActiveBoth Review Request 41
Brightness Display Brightness Display Brightness Controls
Down Decrement (0x6F)
Wireless Generic Desktop Page OOC ActiveHigh/ Review Request 40
Radio (0x01) ActiveLow HID Radio On/Off Usages
Button Wireless Radio Button
(0xC6)
Wireless Generic Desktop Page OOC ActiveBoth Review Request 40
Radio Slider (0x01) HID Radio On/Off Usages
Switch Wireless Radio Slider
Switch (0xC8)
1The System Power Down Usage (Page:01, ID: 81) has Type OSC, although its interrupt must
be ActiveBoth in order to allow drivers to perform functions based on “hold-down” timing. This is
an exception to the Usage Type Rules for Interrupt Polarity (Table 9-294).
9.19.3 Example
Device(BTNS)
{
Name(_HID, “ACPI0011”)
Name(_CRS, ResourceTemplate() {
GpioInt(Edge, ActiveBoth…) {pin} //Vol Down
GpioInt(Edge, ActiveBoth…) {pin} //Vol Up
GpioInt(Edge, ActiveBoth,…) {pin} //Power (MUST BE
//ACTIVEBOTH!)
})
Name(_DSD, Package(2) {
//UUID for HID Button Descriptors:
ToUUID(“FA6BD625-9CE8-470D-A2C7-B3CA36C4282E”),
//Data structure for this UUID:
Package() {
Package(5) {
0, //Declare a Collection
1, //Unique ID for this collection
0, //It is a top-level collection
0x0c,//Usage Page (“Consumer”)
0x01 //Usage (“Consumer Control”)
},
Package(5) {
0, //Declare another Collection
2, //Unique ID for this collection
0, //Also a top-level collection
0x01,// Usage Page (”Generic Desktop”)
0x80 //Usage (“System Control”)
},
Package(5) {
1, //Declare a Control
0, //Interrupt index in _CRS for Vol Down
1, //In the “Consumer Control” collection
0x0c,//Usage Page (“Consumer”)
0xEA //Usage (“Volume Decrement”)
},
Package(5) {
1, //Declare another Control
2, //Interrupt index for the Power Button
2, //In the “System Control” collection
0x01,//Usage Page (”Generic Desktop”)
0x81 //Usage (“System Power Down”)
},
Package(5) {
1, //Declare another Control
1, //Interrupt index for the Vol Up button
1, //In the “Consumer Control” collection
0x0c,//Usage Page (“Consumer”)
0xE9 //Usage (“Volume Increment”)
},
Package(5) {
1, //Another Control
0xFF,//No Interrupt for this one… e.g. OS-
// specific signaling for Rotation Lock
1, //In the “Consumer Control” collection
0x0C,//Usage Page (“Consumer”)
0x245 //Usage (“AC Rotate”)
}
}
})
9.20.1 Overview
In order to handle NVDIMMs, the OS must first be able to detect and enumerate the NVDIMMs. To
facilitate the plug and play discovery of NVDIMM and driver loading, ACPI namespace devices are
used.
9.20.4 Example
An example name space is shown below for a platform containing one NVDIMM:
Scope (\_SB){
Device (NVDR) // NVDIMM root device
{
Name (_HID, “ACPI0012”)
Method (_STA) {…}
Method (_FIT) {…}
Method (_DSM, …) {
…
}
The Subsystem Vendor ID, Subsystem Device ID and Subsystem Revision ID fields allow selection
of specific solution provider drivers that may span across devices from multiple vendors.
}
Device (NVD2) // NVDIMM2
{
Name(_ADR, h2) //where h2 is NFIT Device Handle for this NVDIMM2
Method (_DSM, …) {
…
}
}
}
Scope (\_GPE)
{
Method (_L00) {
Notify (\_SB.NVDR, 0x80) // Notify to NVDIMM root device
Notify (\_SB.MEM0, 1) // Device Check to Memory Module
}
}
Hot Plugged memory is indicated to OS using ACPI Name Space device with PNPID of PNP0C80.
The NFIT entries created by the hot plug NVDIMM are communicated by the ACPI Name Space
device with ACPI0012.
b NVDIMM bus driver evaluates the _FIT method under the NVDR device and identifies the
changes to the NVDIMM devices present (by identifying new NFIT Device handles that
have been added).
c NVDIMM bus driver now finds matching entries for addresses returned by _ADR objects of
NVD1 and NVD2 and loads the corresponding drivers.
d Send Notify Device Check to MEM0 to cause re-enumeration of device causing the memory
manager to add _CRS range to the memory pool.
3. MEM0 will now report all the memory ranges now created and made visible.
Arg3 – a package containing parameters for the function specified by the UUID, Revision ID and
Function Index. The layout of the package for each command along with the corresponding output is
illustrated in the following tables. The input and output package are a list of bytes (Buffer).
The Query ARS Capabilities function indicates if ARS is supported for an address range and to
discover system-wide attributes, such as the maximum amount of data that can be returned from a
Query ARS Status function and whether the platform provides an asynchronous ACPI notification
that a new uncorrectable error has been discovered.
Only one scrub can be in progress system wide at any given time. OSPM should first issue a Query
ARS Status function and ensure no ARS is in progress before issuing a Start ARS function. If a
successful status is returned, the extended status of the Query ARS Status function indicates to
OSPM one of the following:
• An ARS has been completed and ARS results are returned. These results should be processed by
OSPM before issuing another Start ARS function. When a new address range scrub operation is
started, the previous ARS results are lost.
• An ARS is in progress and no ARS results are returned. A Start ARS function fails while an
ARS is in progress. OSPM should periodically issue Query ARS Status functions until the ARS
is no longer in progress.
• There has been no ARS since the platform was booted so there are no ARS results returned. A
new Start ARS function may be issued.
• An ARS stopped prematurely and partial results are returned. If the platform has more data to
return than will fit in the Max Query ARS Status Output Buffer Size (see Section 9.20.7.4),
OSPM may issue Start ARS and Query ARS Status functions in a loop and retrieve all of the
ARS Error Records, modifying the ARS Start SPA Address and length with each iteration.
If a Start ARS function is issued, the OSPM provides the ARS Start SPA Address and ARS Length
for the range to be scrubbed. If the previous ARS stopped prematurely, these fields should be set to
the values from the Restart ARS Start SPA Address and Restart ARS Length from the previous
Query ARS Status output buffer. For any Start ARS function, OSPM may optionally set the Flags
Bit[0] to indicate to the platform that the ARS is a priority and may cause delays in other processing,
such as when booting. The output from a successful Start ARS function provides an estimated time
for the scrub to complete as a hint to the OSPM regarding when to issue a Query ARS Status
function.
As indicated in the Query ARS Capabilities function output, a platform may issue the
asynchronous event notification 0x81 (Unconsumed Uncorrectable Memory Error Detected
Notification) when new uncorrectable errors are detected. Upon receiving the notification, the
OSPM may decide to issue a Start ARS with Flags Bit [1] set to prepare for the retrieval of existing
records and issue the Query ARS Status function to retrieve the records. Alternatively, the OSPM
may decide to ignore event notificiation 0x81. If the event notification is ignored or if the memory
range is accessed before OSPM can process the notification and ARS data, default platform error
handing sequences, such as Machine Check, may occur.
Platforms may support the ability for OSPM to clear an error previously reported from an ARS.
OSPM should only issue the Clear Uncorrectable Error function for a memory address range if
that the address range has been retired from further use or if valid error-free data is written to the
range before those locations are read. If the Clear Uncorrectable Error function is not supported
by the platform or if a Clear Uncorrectable Error function for an address range fails, the OSPM
should continue to prevent accesses to the address ranges.
The ARS related functions use the following convention for the Status and Extended Status fields.
Note: If Status is nonzero, the Output Buffer for all the functions in this _DSM (see Section 9.1.1) is
limited to only the Status and Extended Status fields.
The output SPA range return indicates the scope of the ARS scrub for the specified type.
multiple of the Clear Uncorrectable Error Range Length Unit Size. The Clear Uncorrectable Error
request shall result in an Invalid Parameter error status if these rules are not followed.
Attempting to clear an error with a range length that overruns the end of a region shall result in an
Invalid Parameter error status.
Attempting to clear an error with a range length that is greater than the range of uncorrectable errors
is not considered a failure.
Attempting to clear an error from an address that does not currently have an uncorrectable error is
not considered a failure.
Note: The data contained in the locations that are cleared with this command are indeterminate. Care
must be taken when using this command since once the error has been cleared, subsequent
reads of those cleared locations will cause silent data corruption if software is unaware that the
original contents were lost. Software should only utilize this command if it can guarantee that the
locations have been retired from further use or will be written with valid data before the locations
are read.
Function Input
The following table outlines the expected input payload for this command.
Field Byte Byte Description
Length Offset
SPA 8 0 System Physical Address to translate. This is a byte aligned
address and all bits are considered valid. No masking or
shifting occurs.
Function Output
The following tables outline the expected output payload for this command.
Field Byte Byte Description
Length Offset
Status 2 0 Defined in Table 9-297.
If the SPA does not lie within one of the SPA ranges described
in the NFIT System Physical Address Range table, a status of
2, Invalid Input Parameter, is returned.
All other fields in this structure are Reserved if Status is
not set to 0 (i.e., Success).
Extended 2 2 Extended Status Field (Vendor Defined)
Status
Flags 1 4 Bit[0] – Mirrored SPA Location - If set to 1, indicates the SPA
location maps to one or more NVDIMMs that are mirrored
together and contributing to a single SPA range.
Translated 8 8 The number of bytes the returned SPA translation applies to.
Length The SPA range defined by the input SPA + output Translated
Length -1 will yield an address translation with a constant
Translated NVDIMM Device List containing a constant set of
NFIT Device Handles.
Number of 4 16 The number of NVDIMM devices being returned in the list of
NVDIMMs Translated NVDIMM Devices.
This is typically 1 for a given SPA location but for Mirrored SPA
Locations, it is possible to have multiple NVDIMMs that provide
the same SPA.
Translated Varies 20 List of one or more Translated NVDIMM Devices
NVDIMM
Device List
Translated NVDIMM Device:
Field Byte Byte Description
Length Offset
NFIT Device 4 0 Handle to physical NVDIMM that the SPA maps to. This handle
Handle can be utilized to retrieve other NFIT table data that further
describes the physical device.
Reserved 4 4 Returned as zero
Table 9-309 Translate SPA – Translated NVDIMM Device List Output Payload Format
9.20.7.9.2 Output
Return Value for this function is a buffer formatted as shown in Table 9-311.
Field Byte Length Byte Offset Description
Status 2 0 Bytes[1-0]
0 – Success
1 – Not Supported. The ARS Error Inject method is
not supported by the platform.
2 – Invalid Input Parameters. Platform reports that
the SPA range parameters passed to the ARS Error
Inject method are invalid or if notification is not
supported.
Extended Status 2 2 Reserved
9.20.7.10.2 Output
Return Value for this function is a buffer formatted as shown in Table 9-313.
Field Byte Length Byte Offset Description
Status 2 0 Bytes[1-0]
0 – Success
1 – Not Supported. The ARS Error Inject Clear
method is not supported by the platform.
2 – Invalid Input Parameters. Platform reports that
the SPA range parameters passed to the ARS Error
Inject method are invalid or the specified range does
not have an injected error.
Extended Status 2 2 Reserved
9.20.7.11.2 Output
Return Value for this function is a buffer formatted as shown in Table 9-314.
Field Byte Length Byte Offset Description
Status 2 0 Bytes[1-0]
0 – Success.
1 – Not Supported. The ARS Error Inject
Status Query method is not supported by the
platform.
Extended Status 2 2 Reserved
Injected Error Record 4 4 Number of Error Records in the following array
Count of Error Records.
If no ARS injected error, the Injected Error
Count field is 0.
ARS Error Inject Status Varies 8 Refer to Table 9-315, ARS Error Inject Status
Query Error Records Query – Error Record Format for the format of
the ARS Error Inject Status Query Error
Record.
Table 9-315 ARS Error Inject Status Query – Error Record Format
This section specifies the battery, AC adapter, and power source device objects OSPM uses to
manage power resources, as well as the power meter device objects OSPM uses to measure power
consumption.
A battery device is required to either have a Smart Battery subsystem or a Control Method Battery
interface as described in this section. OSPM is required to be able to connect and manage a battery
on either of these interfaces. This section describes these interfaces.
In the case of a compatible ACPI Smart Battery Table, the Definition Block needs to include a Bus/
Device package for the SMB-HC. This will install an OS-specific driver for the SMBus, which in
turn will locate the components of the Smart Battery subsystem. In addition to the battery or
batteries, the Smart Battery subsystem includes a charger and a manager device to handle
subsystems with multiple batteries.
The Smart Battery System Manager is one implementation of a manager device that is capable of
arbitrating among the available power sources (AC power and batteries) for a system. It provides a
superset of the Smart Battery Selector functionality, such as safely responding to power events (AC
versus battery power), inserting and removing batteries and notifying the OS of all such changes.
Additionally, the Smart Battery System Manager is capable of handling configurations including
simultaneous charging and discharging of multiple batteries. Unlike the Smart Battery Selector that
shares responsibility for configuring the battery system with OSPM, the Smart Battery System
Manager alone controls the safe configuration of the battery system and simply issues status changes
to OSPM when the configuration changes. Smart Battery System Manager is the recommended
solution for handling multiple-battery systems.
A Power Meter device is the logical representation of a platform sensor that measures the power
consumption of one or more devices in the system. A basic platform implementation implements
interfaces that query the current power consumption and get the currently configured power
consumption hardware limit, while more advance power meter device implementations provide
interfaces that support OSPM configurable power consumption trip points that trigger SCI events, or
enable configuration of the underlying hardware to enforce a hard limit on the maximum amount of
power that can be consumed.
SMBus
SBS
Battery0
0xB
SMBus
SBS
Battery1
0xB
Host SMBus SBS
Interface
Host SMBus System
Controller Manager SMBus
SBS
(0x8) 0xA Battery2
0xB
SMBus
SBS SMBus
SBS
Charger Battery3
0x9 0xB
SMBus defines a fixed 7-bit slave address per device. This means that all batteries in the system
have the same address (defined to be 0xB). The slave addresses associated with Smart Battery
subsystem components are shown in the following table.
Each SMBus device has up to 256 registers that are addressed through the SMBus protocol’s
Command value. SMBus devices are addressed by providing the slave address with the desired
register’s Command value. Each SMBus register can have non-linear registers; that is, command
register 1 can have a 32-byte string, while command register 2 can have a byte, and command
register 3 can have a word.
The SMBus host slave interface provides a standard mechanism for the host CPU to generate
SMBus protocol commands that are required to communicate with SMBus devices (in other words,
the Smart Battery components). ACPI defines such an SMB-HC that resides in embedded controller
address space; however, an OS can support any SMB-HC that has a native SMB-HC device driver.
• Event notification for battery insertion and removal
• Event notification for AC power connected or disconnected
• Status of which Smart Battery is communicating with the SMB-HC
• Status of which Smart Battery(s) are powering the system
• Status of which Smart Battery(s) are connected to the charger
• Status of which Smart Batteries are present in the system
• Event notification when the Smart Battery System Manager switches from one power source to
another
• Hardware-switching to an alternate Smart Battery when the Smart Battery supplying power runs
low
• Hardware switching between battery-powered and AC-powered powered operation
•
The Smart Battery System Manager function can reside in a standalone SMBus slave device (Smart
Battery System Manager that responds to the 0xA slave address), may be present within a smart
charger device (Smart Battery Charger that responds to the 0x9 slave address), or may be combined
within the embedded controller (that responds to the 0xA slave address). If both a Smart Battery
Charger and a standalone Smart Battery System Manager are present in the same Smart Battery
subsystem, then the driver assumes that the standalone Smart Battery System Manager is wired to
the batteries.
The Smart Battery charger is an SMBus device that provides a standard programming model to
control the charging of Smart Batteries present in a Smart Battery subsystem. For single battery
systems, the Smart Battery Charger is also responsible for notifying the system of the battery and
AC status.
The Smart Battery provides intelligent chemistry-independent power to the system. The Smart
Battery is capable of informing the Smart Battery charger of its charging requirements (which
provides chemistry independence) and providing battery status and alarm features needed for
platform battery management.
slave address1 (0x09) is placed in the embedded controller’s Alarm Address Register and the EC’s
Status Register’s Alarm bit is set. The embedded controller then asserts an SCI.
1. Notice that the 1.0 SMBus protocol specification is ambiguous about the definition of the “slave address”
written into the command field of the host controller. In this case, the slave address is actually the combination of the
7-bit slave address and the Write protocol bit. Therefore, bit 0 of the initiating device’s slave address is aligned to bit
1 of the host controller’s slave command register, bit 1 of the slave address is aligned to bit 2 of the controller’s slave
command register, and so on.
Embedded
Controller
Ports: 0x62, 0x66 SBS
Offset: 0x80
Query: 0x30
Battery
0xB
Host
Interface SMBus SMBus
Host
Controller
(0x8) SBS
Charger
0x9
In this example, the platform is using an SMB-HC that resides within the embedded controller and
meets the ACPI standard for an embedded controller interface and SMB-HC interface. The
embedded controller interface sits at system I/O port addresses 0x62 and 0x66. The SMB-HC is at
base address 0x80 within embedded controller address space (as defined by the ACPI embedded
controller specification) and responds to events on query value 0x30.
In this example the Smart Battery subsystem only supports a single Smart Battery. The ASL code for
describing this interface is shown below:
Device (EC0) {
Name (_HID, EISAID("PNP0C09"))
Name (_CRS,
ResourceTemplate () { // port 0x62 and 0x66
IO (Decode16, 0x62, 0x62, 0, 1),
IO (Decode16, 0x66, 0x66, 0, 1)
}
)
Name (_GPE, 0)
Device (SMB0) {
Name (_HID, "ACPI0001") // Smart Battery Host Controller
Name (_EC, 0x8030) // EC offset (0x80), Query (0x30)
Device (SBS0){ // Smart Battery Subsystem
Name (_HID, "ACPI0002") // Smart Battery Subsystem ID
Name(_SBS, 0x1) // Indicates support for one battery
} // end of SBS0
} // end of SMB0
} // end of EC
Embedded Controller
Ports: 0x100, 0x101 SBS
SMBus
Offset: 0x90
Query: 0x31
Battery0
0xB
Host Virtual SBS
Interface SMBus System
SMBus Manager SMBus
SBS
Host 0xA Battery1
Controller Virtual
0xB
(0x8) SMBus
SBS SMBus
SBS
Charger Battery2
0x9 0xB
In this example, the platform is using an SMB-HC that resides within the embedded controller and
meets the ACPI standard for an embedded controller interface and SMB-HC interface. The
embedded controller interface sits at system I/O port addresses 0x100 and 0x101. The SMB-HC
resides at base address 0x90 within embedded controller address space (as defined by the ACPI
embedded controller specification) and responds to events on query value 0x31.
In this example the Smart Battery subsystem supports three Smart Batteries. The Smart Battery
Charger and Smart Battery System Manager reside within the embedded controller, meet the Smart
Battery System Manager and Smart Battery Charger interface specification, and respond to their 7-
bit addresses (0xA and 0x9 respectively). The ASL code for describing this interface is shown
below:
Device (EC1) {
the end user with a meaningful estimation of remaining battery life. As such, control methods that
return battery information should calculate this information rather than return hard coded data.
A Control Method Battery is described as a device object. Each device object supporting the Control
Method Battery interface contains the following additional control methods. When there are two or
more batteries in the system, each battery will have an independent device object in the namespace.
A Control Method Battery device declaration in the ACPI namespace requires the _GLK object if
potentially contentious accesses to device resources are performed by non-OS code. See
Section 6.5.7, “_GLK (Global Lock),” for details about the _GLK object.
Return Value:
A Package containing the battery information as described below
Package {
Power Unit // Integer (DWORD)
Design Capacity // Integer (DWORD)
Last Full Charge Capacity // Integer (DWORD)
Battery Technology // Integer (DWORD)
Design Voltage // Integer (DWORD)
Design Capacity of Warning // Integer (DWORD)
Design Capacity of Low // Integer (DWORD)
Battery Capacity Granularity 1 // Integer (DWORD)
Battery Capacity Granularity 2 // Integer (DWORD)
Model Number // String (ASCIIZ)
Serial Number // String (ASCIIZ)
Battery Type // String (ASCIIZ)
OEM Information // String (ASCIIZ)
}
Additional Notes:
• A secondary-type battery should report the corresponding capacity (except for Unknown).
• On a multiple-battery system, all batteries in the system should return the same granularity.
• Operating systems prefer these control methods to report data in terms of power (watts).
• On a multiple-battery system, all batteries in the system must use the same power unit.
• The definition of battery capacity granularity has been clarified. For OSPM to determine if
systems support the clarified definition of battery capacity granularity, OSPM may evaluate an
_OSC method at the battery scope to indicate support for this capability, and for the platform to
indicate if it supports these extended capabilities.
Note: A secondary-type battery should report the corresponding capacity (except for Unknown).
Note: On a multiple-battery system, all batteries in the system should return the same granularity.
Note: Operating systems prefer these control methods to report data in terms of power (watts).
Note: On a multiple-battery system, all batteries in the system must use the same power unit.
Note: The definition of battery capacity granularity has been clarified. For OSPM to determine if systems
support the clarified definition of battery capacity granularity, OSPM may evaluate an _OSC
method at the battery scope to indicate support for this capability, and for the platform to indicate if
it supports these extended capabilities.
Table 10-321 Control Method Battery _OSC Capabilities DWORD2 Bit Definitions
Capabilities Interpretation
DWORD2 bits
0 0 – OS does not support revised battery granularity definition.
1 – OS supports revised battery granularity definition.
1 0 – OS does not support specifying wake on low battery user preference.
1 – OS supports specifying wake on low battery user preference, See Section 9.2.3,
_BLT Battery Level Threshold) for more information.
2-31 Reserved
Notice that when the battery is a primary battery (a non-rechargeable battery such as an Alkaline-
Manganese battery) and cannot provide accurate information about the battery to use in the
calculation of the remaining battery life, the Control Method Battery can report the percentage
directly to OS. It does so by reporting the Last Full Charged Capacity =100 and
BatteryPresentRate=0xFFFFFFFF. This means that Battery Remaining Capacity directly reports the
battery’s remaining capacity [%] as a value in the range 0 through 100 as follows:
Return Value:
None.
Note: Firmware is responsible for taking the current thermal throttle limit into account when engaging
charging.
Example:
Scope(\_SB) {
Scope(\_SB.PCI0.ISA0) {
Device(EC0) {
Name(_HID, EISAID("PNP0C09")) // ID for this EC
// current resource description for this EC
Name(_CRS, ResourceTemplate() {
IO(Decode16,0x62,0x62,0,1)
IO(Decode16,0x66,0x66,0,1)
})
Name(_GPE, 0) // GPE index for this EC
// create EC's region and field for thermal support
OperationRegion(EC0, EmbeddedControl, 0, 0xFF)
Field(EC0, ByteAcc, Lock, Preserve) {
TMP, 16, // current temp
PSV, 16, // passive cooling temp
BTH 16, // battery charge rate limit
}
// following is a method that OSPM will schedule after
// it receives an SCI and queries the EC to receive value 7
Method(_Q07) {
Notify (\_SB.PCI0.ISA0.EC0.TZ0, 0x80) } // end of Notify method
// create a thermal zone
ThermalZone (TZ0) {
Method(_TMP) { Return (\_SB.PCI0.ISA0.EC0.TMP )} // get current temp
Method(_PSV) { Return (\_SB.PCI0.ISA0.EC0.PSV) } // passive cooling temp
Name(_TZD, Package (){\_SB.PCI0.ISA0.EC0.BAT0}) // passive cooling devices
Name(_TC1, 4) // bogus example constant
Name(_TC2, 3) // bogus example constant
Name(_TSP, 150) // passive sampling = 15 sec
} // end of TZ0
Device (BAT0) {
Name(_HID, "PNP0C0A")
Name(_UID, One)
Method (_BTH, 0x1, NotSerialized) {
Store(Arg0, \_SB.PCI0.ISA0.EC0.BTH)
}
// additional battery objects
}
} // end of ECO
} // end of \_SB.PCI0.ISA0 scope
} // end of \_SB scope
Arguments: (1)
Arg0 – An Integer containing the new battery trip point
0 – Clear the trip point
1 – 0x7FFFFFFF – New trip point, in units of mWh or mAh depending on the Power Units value
Return Value:
None
Notify(battery_device, 0x82) if evaluating _BMC did not result in causing the Status Flags to be set
as indicated in that argument to _BMC. AML is not required to issue Notify(battery_device, 0x82) if
the Status Flags change while evaluating _BMC unless the change does not correspond to the
argument passed to _BMC.
Arguments:
None
Return Value:
A Package containing the battery maintenance data as described below
Bit [0] – Set to initiate an AML controlled calibration cycle. Clear to end the calibration cycle
Bit [1] – Set to disable charging. Clear to enable charging
Bit [2] – Set to allow the battery to discharge while AC power is available. Clear to prevent
discharging while AC power is available
Return Value:
None
See Section 3.9.5 for an overview of Battery Calibration.
Evaluating this object with bit0 set will initiate an AML controlled recalibration cycle if _BMD
indicates that this is supported. The calibration cycle is controlled by the platform and will typically
include disabling the AC adapter and discharging the battery, then charging the battery. While the
battery is charging, the platform runtime firmware should set Bit [4] of the Status flags returned by
_BMD if it is possible to put the system into standby during calibration to speed up charging.
Evaluating this with Bit [0] equal to 0 will abort the calibration cycle if one is in process. If the
platform runtime firmware determines that the calibration cycle must be aborted (for example AC
power is lost), or the calibration completes successfully, the platform runtime firmware will end the
cycle automatically, clear the _BMD Status Flag Bit [0], and send a notify 0x82. While the
calibration cycle is in process, the battery will report data normally, so the OS must disable battery
alarms.
Bit [1] and Bit [2] may not be used in conjunction with the AML controlled calibration cycle.
Having Bit [0] set will override Bit [1] and Bit [2]. Bit [1] will prevent the battery from charging
even though AC power is connected. Bit [2] will allow the system to draw its power from the battery
even though AC power is available. When the battery is no longer capable of delivering current, this
setting is automatically cleared, and the system will continue running off AC power without
interruption. In addition, if AC power is lost this bit will be cleared. When AC power comes back,
the OS must set the bit again if the user wants to continue discharging. When the system clears this
bit automatically, it will result in a change in the Status Flags returned by _BMD. This will cause a
notify 0x82. Bit [1] is only cleared automatically if an AML controlled calibration cycle is initiated.
When a battery is discharging because Bit [2] is set, the _PSR method of the AC adapter device will
report that AC is offline because the system is not running off of the AC adapter. If the batteries are
controlled individually (Bit [3] of the _BMD Capabilities Flags), setting either battery to discharge
will cause _PSR to report AC offline. If more than one battery in the system has Bit [2] set to
discharge the battery, it is up to the system to decide which battery to discharge, so only on a system
that discharges the batteries one at a time, a battery with Bit2 set may not be discharging if another
battery in the system is being discharged.
If Batteries are not controlled individually, calling _BMC will initiate calibration, disable charge,
and/or allow discharge on all batteries in the system. The state of these batteries will be reflected in
the _BMD Status Flags for all batteries.
may not be possible. Instead the firmware can choose to expose a virtual power supply that
represents one or more of the physical power supplies.
Return Value:
A Package with the following format:
Package {
Power Source State // Integer (DWORD)
Maximum Output Power // Integer (DWORD)
Maximum Input Power // Integer (DWORD)
Model Number // String (ASCIIZ)
Serial Number // String (ASCIIZ)
OEM Information // String (ASCIIZ)
}
Return Value:
A variable-length Package containing a list of References to power source devices. It has the
following format:
Package {
Power source[0], // Reference
Power source[1], // Reference
Package {
Supported Capabilities // Integer (DWORD)
Measurement Unit // Integer (DWORD)
Measurement Type // Integer (DWORD)
Measurement Accuracy // Integer (DWORD)
Measurement Sampling Time // Integer (DWORD)
Minimum Averaging Interval // Integer (DWORD)
Maximum Averaging Interval // Integer (DWORD)
Hysteresis Margin // Integer (DWORD)
Hardware Limit Is Configurable // Boolean (DWORD)
Min Configurable Hardware Limit // Integer (DWORD)
Max Configurable Hardware Limit // Integer (DWORD)
Model Number // String
Serial Number // String
OEM Information // String
}
averaging interval independently from OSPM, the platform must issue a Notify(power_meter, 0x84)
to indicate the change to the OSPM. Upon receiving the notification, OSPM evaluates the _GAI
object to read the new averaging interval.
Arguments:
None
Return Value:
An Integer containing the currently configured power averaging interval, in milliseconds. If an error
occurs while obtaining the averaging interval or if the value is not available then an Integer with all
bits set is returned.
10.6 Wireless Power Calibration Event
To communicate the changes in wireless power transmission or interference mitigation to the
OSPM. AML code should issue a Notify (wpc_device, 0xXX) whenever a change in power
calibration or interference mitigation is required to happen. The OS receives this notification and
may call the _WPD control method to determine the notification action associated with it. Event
generated may contain the information related to associate action that recipient devices need to take.
WPD notification should occur whenever a change in power transmission needed either as a result of
human proximity or interference mitigation. The granularity of the interference mitigation and
power transmission can be address as per the operational device characteristics.
The WPC notification for interference mitigation will generate pairwise event among participant
devices or multicast is if the interference is observed in all the bands of operations involving the
wireless devices.
d ADP1 AC Adapter #1
d BAT1 Battery #1
_HID Plug and Play ID for BAT1
_STA Battery 1 Device Status
_BIX Battery 1 Information
_BST Battery 1 Status
_BTP Battery 1 Trip Point
_PCL Power Consumer List
d BAT2 Battery #2
11 Thermal Management
This section describes the ACPI thermal model and specifies the ACPI Namespace objects OSPM
uses for thermal management of the platform.
Thermal Zone
Processor
T
Thermal Zone-wide active
Processor with embedded cooling device (Fan)
temperature sensor
Device T
Thermal Zone-wide
T
temperature sensor
When a thermal zone appears in the ACPI Namespace or when a new device becomes a member of a
thermal zone, OSPM retrieves the temperature thresholds (trip points) at which it executes a cooling
policy. When OSPM receives a temperature change notification, it evaluates the thermal zone’s
temperature interfaces to retrieve current temperature values. OSPM compares the current
temperature values against the temperature thresholds. If any temperature is greater than or equal to
a corresponding active trip point then OSPM will perform active cooling . If any temperature is
greater than or equal to a corresponding passive trip point then OSPM will perform passive cooling.
If the _TMP object returns a value greater than or equal to the value returned by the _HOT object
then OSPM may choose to transition the system into the S4 sleeping state, if supported. If the _TMP
object returns a value greater than or equal to the value returned by the _CRT object then OSPM
must shut the system down. Embedded Hot and Critical trip points may also be exposed by
individual devices within a thermal zone. Upon passing of these trip points, OSPM must decide
whether to shut down the device or the entire system based upon device criticality to system
operation. OSPM must also evaluate the thermal zone’s temperature interfaces when any thermal
zone appears in the namespace (for example, during system initialization) and must initiate a cooling
policy as warranted independent of receipt of a temperature change notification. This allows OSPM
to cool systems containing a thermal zone whose temperature has already exceeded temperature
thresholds at initialization time.
An optimally designed system that uses several thresholds can notify OSPM of thermal increase or
decrease by raising an event every several degrees. This enables OSPM to anticipate thermal trends
and incorporate heuristics to better manage the system’s temperature.
To implement a preference towards performance or energy conservation, OSPM can request that the
platform change the priority of active cooling (performance) versus passive cooling (energy
conservation/silence) by evaluating the _SCP (Set Cooling Policy) object for the thermal zone or a
corresponding OS-specific interface to individual devices within a thermal zone.
1. OSPM notifies the platform of the new cooling mode by running the Set Cooling Policy (_SCP)
control method in all thermal zones and invoking the OS-specific Set Cooling Policy interface to
all participating devices in each thermal zone.
2. Thresholds are updated in the hardware and OSPM is notified of the change.
3. OSPM re-evaluates the active and passive cooling temperature trip points for the zone and all
devices in the zone to obtain the new temperature thresholds.
controller firmware can overcome limitations of existing thermal sensor capabilities to provide the
desired asynchronous notification.
Notice that the _TZP (thermal zone polling) object is used to indicate whether a thermal zone must
be polled by OSPM, and if so, a recommended polling frequency. See Section 11.4.26, “_TZP,” for
more information.
95
90 _CRT: Critical shutdown threshold
85
80
75 _AC0: Fan high speed threshold
70
65 _AC1: Fan low speed threshold
Temperature Change
60
Events (SCIs)
55
50 _PSV: Passive cooling threshold
45
40
35
30
25
For example, the simple thermal zone illustrated above includes hardware that will generate a
temperature change notification using a 5 Celsius granularity. All thresholds (_PSV, _AC1, _AC0,
and _CRT) exist within the monitored range and fall on 5 boundaries. This granularity is appropriate
for this system as it provides sufficient opportunity for OSPM to detect when a threshold is crossed
as well as to understand the thermal zone’s basic characteristics (temperature trends).
Note: The ACPI specification defines Kelvin as the standard unit for absolute temperature values. All
thermal zone objects must report temperatures in Kelvin when reporting absolute temperature
values. All figures and examples in this section of the specification use Celsius for reasons of
clarity. ACPI allows Kelvin to be declared in precision of 1/10th of a degree (for example, 310.5).
Kelvin is expressed as /K = TC + 273.2.
11.1.3.2 Polling
Temperature sensor hardware that is incapable of generating thermal change events, or that can do
so for only a few thresholds should inform OSPM to implement a poll-based policy. OSPM does this
to ensure that temperature changes across threshold boundaries are always detectable.
Polling can be done in conjunction with hardware notifications. For example, thermal zone hardware
that only supports a single threshold might be configured to use this threshold as the critical
temperature trip point. Assuming that hardware monitors the temperature at a finer granularity than
OSPM would, this environment has the benefit of being more responsive when the system is
overheating.
A thermal zone advertises the need to be polled by OSPM via the _TZP object. See Section 11.4.26,
“_TZP,” for more information.
100%
Tn - 1
P
CPU Performance
Tn
Tt
50%
Time
Figure 11-68 Temperature and CPU Performance Versus Time
The following equation should be used by OSPM to assess the optimum CPU performance change
necessary to lower the thermal zone’s temperature:
Equation #1:
P [%] = _TC1 * ( Tn - Tn-1 ) + _TC2 * (Tn - Tt)
Where:
Tn = current temperature
Tt = target temperature (_PSV)
The two coefficients _TC1 and _TC2 and the sampling period _TSP are hardware-dependent
constants the OEM must supply to OSPM (for more information, see Section 11.4, “Thermal
Objects”). The _TSP object contains a time interval that OSPM uses to poll the hardware to sample
the temperature. Whenever the time value returned by _TSP has elapsed, OSPM will evaluate _TMP
to sample the current temperature (shown as Tn in the above equation). Then OSPM will use the
sampled temperature and the passive cooling temperature trip point (_PSV) (which is the target
temperature Tt) to evaluate the equation for P. The granularity of P is determined by the CPU
duty width of the system.
Equation #2:
Pn = Pn-1 + HW[- ?P ] where Minimum% <= Pn <= 100%
For Equation #2, whenever Pn-1 + ?P lies outside the range Minimum0-100%, then Pn will be
truncated to Minimum0-100%. Minimum% is the _MTL limit, or 0% if _MTL is not defined. For
hardware that cannot assume all possible values of Pn between Minimum0 and 100%, a hardware
specific mapping function HW is used.
In addition, the hardware mapping function in Equation #2 should be interpreted as follows:
For absolute temperatures:
1. If the right hand side of Equation #1 is negative, HW[ P] is rounded to the next available higher
setting of frequency.
2. If the right hand side of Equation #1 is positive, HW[P] is rounded to the next available lower
setting of frequency.
For relative temperatures:
1. If the right hand side of Equation #1 is positive, HW[ P] is rounded to the next available higher
setting of frequency.
2. If the right hand side of Equation #1 is negative, HW[P] is rounded to the next available lower
setting of frequency.
• The calculated Pn becomes Pn-1 during the next sampling period.
• For more information about CPU throttling, see Section 8.1.1, Processor Power State C0.” A
detailed explanation of this thermal feedback equation is beyond the scope of this specification.
95
90
85
80
75
70
Active Cooling Thresholds (_ACx) 65 Passive Cooling Threshold (_PSV)
60
55
50
45
40
35
30
25
As illustrated in Figure 11-69, the platform must convey the value for each threshold to instruct
OSPM to initiate the cooling policies at the desired target temperatures. The platform can emphasize
active or passive cooling modes by assigning different threshold values. Generally, if _ACx is set
lower than _PSV, then the system emphasizes active cooling. Conversely, if _PSV is set lower than
_ACx, then the emphasis is placed on passive cooling.
For example, a thermal zone that includes a processor and one single-speed fan may use _PSV to
indicate the temperature value at which OSPM would enable passive cooling and _AC0 to indicate
the temperature at which the fan would be turned on. If the value of _PSV is less than _AC0 then the
system will favor passive cooling (for example, CPU clock throttling). On the other hand, if _AC0 is
less than _PSV the system will favor active cooling (in other words, using the fan). See Figure 11-70
below.
95 95
90 _CRT 90 _CRT
85 85
80 80
75 _PSV 75 _AC0
70 70
65 65
60 60
55 55
50 _AC0 50 _PSV
45 45
40 40
35 35
30 30
25 25
The example on the left enables active cooling (for example, turn on a fan) when OSPM detects the
temperature has risen above 50. If for some reason the fan does not reduce the system temperature,
then at 75 OSPM will initiate passive cooling (for example, CPU throttling) while still running the
fan. If the temperature continues to climb, OSPM will quickly shut the system down when the
temperature reaches 90C. The example on the right is similar but the _AC0 and _PSV threshold
values have been swapped to emphasize passive cooling.
The ACPI thermal model allows flexibility in the thermal zone design. An OEM that needs a less
elaborate thermal implementation may consider using only a single threshold (for example, _CRT).
Complex thermal implementations can be modeled using multiple active cooling thresholds and
devices, or through the use of additional thermal zones.
Alternatively, devices may include the _TZM (Thermal Zone Member) object their device scope to
convey their thermal zone association to OSPM. Section 11.4.25, “_TZM (Thermal Zone Member)”,
for more information.
While the Fan Device and its associated objects are optional, if the Fan Device is implemented by
the platform, all objects listed in Table 11-330 are required and must be provided.
If a fan device supports fine-grained control, OSPM may evaluate a fan device’s _FSL object with
any Level argument value that is less than or equal to the Control field value specified in the package
of the _FPS object’s package list that corresponds to the active cooling trip point that has been
exceeded. This capability provides OSPM access to one hundred fan speed settings thus enabling
fine-grained fan speed control. The platform uses the StepSize field to help OSPM optimize its fan
level selection policy by fine-grained fan speed control. The platform uses the StepSize field to help
OSPM optimize its fan level selection policy by indicating recommended increments in the fan
speed level value that are appropriate for the fan when one percent increments are not optimal. In the
event OSPM’s incremental selections of Level using the StepSize field value do not sum to 100%,
OSPM may select an appropriate ending Level increment to reach 100%. OSPM should use the
same residual step value first when reducing Level.
Argument Information
Arg0: Level. If the fan supports fine-grained control, Level is a percentage of maximum level (0-
100) that the platform is to engage the fan. If the fan does not support fine-grained control, Level is a
Control field value from a package in the _FPS object’s package list. A Level value of zero causes
the platform to turn off the fan.
Package (){
Revision, // Integer
Control, // Integer DWORD
Speed // Integer DWORD
}
Object Description
_TPT Conveys the temperature of a devices internal temperature sensor to the platform when a
temperature trip point is crossed or a meaningful change in temperature occurs.
_TRT Table of values that convey the Thermal Relationship between devices
_TSN Returns a reference to the thermal sensor device used to monitor the temperature of the thermal
zone (when defined under a thermal zone).
_TSP Thermal sampling period for Passive cooling in tenths of seconds.
_TST Conveys the minimum separation for a devices’ programmable temperature trip points.
_TZD List of devices whose temperature is measured by this thermal zone.
_TZM Returns the thermal zone for which a device is a member.
_TZP Thermal zone polling frequency in tenths of seconds.
With the exception of _TPT, _TST, and the _TZM objects, the objects described in the following
sections may exist under a thermal zone. Devices with embedded thermal sensors and controls may
contain static cooling temperature trip points or dynamic cooling temperature trip points that must be
programmed by the device’s driver. In this case, thermal objects defined under a device serve to
convey the platform specific values for these settings to the devices driver.
The return value is an integer that represents tenths of degrees Kelvin. For example, 300.0K is
represented by the integer 3000.
Note: If a thermal zone has _ART object defined as well as _ALx defined, the OSPM ignores _ALx
objects and uses _ART exclusively.
In the case multiple active cooling trip points have been exceeded and _ART entries indicate various
maximum limits for the same SourceDevice, OSPM may operate the SourceDevice up to the highest
ACxMaxLevel value indicated for all exceeded trip points.
Return Value:
None
The return value is an integer that represents the amount of change in device temperature that is
meaningful to the platform and for which the platform requires notification via evaluation of the
_TPT object.
Argument Information:
Mode – 0 = Active, 1 = Passive
Acoustic Limit – Specifies the maximum acceptable acoustic level that active cooling devices may
generate. Values are 1 to 5 where 1 means no acoustic tolerance and 5 means maximum
acoustic tolerance.
Power Limit – Specifies the maximum acceptable power level that active cooling devices may
consume. Values are from 1 to 5 where 1 means no power may be used to cool and 5 means
maximum power may be used to cool.
Example:
// Fan Control is defined as follows:
// Speed 1 (Fan is Off): Acoustic Limit 1, Power Limit 1, <= 64C
// Speed 2: Acoustic Limit 2, Power Limit 2, 65C - 74C
// Speed 3: Acoustic Limit 3, Power Limit 3, 75C - 84C
// Speed 4: Acoustic Limit 4, Power Limit 4, 85C - 94C
// Speed 5: Acoustic Limit 5, Power Limit 5, >= 95C
Method(_SCP,3,Serialized)
{
// Store the Cooling Mode in NVS and use as needed in
// the rest of the ASL Code.
Store(Arg0, CTYP)
//
// NOTE3: This code will define Passive cooling so that
// CPU throttling will be initiated within the Power Limit
// Region passed in such that the next higher Power Limit
// Region will not be reached.
Switch(Arg2)
{
Return Value:
An Integer containing Thermal Constant #2
and must be set far enough away from the current temperature so as to not to miss the crossing of a
meaningful temperature point. The _TST object conveys the recommended minimum separation
between the current temperature and an intermediate temperature trip point to OSPM.
occurs—relieving the OS of the overhead associated with polling. See Section 11.1.3, “Detecting
Temperature Changes,” for more information.
This value is specified as tenths of seconds with a 1 second granularity. A minimum value of 30
seconds (_TZP evaluates to 300) and a maximum value of 300 seconds (in other words, 5 minutes)
(_TZP evaluates to 3000) may be specified. As this is a recommended value, OSPM will consider
other factors when determining the actual polling frequency to use.
• If _ACx is defined then an associated _ALx must be defined (e.g. defining _AC0 requires _AL0
also be defined).
• If _PSV is defined then either the _PSL or _TZD objects must exist. The _PSL and _TZD
objects may both exist.
• If _PSL is defined then:
— If a linear performance control register is defined (via either P_BLK or the _PTC, _TSS,
_TPC objects) for a processor defined in _PSL or for a processor device in the zone as
indicated by _TZM then the _TC1, _TC2, and objects must exist. A_TFP or _TSP object
must also be defined if the device requires polling.
— If a linear performance control register is not defined (via either P_BLK or the _PTC, _TSS,
_TPC objects) for a processor defined in _PSL or for a processor device in the zone as
indicated by _TZM then the processor must support processor performance states (in other
words, the processor’s processor object must include _PCT, _PSS, and _PPC).
• If _PSV is defined and _PSL is not defined then at least one device in thermal zone, as indicated
by either the _TZD device list or devices’ _TZM objects, must support device performance
states.
• _SCP is optional.
• _TZD is optional outside of the _PSV requirement outlined above.
• If _HOT is defined then the system must support the S4 sleeping state.
Scope(\_SB) {
Device(CPU0) {
Name(_HID, “ACPI0007”)
Name(_UID, 1) // unique number for this processor
}
<…>
Scope(\_SB.PCI0.ISA0) {
Device(EC0) {
Name(_HID, EISAID("PNP0C09")) // ID for this EC
// current resource description for this EC
Name(_CRS, ResourceTemplate() {
IO(Decode16,0x62,0x62,0,1)
IO(Decode16,0x66,0x66,0,1)
})
Name(_GPE, 0) // GPE index for this EC
} // end of ECO
} // end of \_SB.PCI0.ISA0 scope-
Scope(\_SB.PCI0.ISA0) {
Device(EC0) {
Name(_HID, EISAID("PNP0C09")) // ID for this EC
// current resource description for this EC
Name(_CRS, ResourceTemplate() {
IO(Decode16,0x62,0x62,0,1)
IO(Decode16,0x66,0x66,0,1)
})
Name(_GPE, 0) // GPE index for this EC
} // end of ECO
} // end of \_SB.PCI0.ISA0 scope
Name(_HID, "ACPI0007")
Name(_UID, 0)
//
// Load additional objects if 3.0 Thermal model support is available
//
Method(_INI, 0) {
If (\_OSI("3.0 Thermal Model")) {
LoadTable("OEM1", "PmRef", "Cpu0", "\\_SB.CPU0") // 3.0 Thermal Model
}
}
Device(CPU1) {
Name(_HID, "ACPI0007")
Name(_UID, 1)
//
// Load additional objects if 3.0 Thermal model support is available
//
Method(_INI, 0) {
If (\_OSI("3.0 Thermal Model")) {
LoadTable("OEM1", "PmRef", "Cpu1", "\\_SB.CPU1") // 3.0 Thermal Model
}
}
Scope(\_SB.PCI0.ISA0) {
Device(EC0) {
Name(_HID, EISAID("PNP0C09")) // ID for this EC
//
// Load additional objects if 3.0 Thermal model support is available
//
Method(_INI, 0) {
If (\_OSI("3.0 Thermal Model")) {
LoadTable("OEM1", "PmRef", "Tz3", "\\_SB.PCI0.ISA0.EC0") // 3.0 Tz
}
}
} // end of ECO
} // end of \_SB.PCI0.ISA0 scope
} // end of \_SB scope
//
// ACPI 3.0 Thermal Model SSDT
//
DefinitionBlock (
"TZASSDT.aml",
"OEM1",
0x01,
"PmRef",
"Tz3",
0x3000
)
{
External(\_SB.PCI0.ISA0.EC0, DeviceObj)
External(\_SB.CPU0, DeviceObj)
External(\_SB.CPU1, DeviceObj)
Scope(\_SB.PCI0.ISA0.EC0)
{
// Create an ACPI 3.0 specific thermal zone
ThermalZone (TZ0) {
// This TRT is for exemplary purposes only
Name(_TRT, Package() {
// Thermal relationship package data. A package is generated for
// each permutation of device sets. 2 devices = 4 entries.
// Read: source, target, thermal influence, sampling period, 4 reserved
Package () {\_SB.CPU0, \_SB.CPU0, 20, 1, 0, 0, 0, 0},
Package () {\_SB.CPU0, \_SB.CPU1, 10, 15, 0, 0, 0, 0},
Package () {\_SB.CPU1, \_SB.CPU0, 10, 15, 0, 0, 0, 0},
Package () {\_SB.CPU1, \_SB.CPU1, 20, 1, 0, 0, 0, 0}
}) // end of TRT
} // end of TZ0
} // end of EC0 Scope
} // end of SSDT
//
// CPU0 3.0 Thermal Model SSDT
//
DefinitionBlock (
"CPU0SSDT.aml",
"OEM1",
0x01,
"PmRef",
"CPU0",
0x3000
)
{
External(\_SB.CPU0, DeviceObj)
External(\_SB.PCI0.ISA0.TZ0, ThermalZoneObj)
Scope(\_SB.CPU0)
{
//
// Add the objects required for 3.0 extended thermal support
//
// Create a region and fields for thermal support; the platform
// fills in the values and traps on writes to enable hysteresis.
// The Operation Region location is invalid
OperationRegion(CP00, SystemMemory, 0x00000000, 0xA)
Field(CP00, ByteAcc, Lock, Preserve) {
SCP, 1, // thermal policy (passive/active)
RTV, 1, // absolute or relative temperature
, 6, // reserved
AC0, 16, // active cooling temp
PSV, 16, // passive cooling temp
CRT, 16, // critical temp
TPT, 16, // Temp trip point crossed
TST, 8 // Temp sensor threshold
}
//
// CPU1 3.0 Thermal Model SSDT
//
DefinitionBlock (
"CPU1SSDT.aml",
"OEM1",
0x01,
"PmRef",
"CPU1",
0x3000
)
{
External(\_SB.CPU1, DeviceObj)
External(\_SB.PCI0.ISA0.TZ0, ThermalZoneObj)
Scope(\_SB.CPU1)
{
//
// Add the objects required for 3.0 extended thermal support
//
// Create a region and fields for thermal support; the platform
// fills in the values and traps on writes to enable hysteresis.
// The Operation Region location is invalid
OperationRegion(CP01, SystemIO, 0x00000008, 0xA)
Field(CP01, ByteAcc, Lock, Preserve) {
SCP, 1, // thermal policy (passive/active)
RTV, 1, // absolute or relative temperature
, 6, // reserved
AC0, 16, // active cooling temp
PSV, 16, // passive cooling temp
CRT, 16, // critical temp
TPT, 16, // Temp trip point crossed
TST, 8 // Temp sensor threshold
}
ACPI defines a standard hardware and software communications interface between an OS driver and
an embedded controller. This allows any OS to provide a standard driver that can directly
communicate with an embedded controller in the system, thus allowing other drivers within the
system to communicate with and use the resources of system embedded controllers. This in turn
enables the OEM to provide platform features that the OS OSPM and applications can take
advantage of.
ACPI also defines a standard hardware and software communications interface between an OS
driver and an Embedded Controller-based SMB-HC (EC-SMB-HC).
The ACPI standard supports multiple embedded controllers in a system, each with its own resources.
Each embedded controller has a flat byte-addressable I/O space, currently defined as 256 bytes.
Features implemented in the embedded controller have an event “query” mechanism that allows
feature hardware implemented by the embedded controller to gain the attention of an OS driver or
ASL/AML code handler. The interface has been specified to work on the most popular embedded
controllers on the market today, only requiring changes in the way the embedded controller is
“wired” to the host interface.
Two interfaces are specified:
• A private interface, exclusively owned by the embedded controller driver.
• A shared interface, used by the embedded controller driver and some other driver.
This interface is separate from the traditional PC keyboard controller. Some OEMs might choose to
implement the ACPI Embedded Controller Interface (ECI) within the same embedded controller as
the keyboard controller function, but the ECI requires its own unique host resources (interrupt event
and access registers).
This interface does support sharing the ECI with an inter-environment interface (such as SMI) and
relies on the ACPI-defined “Global Lock” protocol. Note, however, that HW-reduced ACPI
platforms, which do not support the Global Lock, cannot share the EC interface. For information
about the Global Lock interface, see Section 5.2.10.1, “Global Lock.” Both the shared and private
EC interfaces are described in the following sections.
The ECI has been designed such that a platform can use it in either the legacy or ACPI modes with
minimal changes between the two operating environments. This is to encourage standardization for
this interface to enable faster development of platforms as well as opening up features within these
controllers to higher levels of software.
controller is a unique feature in that it can perform complex low-level functions through a simple
interface to the host microprocessor(s).
Although there is a large variety of microcontrollers in the market today, the most commonly used
embedded controllers include a host interface that connects the embedded controller to the host data
bus, allowing bi-directional communications. A bi-directional interrupt scheme reduces the host
processor latency in communicating with the embedded controller.
Currently, the most common host interface architecture incorporated into microcontrollers is
modeled after the standard IA-PC architecture keyboard controller. This keyboard controller is
accessed at 0x60 and 0x64 in system I/O space. Port 0x60 is termed the data register, and allows bi-
directional data transfers to and from the host and embedded controller. Port 0x64 is termed the
command/status register; it returns port status information upon a read, and generates a command
sequence to the embedded controller upon a write. This same class of controllers also includes a
second decode range that shares the same properties as the keyboard interface by having a
command/status register and a data register. The following diagram graphically depicts this
interface.
EC_SMI_STS
EC_SMI
EC_SMI_EN
EC_SCI_STS
EC_SCI
EC_SCI_EN
The diagram above depicts the general register model supported by the ACPI Embedded Controller
Interface.
The first method uses an embedded controller interface shared between OSPM and the system
management code, which requires the Global Lock semaphore overhead to arbitrate ownership. The
second method is a dedicated embedded controller decode range for sole use by OSPM driver. The
following diagram illustrates the embedded controller architecture that includes a dedicated ACPI
interface.
EC_SMI_STS
EC_SMI
EC_SMI_EN
SMI
DATA READ (SMI) SMI OUTPUT
INTERFACE
BUFFER
CODE
SCI
DATA READ (SCI) SCI OUTPUT INTERFACE
BUFFER CODE
EC_SCI_STS
EC_SCI
EC_SCI_EN
The private interface allows OSPM to communicate with the embedded controller without the
additional software overhead associated with using the Global Lock. Several common system
configurations can provide the additional embedded controller interfaces:
• Non-shared embedded controller. This will be the most common case where there is no need for
the system management handler to communicate with the embedded controller when the system
transitions to ACPI mode. OSPM processes all normal types of system management events, and
the system management handler does not need to take any actions.
• Integrated keyboard controller and embedded controller. This provides three host interfaces as
described earlier by including the standard keyboard controller in an existing component (chip
set, I/O controller) and adding a discrete, standard embedded controller with two interfaces for
system management activities.
• Standard keyboard controller and embedded controller. This provides three host interfaces by
providing a keyboard controller as a distinct component, and two host interfaces are provided in
the embedded controller for system management activities.
• Two embedded controllers. This provides up to four host interfaces by using two embedded
controllers; one controller for system management activities providing up to two host interfaces,
and one controller for keyboard controller functions providing up to two host interfaces.
• Embedded controller and no keyboard controller. Future platforms might provide keyboard
functionality through an entirely different mechanism, which would allow for two host
interfaces in an embedded controller for system management activities.
To handle the general embedded controller interface (as opposed to a dedicated interface) model, a
method is available to make the embedded controller a shareable resource between multiple tasks
running under the operating system’s control and the system management interrupt handler. This
method, as described in this section, requires several changes:
• Additional external hardware
• Embedded controller firmware changes
• System management interrupt handler firmware changes
• Operating software changes
Access to the shared embedded controller interface requires additional software to arbitrate between
the operating system’s use of the interface and the system management handler’s use of the
interface. This is done using the Global Lock as described in Section 5.2.10.1, “Global Lock", but is
not supported on HW-reduced ACPI platforms.
This interface sharing protocol also requires embedded controller firmware changes, in order to
ensure that collisions do not occur at the interface. A collision could occur if a byte is placed in the
system output buffer and an interrupt is then generated. There is a small window of time when the
incorrect recipient could receive the data. This problem is resolved by ensuring that the firmware in
the embedded controller does not place any data in the output buffer until it is requested by OSPM or
the system management handler.
More detailed algorithms and descriptions are provided in the following sections.
Where:
The Output Buffer Full (OBF) flag is set when the embedded controller has written a byte of data
into the command or data port but the host has not yet read it. After the host reads the status byte and
sees the OBF flag set, the host reads the data port to get the byte of data that the embedded controller
has written. After the host reads the data byte, the OBF flag is cleared automatically by hardware.
This signals the embedded controller that the data has been read by the host and the embedded
controller is free to write more data to the host.
The Input Buffer Full (IBF) flag is set when the host has written a byte of data to the command or
data port, but the embedded controller has not yet read it. After the embedded controller reads the
status byte and sees the IBF flag set, the embedded controller reads the data port to get the byte of
data that the host has written. After the embedded controller reads the data byte, the IBF flag is
automatically cleared by hardware. This is the signal to the host that the data has been read by the
embedded controller and that the host is free to write more data to the embedded controller.
The SCI event (SCI_EVT) flag is set when the embedded controller has detected an internal event
that requires the operating system’s attention. The embedded controller sets this bit in the status
register, and generates an SCI to OSPM. OSPM needs this bit to differentiate command-complete
SCIs from notification SCIs. OSPM uses the query command to request the cause of the SCI_EVT
and take action. For more information, see Section 12.3, “Embedded Controller Command Set.”)
The SMI event (SMI_EVT) flag is set when the embedded controller has detected an internal event
that requires the system management interrupt handler's attention. The embedded controller sets this
bit in the status register before generating an SMI.
The Burst (BURST) flag indicates that the embedded controller has received the burst enable
command from the host, has halted normal processing, and is waiting for a series of commands to be
sent from the host. This allows OSPM or system management handler to quickly read and write
several bytes of data at a time without the overhead of SCIs between the commands.
The Embedded Controller sets the Burst bit of the Embedded Controller Status Register, puts the
Burst Acknowledge byte (0x90) into the SCI output buffer, sets the OBF bit, and generates an SCI to
signal OSPM that it is in Burst mode.
Burst mode is exited the following manner:
OSPM driver writes the Burst Disable Embedded Controller, BD_EC (0x83) command byte and
then the Embedded Controller will exit Burst mode by clearing the Burst bit in the Embedded
Controller Status register and generating an SCI signal (due to IBF=0).
The Embedded Controller clears the Burst bit of the Embedded Controller Status Register.
Interrupt detected
T
HOLD
Interrupt serviced
and cleared
Table 12-340 Events for Which Embedded Controller Must Generate SCIs
Event Description
IBF=0 Signals that the embedded controller has read the last command or data from the input
buffer and the host is free to send more data.
OBF=1 Signals that the embedded controller has written a byte of data into the output buffer and
the host is free to read the returned data.
SCI_EVT=1 Signals that the embedded controller has detected an event that requires OS attention.
OSPM should issue a query (QR_EC) command to find the cause of the event.
After ownership is acquired, the protocol always consists of the passing of a command byte. The
command byte will indicate the type of action to be taken. Following the command byte, zero or
more data bytes can be exchanged in either direction. The data bytes are defined according to the
command byte that is transferred.
The embedded controller also has two status bits that indicate whether the registers have been read.
This is used to ensure that the host or embedded controller has received data from the embedded
controller or host. When the host writes data to the command or data register of the embedded
controller, the input buffer flag (IBF) in the status register is set within 1 microsecond. When the
embedded controller reads this data from the input buffer, the input buffer flag is reset. When the
embedded controller writes data into the output buffer, the output buffer flag (OBF) in the status
register is set. When the host processor reads this data from the output buffer, the output buffer flag
is reset.
Certain SMBus segments have special requirements that the host controller filters certain SMBus
commands (for example, to prevent an errant application or virus from potentially damaging the
battery subsystem). This is most easily accomplished by implementing the host interface controller
through an embedded controller—as embedded controller can easily filter out potentially
problematic commands.
Notice that an EC-SMB-HC interface will require the inclusion of the GLK method in its ACPI
namespace if potentially contentious accesses to device resources are performed by non-OS code.
See Section 6.5.7, “_GLK (Global Lock)” for details on using the _GLK method.
Note: OSPM must ensure the ALRM bit is cleared after it has been serviced by writing ‘00’ to the
SMB_STS register.
Where:
DONE: Indicates the last command has completed and no error.
ALRM: Indicates an SMBus alarm message has been received.
RES: Reserved
STATUS: Indicates SMBus communication status for one of the reasons listed in the following
table.
Where:
PROTOCOL: 0x00 – Controller Not In Use
0x01 – Reserved
0x02 – Write Quick Command
0x03 – Read Quick Command
0x04 – Send Byte
0x05 – Receive Byte
0x06 – Write Byte
For example, the protocol value of 0x09 would be used to communicate to a device that supported
the standard read word protocol. If this device also supported packet error checking for this protocol,
a value of 0x89 (read word with PEC) could optionally be used. See the SMBus specification for
more information on packet error checking.
When OSPM initiates a new command such as write to the SMB_PRTCL register, the SMBus
controller first updates the SMB_STS register and then clears the SMB_PRTCL register. After the
SMB_PRTCL register is cleared, the host controller query value is raised.
All other protocol values are reserved.
Where:
RES: Reserved
ADDRESS: 7-bit SMBus address. This address is not zero aligned (in other words, it is only a 7-bit
address (A6:A0) that is aligned from bit 1-7).
Where:
This bank of registers contains the remaining bytes to be sent or received in any of the different
protocols that can be run on the SMBus. The SMB_DATA[i] registers are defined on a per-protocol
basis and, as such, provide efficient use of register space.
Where:
DATA: One byte of data to be sent or received (depending upon protocol).
Where:
RES: Reserved
ADDRESS: Slave address (A6:A0) of the SMBus device that initiated the SMBus alarm message.
specific reason for the alarm message, such that OSPM can take actions. Once an alarm message has
been received, the SMB-HC will not receive additional alarm messages until the ALRM status bit is
cleared.
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
DATA (D7:D0)
Where:
DATA: Data byte received in alarm message.
The alarm address and alarm data registers are not read by OSPM until the alarm status bit is set.
OSPM driver then reads the 3 bytes, and clears the alarm status bit to indicate that the alarm registers
are now available for the next event.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_PRTCL: Write 0x02 to initiate the write quick protocol.
Data Returned:
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
12.9.2.2Read Quick
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_PRTCL: Write 0x03 to initiate the read quick protocol.
Data Returned:
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_PRTCL: Write 0x04 to initiate the send byte protocol, or 0x84 to initiate the send byte protocol
with PEC.
Data Returned:
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_PRTCL: Write 0x05 to initiate the receive byte protocol, or 0x85 to initiate the receive byte
protocol with PEC.
Data Returned:
SMB_DATA[0]: Data byte received.
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_DATA[0]: Data byte to be sent.
SMB_PRTCL: Write 0x06 to initiate the write byte protocol, or 0x86 to initiate the write byte protocol
with PEC.
Data Returned:
SMB_STS: Status code for transaction.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_PRTCL: Write 0x07 to initiate the read byte protocol, or 0x87 to initiate the read byte protocol
with PEC.
Data Returned:
SMB_DATA[0]: Data byte received.
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_DATA[0]: Low data byte to be sent.
SMB_DATA[1]: High data byte to be sent.
SMB_PRTCL: Write 0x08 to initiate the write word protocol, or 0x88 to initiate the write word protocol
with PEC.
Data Returned:
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_PRTCL: Write 0x09 to initiate the read word protocol, or 0x89 to initiate the read word protocol
with PEC.
Data Returned:
SMB_DATA[0]: Low data byte received.
SMB_DATA[1]: High data byte received.
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_DATA[0-31]: Data bytes to write (1-32).
SMB_BCNT: Number of data bytes (1-32) to be sent.
SMB_PRTCL: Write 0x0A to initiate the write block protocol, or 0x8A to initiate the write block
protocol with PEC.
Data Returned:
SMB_PRTCL: 0x00 to indicate command completion.
SMB_STS: Status code for transaction.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_PRTCL: Write 0x0B to initiate the read block protocol, or 0x8B to initiate the read block
protocol with PEC.
Data Returned:
SMB_BCNT: Number of data bytes (1-32) received.
SMB_DATA[0-31]: Data bytes received (1-32).
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
Data Returned:
SMB_DATA[0]: Low data byte received.
SMB_DATA[1]: High data byte received.
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Data Sent:
SMB_ADDR: Address of SMBus device.
SMB_CMD: Command byte to be sent.
SMB_DATA[0-31]: Data bytes to write (1-31).
SMB_BCNT: Number of data bytes (1-31) to be sent.
SMB_PRTCL: Write 0x0D to initiate the write block-read block process call protocol, or 0x8D to
initiate the write block-read block process call protocol with PEC.
Data Returned:
SMB_BCNT: Number of data bytes (1-31) received.
SMB_DATA[0-31]: Data bytes received (1-31).
SMB_STS: Status code for transaction.
SMB_PRTCL: 0x00 to indicate command completion.
Note: The following restrictions apply: The aggregate data length of the write and read blocks must not
exceed 32 bytes and each block (write and read) must contain at least 1 byte of data.
device. Further, the embedded controller can (and probably will) serve as a gatekeeper to prevent
accidental or malicious access to devices on the SMBus.
Some SMBus devices are defined by their address and a specification that describes the data and the
protocol used to access that data. For example, the Smart Battery System devices are defined by a
series of specifications including:
• Smart Battery Data specification
• Smart Battery Charger specification
• Smart Battery Selector specification
• Smart Battery System Manager specification
The embedded controller can also be used to emulate (in part or totally) any SMBus device.
CRS is a standard device configuration control method defined in Section 6.2.2, “_CRS (Current
Resource Settings).”
_HID Named object that provides the Embedded Controller’s Plug and Play identifier. This value is set
to PNP0C09. _HID is a standard device configuration control method defined in Section 6.1.5,
“_HID (Hardware ID).”
_GPE Named Object that evaluates to either an integer or a package. If _GPE evaluates to an integer,
the value is the bit assignment of the SCI interrupt within the GPEx_STS register of a GPE block
described in the FADT that the embedded controller will trigger.
If _GPE evaluates to a package, then that package contains two elements. The first is an object
reference to the GPE Block device that contains the GPE register that will be triggered by the
embedded controller. The second element is numeric (integer) that specifies the bit assignment
of the SCI interrupt within the GPEx_STS register of the GPE Block device referenced by the
first element in the package. This control method is specific to the embedded controller.
Device (SMB0)
{
Name(_HID, "ACPI0001") // EC-SMB-HC
Name(_UID, 0) // Unique device identifier
Name(_EC, 0x2030) // EC offset 0x20, query bit 0x30
:
}
Device (SMB1)
{
Name(_HID, "ACPI0001") // EC-SMB-HC
Name(_UID, 1) // Unique device identifier
Name(_EC, 0x8031) // EC offset 0x80, query bit 0x31
:
}
} // end of EC0.
This section describes the System Management Bus (SMBus) generic address space and the use of
this address space to access SMBus devices from AML.
Unlike other address spaces, SMBus operation regions are inherently non-linear, where each offset
within an SMBus address space represents a variable-sized (from 0 to 32 bytes) field. Given this
uniqueness, SMBus operation regions include restrictions on their field definitions and require the
use of an SMBus-specific data buffer for all transactions.
The SMBus interface presented in this section is intended for use with any hardware implementation
compatible with the SMBus specification. SMBus hardware is broadly classified as either non-EC–
based or EC-based. EC-based SMBus implementations comply with the standard register set defined
in Section 12, ACPI Embedded Controller Interface Specification.”
Non-EC SMBus implementations can employ any hardware interface and are typically used for their
cost savings when SMBus security is not required. Non–EC-based SMBus implementations require
the development of hardware specific drivers for each OS implementation. See Section 13.2.1,
“Declaring SMBus Host Controller Objects,” for more information.
Support of the SMBus generic address space by ACPI-compatible operating systems is optional. As
such, the Smart Battery System Implementer’s Forum (SBS-IF) has defined an SMBus interface
based on a standard set of control methods. This interface is documented in the SMBus Control
Method Interface Specification, available at “Links to ACPI-Related Documents” (http://uefi.org/
acpi) under the heading "Smart Battery System Components and SMBus Specification"..
Notice that bit 0 of the protocol value is always zero (even number hexadecimal values). In a manner
similar to the slave address, software that implements the SMBus interface is responsible for setting
this bit to indicate whether the transaction is a read (for example, Read Byte) or write (for example,
Write Byte) operation.
For example, software implanting this interface for EC-SMBus segments would set bit 0 for read
transactions. For the SMBByte protocol (0x06), this would result in the value 0x07 being placed into
the SMB_PRTCL register (or 0x87 if PEC is requested) for write transactions.
interface uses the same status codes defined for the EC-SMBus (see Section 12.9.1.1, “Status
Register, SMB_STS”).
EC-based SMBus 2.0-compatible host controllers should be defined similarly in the namespace as
follows:
Device (SMB0)
{
Name(_HID, "ACPI0005") // EC-based SMBus 2.0 compatible Host Controller
Name(_EC, 0x2030) // EC offset 0x20, query bit 0x30
:
}
Non–EC-based SMB-HCs should be modeled in a manner similar to the EC-based SMBus HC. An
example definition is given below. These devices use a vendor-specific hardware identifier (HID) to
specify the type of SMB-HC (do not use “ACPI0001” or “ACPI0005”). Using a vendor-specific
HID allows the correct software to be loaded to service this segment’s SMBus address space.
Device(SMB0)
{
Name(_HID, "<Vendor-Specific HID>") // Vendor-Specific HID
:
}
Regardless of the type of hardware, some OS software element (for example, the SMBus HC driver)
must register with OSPM to support all SMBus operation regions defined for the segment. This
software allows the generic SMBus interface defined in this section to be used on a specific
hardware implementation by translating between the conceptual (for example, SMBus address
space) and physical (for example, process of writing/reading registers) models. Because of this
linkage, SMBus operation regions must be defined immediately within the scope of the
corresponding SMBus device.
OperationRegion (
RegionName, // NameString
RegionSpace, // RegionSpaceKeyword
Offset, // TermArg=>Integer
Length // TermArg=>Integer
)
Where:
• RegionName specifies a name for this slave device (for example, “SBD0”).
• RegionSpace must be set to SMBus (operation region type value 0x04).
• Offset is a word-sized value specifying the slave address and initial command value offset for
the target device. The slave address is stored in the high byte and the command value offset is
stored in the low byte. For example, the value 0x4200 would be used for an SMBus device
residing at slave address 0x42 with an initial command value offset of zero (0).
• Length is set to the 0x100 (256), representing the maximum number of possible command
values, for regions with an initial command value offset of zero (0). The difference of these two
values is used for regions with non-zero offsets. For example, a region with an Offset value of
0x4210 would have a corresponding Length of 0xF0 (0x100 minus 0x10).
For example, the Smart Battery Subsystem (illustrated below) consists of the Smart Battery Charger
at slave address 0x09, the Smart Battery System Manager at slave address 0x0A, and one or more
batteries (multiplexed) at slave address 0x0B. (Notice that Figure 13-2 represents the logical
connection of a Smart Battery Subsystem. The actual physical connections of the Smart Battery(s)
and the Smart Battery Charger are made through the Smart Battery System Manager.) All devices
support the Read/Write Word protocol. Batteries also support the Read/Write Block protocol.
Smart Battery
System Manager
EC [0x0A]
'SMB0'
[0x09] [0x0B]
Smart Battery Smart Battery
Charger Device(s)
The following ASL code shows the use of the OperationRegion term to describe these SMBus
devices:
Device (SMB0)
{
Name(_HID, "ACPI0001") // EC-SMBus Host Controller
Name(_EC, 0x2030) // EC offset 0x20, query bit 0x30
Notice that these operation regions in this example are defined within the immediate context of the
‘owning’ EC-SMBus device. Each definition corresponds to a separate slave address (device), and
happens to use an initial command value offset of zero (0).
Where:
• RegionName specifies the operation region name previously defined for the device.
• AccessType must be set to BufferAcc. This indicates that access to field elements will be done
using a region-specific data buffer. For this access type, the field handler is not aware of the data
buffer’s contents which may be of any size. When a field of this type is used as the source
argument in an operation it simply evaluates to a buffer. When used as the destination, however,
the buffer is passed bi-directionally to allow data to be returned from write operations. The
modified buffer then becomes the execution result of that operation. This is slightly different
than the normal case in which the execution result is the same as the value written to the
destination. Note that the source is never changed, since it could be a read only object (see
Section 13.2.5, “Declaring an SMBus Data Buffer” and Section 19.2.5, “Opcode Terms”).
• LockRule indicates if access to this operation region requires acquisition of the Global Lock for
synchronization. This field should be set to Lock on system with firmware that may access the
SMBus, and NoLock otherwise.
• UpdateRule is not applicable to SMBus operation regions since each virtual register is accessed
in its entirety. This field is ignored for all SMBus field definitions.
SMBus operation regions require that all field elements be declared at command value granularity.
This means that each virtual register cannot be broken down to its individual bits within the field
definition.
Access to sub-portions of virtual registers can be done only outside of the field definition. This
limitation is imposed both to simplify the SMBus interface and to maintain consistency with the
physical model defined by the SMBus specification.
SMBus protocols are assigned to field elements using the AccessAs term within the field definition.
The syntax for this term (from Section 19.2.3, “ASL Root and SecondaryTerms”) is described
below.
AccessAs(
AccessType, //AccessTypeKeyword
AccessAttribute //Nothing | ByteConst | AccessAttribKeyword
)
Where:
• AccessType must be set to BufferAcc.
• AccessAttribute indicates the SMBus protocol to assign to command values that follow this
term. See Section 13.1.2, “SMBus Protocols,” for a listing of the SMBus protocol types and
values.
An AccessAs term must appear as the first entry in a field definition to set the initial SMBus protocol
for the field elements that follow. A maximum of one SMBus protocol may be defined for each field
element. Devices supporting multiple protocols for a single command value can be modeled by
specifying multiple field elements with the same offset (command value), where each field element
is preceded by an AccessAs term specifying an alternate protocol.
For example, the register at command value 0x08 for a Smart Battery device (illustrated below)
represents a word value specifying the battery temperature (in degrees Kelvin), while the register at
command value 0x20 represents a variable-length (0 to 32 bytes) character string specifying the
name of the company that manufactured the battery.
:
Temperature() 0x08 (Word) Byte 0 Byte 1
:
ManufacturerName() 0x20 (Block) Byte 0 ... Byte 31
:
Figure 13-76 Smart Battery Device Virtual Registers
The following ASL code shows the use of the OperationRegion, Field, AccessAs, and Offset terms
to represent these Smart Battery device virtual registers:
OperationRegion(SBD0, SMBus, 0x0B00, 0x0100)
Field(SBD0, BufferAcc, NoLock, Preserve)
{
AccessAs(BufferAcc, SMBWord) // Use the SMBWord protocol for the following…
MFGA, 8, // ManufacturerAccess() [command value 0x00]
RCAP, 8, // RemainingCapacityAlarm() [command value 0x01]
Offset(0x08) // Skip to command value 0x08…
BTMP, 8, // Temperature() [command value 0x08]
Offset(0x20) // Skip to command value 0x20…
AccessAs(BufferAcc, SMBBlock) // Use the SMBBlock protocol for the following…
MFGN, 8, // ManufacturerName() [command value 0x20]
DEVN, 8 // DeviceName() [command value 0x21]
}
Notice that command values are equivalent to the field element’s byte offset (for example,
MFGA=0, RCAP=1, BTMP=8). The AccessAs term indicates which SMBus protocol to use for
each command value.
Where:
• Status (byte 0) indicates the status code of a given SMBus transaction. See Section 13.1.3,
“SMBus Status Code,” for more information.
• Length (byte 1) specifies the number of bytes of valid data that exists in the data buffer. Use of
this field is only defined for the Read/Write Block protocol, where valid Length values are 0
through 32. For other protocols—where the data length is implied by the protocol—this field is
reserved.
• Data (bytes 33-2) represents a 32-byte buffer, and is the location where actual data is stored.
For example, the following ASL shows the use of the SMBus data buffer for performing transactions
to a Smart Battery device. This code is based on the example ASL presented in Section 13.2.4,
“Declaring SMBus Fields,” which lists the operation region and field definitions for the Smart
Battery device.
Notice the use of the CreateField primitives to access the data buffer’s sub-elements (Status,
Length, and Data), where Data (bytes 33-2) is ‘typecast’ as both word (OB3) and block (OB4) data.
The example above demonstrates the use of the Store() operator to invoke a Read Block transaction
to obtain the name of the battery manufacturer. Evaluation of the source operand (MFGN) results in
a 34-byte buffer that gets copied by Store() to the destination buffer (BUFF).
Capturing the results of a write operation, for example to check the status code, requires an
additional Store() operator, as shown below.
Store(Store(BUFF, MFGN), BUFF) // Invoke Write Block transaction
If(LEqual(OB1, 0x00)) {…} // Transaction successful?
Note that the outer Store() copies the results of the Write Block transaction back into BUFF. This is
the nature of BufferAcc’s bi-directionality described in Section 13.2.4, “Declaring SMBus Fields” It
should be noted that storing (or parsing) the result of an SMBus Write transaction is not required
although useful for ascertaining the outcome of a transaction.
SMBus Process Call protocols require similar semantics due to the fact that only destination
operands are passed bi-directionally. These transactions require the use of the double-Store()
semantics to properly capture the return results.
by this protocol and thus only a single element (at offset 0) can be specified in the field definition.
This protocol transfers no data.
The following ASL code illustrates how a device supporting the Read/Write Quick protocol should
be accessed:
In this example, a single field element (FLD0) at offset 0 is defined to represent the protocol’s read/
write bit. Access to FLD0 will cause an SMBus transaction to occur to the device. Reading the field
results in a Read Quick, and writing to the field results in a Write Quick. In either case data is not
transferred—access to the register is simply used as a mechanism to invoke the transaction.
In this example, a single field element (FLD0) at offset 0 is defined to represent the protocol’s data
byte. Access to FLD0 will cause an SMBus transaction to occur to the device. Reading the field
results in a Receive Byte, and writing to the field results in a Send Byte.
In this example, three field elements (FLD0, FLD1, and FLD2) are defined to represent the virtual
registers for command values 0, 1, and 2. Access to any of the field elements will cause an SMBus
transaction to occur to the device. Reading FLD1 results in a Read Byte with a command value of 1,
and writing to FLD2 results in a Write Byte with command value 2.
// Read two bytes of data from the device using command value 1
Store(FLD1, BUFF) // Invoke a Read Word transaction
If(LEqual(STAT, 0x00)) // Successful?
{
// DATA = Word read from FLD1…
}
// Write the word ‘0x5416’ to the device using command value 2
Store(0x5416, DATA) // Save 0x5416 into the data buffer
Store(BUFF, FLD2) // Invoke a Write Word transaction
In this example, three field elements (FLD0, FLD1, and FLD2) are defined to represent the virtual
registers for command values 0, 1, and 2. Access to any of the field elements will cause an SMBus
transaction to occur to the device. Reading FLD1 results in a Read Word with a command value of 1,
and writing to FLD2 results in a Write Word with command value 2.
Notice that although accessing each field element transmits a word (16 bits) of data, the fields are
listed as 8 bits each. The actual data size is determined by the protocol. Every field element is
declared with a length of 8 bits so that command values and byte offsets are equivalent.
In this example, three field elements (FLD0, FLD1, and FLD2) are defined to represent the virtual
registers for command values 0, 1, and 2. Access to any of the field elements will cause an SMBus
transaction to occur to the device. Reading FLD1 results in a Read Block with a command value of
1, and writing to FLD2 results in a Write Block with command value 2.
// Process Call with input value ‘0x5416’ to the device using command value 1
Store(0x5416, DATA) // Save 0x5416 into the data buffer
Store(Store(BUFF, FLD1), BUFF) // Invoke a Process Call transaction
If(LEqual(STAT, 0x00)) // Successful?
{
// DATA = Word returned from FLD1…
}
In this example, three field elements (FLD0, FLD1, and FLD2) are defined to represent the virtual
registers for command values 0, 1, and 2. Access to any of the field elements will cause an SMBus
transaction to occur to the device. Reading or writing FLD1 results in a Process Call with a
command value of 1. Notice that unlike other protocols, Process Call involves both a write and read
operation in a single atomic transaction. This means that the Data element of the SMBus data buffer
is set with an input value before the transaction is invoked, and holds the output value following the
successful completion of the transaction.
// Process Call with input value "ACPI" to the device using command value 1
The platform communication channel is a generic mechanism for OSPM to communicate with an
entity in the platform (e.g. a platform controller, or a Baseboard Management Controller (BMC)).
Neither the entity that OSPM communicates with, nor any aspects of the information passed back
and forth is defined in this section. That information is defined by the actual interface that that
employs PCC register address space as the communication channel.
PCC defines a new address space type (PCC Space, 0xA), which is implemented as one or more
independent communications channels, or subspaces.
This chapter is arranged as follows:
• Section 14.1 and Section 14.2 provide reference information covering the PCCT table, and
expected data structures used with PCC.
• Section 14.4, Section 14.5, and Section 14.6 describe how communications takes place between
the OSPM and the platform over PCC.
The interface is described in the following ACPI system description table.
Note: Inaccurate values for the Maximum Periodic Access Rate and Minimum Request Turnaround
Time fields can result in punitive side effects for features that rely on the PCC interface. The
Platform should report accurate values that allow for maximum channel efficiency while
maintaining maximum channel stability.
Note: The Maximum Periodic Access Rate is used by OSPM to determine the maximum rate for periodic
evaluation of commands. Infrequent, event driven commands are not restricted by the maximum
periodic access rate.
Note: Inaccurate values for the Maximum Periodic Access Rate and Minimum Request Turnaround
Time fields can result in punitive side effects for features that rely on the PCC interface. The
Platform should report accurate values that allow for maximum channel efficiency while
maintaining maximum channel stability.
Note: The Maximum Periodic Access Rate is used by OSPM to determine the maximum rate for periodic
evaluation of commands. Infrequent, event driven commands are not restricted by the maximum
periodic access rate.
Note: Type 1 subspaces do not support a level triggered platform interrupt as no method is provided to
clear the interrupt. Where level interrupts are required, type 2 or type 3 subspaces should be used.
Note: Inaccurate values for the Maximum Periodic Access Rate and Minimum Request Turnaround
Time fields can result in punitive side effects for features that rely on the PCC interface. The
Platform should report accurate values that allow for maximum channel efficiency while
maintaining maximum channel stability.
Note: The Maximum Periodic Access Rate is used by OSPM to determine the maximum rate for periodic
evaluation of commands. Infrequent, event driven commands are not restricted by the maximum
periodic access rate
Table 14-357 PCC Subspace Structure type 3 and type 4, master and slave respectively
Field Byte Byte Off-Description
Length set
Type 1 0 3 – Master subspace
4 - Slave subspace
Length 1 1 170
Platform Interrupt 4 2 GSIV of an interrupt triggered by the platform:
• For master subspaces (type 3) this is raised when a
command is completed on this subspace.
• For slave subspaces (type 4) this is raised when platform
sends a notification.
For a master subspace this field is ignored if the
platform interrupt flag (table 14-137) of the PCCT is
set to zero. If a slave subspace is present in the
PCCT, then the platform interrupt flag (table 14-137)
must be set to 1.
Note that if interrupts are edge triggered, then each
subspace must have its own unique interrupt. If
interrupt are level, a GSIV may be shared by multiple
subspaces, but each one must have unique Platform
interrupt Ack preserve and Ack Set masks (see
below)
Platform Interrupt 1 6 Bit 7:2Reserved
Flags Bit 1:Platform interrupt mode
• Set to 1 if interrupt is Edge triggered
• Set to 0 if interrupt Level triggered
• Bit 0: Platform interrupt polarity
• Set to 1 if interrupt is Active low
• Set to 0 if interrupt is Active high
Reserved 1 7 Reserved must be zero
Base Address 8 16 Base Address of the shared memory range, described in
Table 14-361.
Length 4 24 Length of the memory range. Must be >= 16.
Doorbell Register 12 28 Contains the processor relative address, represented in Generic
Address Structure (GAS) format, of the PCC doorbell.
Note: Only the System I/O, System Memory, and Functional
Fixed Hardware spaces are valid values for
Address_Space_ID
For slave subspaces this field is optional, if not present the field
should just contain zeros.
Doorbell Preserve 8 40 Contains a mask of bits to preserve when writing the
doorbell register.
Doorbell Write 8 48 Contains a mask of bits to set when writing the doorbell register.
Nominal Latency 4 56 Expected latency to process a command, in microseconds.
This field is only relevant for master subspaces.
Maximum Periodic 4 60 The maximum number of periodic requests that the subspace
Access Rate subspace can support, reported in commands per minute. 0
indicates no limitation. This field is only relevant for master
subspaces.
If the Doorbell bit is not set in the PCC global flags, this bit must be
cleared.
Note: OSPM (either in an Interrupt handler or via polling) is required to detect that the Command
Complete bit has been set and to clear it before issuing another command. While waiting for this
bit to be set, OSPM must not modify any portion of the shared memory region.
Note: The Platform Interrupt bit is required to be cleared in OSPM’s Interrupt handler so that a new event
can be detected.
The 32-bit command field is used to select one of the defined commands for the platform to perform.
On master subspaces the OSPM is responsible for populating this field, alongside the command’s
payload, length and flags. For slave subspaces, the OSPM is responsible for interpreting the
command and payload fields to ascertain the nature of the notification that was sent. The format for
the flags field is shown in Table 14-362
Figure 14-77 illustrates the steps that the OPSM takes to send message to the platform over a PCC
subspace.
1. Firstly the OSPM checks that there is no command pending completion on the subspace,
indicating that the subspace is free for use. This is done by checking that the command complete
bit is set in the status field of the subspace. If the bit is set the subspace is free for use, and the
shared memory associated with the subspace is exclusively owned by the OSPM.
2. The OSPM places a command into the shared memory of the subspace to update the flags,
length, command and payload fields (see Table 14-358). If the platform indicates support for
platform interrupts in the PCCT (see Table 14-352), then the OSPM can request that the
platform generate an interrupt once it has completed processing the command. This is requested
by setting the Notify on completion bit in the flags (see Table 14-352 and Table 14-362).
3. The OSPM then clears the command complete bit. This step transfers ownership of the shared
memory to the platform.
4. OSPM rings the doorbell by performing a read/modify/write cycle on the specified register,
preserving and setting the bits specified in the preserve and write mask of the PCC subspace
structure.
The management of the command complete bit differs slightly between subspaces of types 0-2 and
those of type 3. For the former, the command complete bit is in a status register which follows a
specific format described in Section 14.2.2. Type 3 subspaces still use a single command complete
bit, however allow the platform to dictate the location and format of the register holding it.
Therefore, PCCT structures describing type 3 subspaces use masks and an address to describe how
to set the bit. Equally, masks are used for describing how to clear the bit. For these subspaces to
check if the command complete bit is set, the OSPM combines the content of command complete
check register, through a bitwise AND, with the command complete check mask. A non-zero value
indicates the command complete bit is set. Clearing the command complete bit is done through the
command complete update register, which can differ in address from the command complete check
register. In this case the content of the update register is combined through a bitwise AND with the
preserve mask, the result is then combined through a bitwise inclusive OR with the set mask, and
that result is written back to the update register.
For subspaces of type 1-3, the command complete bit must be initialized to one, command complete
set, prior to OSPM sending a command. On type 0 channels, whether the platform sets command
complete when the subspace is initialized is implementation defined. On these subspaces, the OSPM
does not have to check for command complete to be set before sending the first command.
Figure 14-77 illustrates the steps the platform takes when it receives the command:
5. For robustness the platform might optionally check that command complete bit is clear
6. Processes the command
7. Sets the command complete bit
8. Triggers the platform interrupt indicated by the GSIV of the subspace’s PCCT entry (Table 14-
357). This will only occur if an interrupt has been requested in step 2, and interrupts are
supported by the platform. A platform can indicate support for interrupts through the Platform
interrupt flag (Table 14-352).
OSPM can detect command completion either by polling on the command complete bit or via a
platform interrupts. When the OSPM detects that the command has completed it proceeds with the
following steps:
9. If necessary clears platform interrupt. This step applies if:
• Platform interrupts are supported by the platform on command completion (Table 14-352)
• The interrupt was requested by the OSPM through the Notify on completion flag (see Table 14-
358 and Table 14-362).
• The interrupt is described as being a level triggered through the Platform Interrupt flags, and
Platform Interrupt Ack register address, and associated masks are provided by the subspace
PCCT entry (see table entries for types 2 and 3).
10. If detecting command completion via interrupt, optionally checks command is complete
11. Processes the command response
To ensure correct operation, it is necessary to ensure that all memory updates performed by the
OSPM in step 2 are observable by the platform before step 3 completes. Equally all memory updates
performed by the platform in step 6 must be observable by the OSPM before step 7 completes.
Note: For subspace types 0 to 2, all accesses to the Status Field must be made using interlocked
operations, by both entities sharing the subspace. Types 3-4 avoid this requirement. This
requirement will be removed for subspace types 0 to 2 as part of deprecation of platform async
notifications in a future spec revision – see Section 14.5.
Note: All accesses to the Status Field must be made using interlocked operations, by both entities
sharing the subspace. This requirement will be removed for subspace types 0 to 2 as part of
deprecation of platform async notifications in a future spec revision.
Like type 3 master subspaces, type 4 slave subspaces include a command complete bit. Slave
subspaces are owned by the OSPM by default, and therefore it must set the set the command
complete bit when it is ready to receive notifications from the platform.
The flow of communications for a notification is illustrated in Figure 14-78. As can be seen the
communication flow is very similar to that of a master subspace, shown in Figure 14-77, except that
the roles of the platform and the OSPM are reversed. The steps are as follows:
1. Firstly, the platform checks that there no command pending completion on the subspace,
indicating that the subspace is free for use. This is done by checking that the command complete
bit is set in the status field of the subspace. If the bit is set the subspace is free for use, and the
shared memory associated with the subspace is exclusively owned by the platform.
2. The platform places a notification command into the shared memory in the subspace, updating
the flags, length, command and payload fields (see Table 14-361). The platform can request the
OSPM rings the doorbell once it has completed processing the notification command by setting
the Generate Signal bit in the flags (see Table 14-362).
3. The platform then clears the command complete bit. This transfers ownership of the shared
memory to the OSPM.
4. The platform raises the platform interrupt indicated by the GSIV of the slave subspace.
When the OSPM receives the interrupt it executes the following steps:
5. Clears the platform interrupt. This is required if the interrupt is described as being a level
triggered through the Platform Interrupt flags, and Platform Interrupt Ack register address, and
associated masks are provided by the subspace PCCT entry (see Table 14-357).
6. Optionally checks the command complete bit is clear.
7. Processes the notification command.
8. Sets the command complete bit using the command complete update register and masks.
9. Rings the doorbell. This is required if the doorbell ring was requested by the platform in step 2
above. This also requires that the PCCT entry for the subspace has a non-zero doorbell register
address.
The platform can check whether a notification has been processed by the OSPM either by polling the
command complete bit, or where supported through receiving a doorbell interrupt from the OSPM.
When the platform detects that the notification has been processed by the OSPM, the platform takes
the following steps:
10. If polling check command complete is set. If using a doorbell this step is optional.
11. Processes the command response
The platform must ensure that any writes in step 2, are observable by the OSPM application
processors before writes in step 3. Similarly, the OSPM must ensure that any writes in step 7 are
observable by the platform before step 8 completes.
Individual protocols that use PCC define the meaning of notifications.
Note that the PCC address space may not be used in any resource template or register unless the
register/resource field explicitly allows the use of the PCC address space.
This section explains how an ACPI-compatible system conveys its memory resources/type
mappings to OSPM. There are three ways for the system to convey memory resources /mappings to
OSPM. The first is an INT 15 BIOS interface that is used in IA-PC–based systems to convey the
system’s initial memory map. UEFI enabled systems use the UEFI GetMemoryMap() boot services
function to convey memory resources to the OS loader. These resources must then be conveyed by
the OS loader to OSPM. See the UEFI Specification for more information on UEFI services.
Lastly, if memory resources may be added or removed dynamically, memory devices are defined in
the ACPI Namespace conveying the resource information described by the memory device (see
Section 9.13, “Memory Devices”).
ACPI defines the following address range types.
Platform runtime firmware can use the AddressRangeReserved address range type to block out
various addresses as not suitable for use by a programmable device. Some of the reasons a platform
runtime firmware would do this are:
• The address range contains system ROM.
• The address range contains RAM in use by the ROM.
• The address range is in use by a memory-mapped system device.
• The address range is, for whatever reason, unsuitable for a standard device to use as a device
memory space.
• The address range is within an NVRAM device where reads and writes to memory locations are
no longer successful, that is, the device was worn out.
Note: Platform boot firmware must ensure that contents of memory that is reported as
AddressRangePersistentMemory is retained after a system reset or a power cycle event.
15 E801 functions must return the top of memory below the AddressRangeACPI and
AddressRangeNVS memory ranges.
The memory map conveyed by this interface is not required to reflect any changes in available
physical memory that have occurred after the BIOS has initially passed control to the operating
system. For example, if memory is added dynamically, this interface is not required to reflect the
new system memory configuration.
The BaseAddrLow and BaseAddrHigh together are the 64-bit base address of this range. The base
address is the physical address of the start of the range being specified.
The LengthLow and LengthHigh together are the 64-bit length of this range. The length is the
physical contiguous length in bytes of a range being specified.
The Type field describes the usage of the described address range as defined in Table 15-363.
Note: Bit [1] and [2] were deprecated as of ACPI 6.1. Bit [3] is used only on PC-AT BIOS systems to
pinpoint the error log in memory. On UEFI-based systems, either UEFI Hardware Error Record
HwErrRec#### runtime UEFI variable interface or the Error Record Serialization Actions 0xD, 0xE
and 0xF for the APEI ERST interface must be implemented for the error logs.
• All of lower memory is reported as normal memory. The OS must handle standard RAM
locations that are reserved for specific uses, such as the interrupt vector table (0:0) and the
platform boot firmware data area (40:0).
Table 15-368 UEFI Memory Types and mapping to ACPI address range types
Type Mnemonic ACPI Address Range Type
0 EfiReservedMemoryType AddressRangeReserved
1 EfiLoaderCode AddressRangeMemory
2 EfiLoaderData AddressRangeMemory
3 EfiBootServicesCode AddressRangeMemory
4 EfiBootServicesData AddressRangeMemory
5 EfiRuntimeServiceCode AddressRangeReserved
6 EfiRuntimeServicesData AddressRangeReserved
7 EfiConventionalMemory AddressRangeMemory
8 EfiUnusableMemory AddressRangeReserved
9 EfiACPIReclaimMemory AddressRangeACPI
10 EfiACPIMemoryNVS AddressRangeNVS
11 EfiMemoryMappedIO AddressRangeReserved
12 EfiMemoryMappedIOPortSpace AddressRangeReserved
13 EfiPalCode AddressRangeReserved
14 EfiPersistentMemory AddressRangePersistentMemory
15 to Reserved. AddressRangeReserved
0x6FFFFFFF
Note: Table 15-368 applies to system firmware that supports legacy BIOS mode plus UEFI mode, and
OS loaders.
639 KiB available for the user and 1 KiB for an extended BIOS data area. A 4-MiB Linear Frame
Buffer (LFB) is based at 12 MiB. The memory hole created by the chip set is from 8 MiB to 16 MiB.
Memory-mapped APIC devices are in the system. The I/O Unit is at FEC00000 and the Local Unit is
at FEE00000. The system BIOS is remapped to 1 GB–64 KiB.
The 639-KiB endpoint of the first memory range is also the base memory size reported in the BIOS
data segment at 40:13. The following table shows the memory map of a typical system.
E820Present = TRUE;
.
.
.
Add address range Descriptor.BaseAddress through
Descriptor.BaseAddress + Descriptor.Length
as type Descriptor.Type
.
.
.
if (!E820Present) {
.
.
.
call INT-15 88 and/or INT-15 E801 to obtain old style
memory information
.
.
.
}
.
ACPI defines a mechanism to transition the system between the working state (G0) and a sleeping
state (G1) or the soft-off (G2) state. During transitions between the working and sleeping states, the
context of the user’s operating environment is maintained. ACPI defines the quality of the G1
sleeping state by defining the system attributes of four types of ACPI sleeping states (S1, S2, S3, and
S4). Each sleeping state is defined to allow implementations that can tradeoff cost, power, and wake
latencies. Additionally, ACPI defines the sleeping states such that an ACPI platform can support
multiple sleeping states, allowing the platform to transition into a particular sleeping state for a
predefined period of time and then transition to a lower power/higher wake latency sleeping state
(transitioning through the G0 state) 1.
ACPI defines a programming model that provides a mechanism for OSPM to initiate the entry into a
sleeping or soft-off state (S1-S5); this consists of a 3-bit field SLP_TYPx2 that indicates the type of
sleep state to enter, and a single control bit SLP_EN to start the sleeping process. On HW-reduced
ACPI systems, the register described by the SLEEP_CONTROL_REG field in the FADT is used
instead of the fixed SLP_TYPx and SLP_EN register bit fields.
Note: Systems containing processors without a hardware mechanism to place the processor in a low-
power state may additionally require the execution of appropriate native instructions to place the
processor in a low-power state after OSPM sets the SLP_EN bit. The hardware may implement a
number of low-power sleeping states and then associate these states with the defined ACPI
sleeping states (through the SLP_TYPx fields). The ACPI system firmware creates a sleeping
object associated with each supported sleeping state (unsupported sleeping states are identified
by the lack of the sleeping object). Each sleeping object contains two constant 3-bit values that
OSPM will program into the SLP_TYPa and SLP_TYPb fields (in fixed register space), or, on HW-
reduced ACPI platforms, a single 3-bit value that OSPM will write to the register specified by the
FADT's SLEEP_CONTROL_REG field.
On systems that are not HW-reduced ACPI platforms, an alternate mechanism for entering and
exiting the S4 state is defined. This mechanism passes control to the platform runtime firmware to
save and restore platform context. Context ownership is similar in definition to the S3 state, but
hardware saves and restores the context of memory to non-volatile storage (such as a disk drive), and
OSPM treats this as an S4 state with implied latency and power constraints. This alternate
mechanism of entering the S4 state is referred to as the S4BIOS transition.
Prior to entering a sleeping state (S1-S4), OSPM will execute OEM-specific AML/ASL code
contained in the _PTS (Prepare To Sleep) control method. One use of the _PTS control method is
1. OSPM uses the RTC wakeup feature or the Time and Alarm Namespace device to program in the time tran-
sition delay. Prior to sleeping, OSPM will program the alarm to the closest (in time) wakeup event: either a transition
to a lower power sleeping state, or a calendar event (to run some application).
2. Notice that there can be two fixed PM1x_CNT registers, each pointing to a different system I/O space
region. Normally a register grouping only allows a bit or bit field to reside in a single register group instance (a or b);
however, each platform can have two instances of the SLP_TYP (one for each grouping register: a and b). The \_Sx
control method gives a package with two values: the first is the SLP_TYPa value and the second is the SLP_TYPb
value.
that it can indicate to the embedded controller what sleeping state the system will enter. The
embedded controller can then respond by executing the proper power-plane sequencing upon sleep
state entry.
The _WAK (Wake) control method is then executed. This control method again contains OEM-
specific AML/ASL code. One use of the _WAK control method requests OSPM to check the
platform for any devices that might have been added or removed from the system while the system
was asleep. For example, a PC Card controller might have had a PC Card added or removed, and
because the power to this device was off in the sleeping state, the status change event was not
generated.
This section discusses the system initialization sequence of an ACPI-enabled platform. This includes
the boot sequence, different wake scenarios, and an example to illustrate how to use the system
address map reporting interfaces. This sequence is part of the ACPI event programming model.
Note: HW-reduced ACPI platforms do not implement the Legacy Mode nor the S4BIOS state described
below.
For detailed information on the power management control methods described above, see Section 7,
“Power and Performance Management.”
S1
Sleeping
Wake SLP_TYPx=S1
Event and
SLP_EN
S2
SLP_TYPx=S2 Sleeping
and
ACPI
SLP_EN G1
Boot
(SCI_EN=1)
4. If not using the S4BIOS mechanism, OSPM gets the SLP_TYPx value from the associated
sleeping object (\_S1, \_S2, \_S3, \_S4 or \_S5).
5. Program the SLP_TYPx fields with the values contained in the selected sleeping object.
Note: Compatibility Note: The _GTS method is deprecated in ACPI 5.0A. For earlier versions, execute
the _GTS control method, passing an argument that indicates the sleeping state to be entered (1,
2, 3, or 4 representing S1, S2, S3, and S4).
Note: Compatibility Note: The _BFS method is deprecated in ACPI 5.0A. In earlier versions, on waking,
the _BFS control method is executed. OSPM then executes the _WAK control method. This
control method executes OEM-specific ASL/AML code that can search for any devices that have
been added or removed during the sleeping state.
Register, the hardware can implement an S1 state by asserting the STPCLK# signal to the processor,
causing it to enter the stop grant state.
In this case, the system clocks (PCI and CPU) are still running. Any enabled wake event causes the
hardware to de-assert the STPCLK# signal to the processor whereby OSPM must first invalidate the
CPU caches and then transition back into the working state.
• Initialize the cache controller to its initial boot size and configuration.
• Enable the memory controller to accept memory accesses.
• Jump to the waking vector.
5. OSPM executes the _PTS control method, passing an argument that indicates the desired
sleeping state (1, 2, 3, or 4 representing S1, S2, S3, and S4).
6. OSPM saves any other processor’s context (other than the local processor) to memory.
7. OSPM writes the waking vector into the FACS table in memory.
Note: Compatibility Note: The _GTS method is deprecated in ACPI 5.0A. For earlier versions, OSPM
executes the _GTS control method, passing an argument that indicates the sleeping state to be
entered (1, 2, 3, or 4 representing S1, S2, S3, and S4).
8. If not a HW-reduced ACPI platform, OSPM clears the WAK_STS in the PM1a_STS and
PM1b_STS registers. On HW-reduced ACPI platforms, OSPM clears the WAK_STS bit in the
Sleep Status Register.
9. OSPM saves the local processor’s context to memory.
10. OSPM flushes caches (only if entering S1, S2 or S3).
11. OSPM sets GPE enable registers or enables wake-capable interrupts to ensure that all
appropriate wake signals are armed
12. If entering an S4 state using the S4BIOS mechanism, OSPM writes the S4BIOS_REQ value
(from the FADT) to the SMI_CMD port. This passes control to the platform runtime firmware,
which then transitions the platform into the S4BIOS state.
13. If not entering an S4BIOS state, and not a HW-reduced ACPI platform, then OSPM writes
SLP_TYPa (from the associated sleeping object) with the SLP_ENa bit set to the PM1a_CNT
register.
14. OSPM writes SLP_TYPb with the SLP_EN bit set to the PM1b_CNT register, or writes the
HW-reduced ACPI Sleep Type value and the SLP_EN bit to the Sleep Control Register.
15. On systems containing processors without a hardware mechanism to place the processor in a
low-power state, OSPM executes appropriate native instructions to place the processor in a low-
power state.
16. OSPM loops on the WAK_STS bit, either in both the PM1a_CNT and PM1b_CNT registers, or
in the SLEEP_STATUS_REG, in the case of HW-reduced ACPI platforms
17. The system enters the specified sleeping state.
Note: This is accomplished after step 14 or 15 above.
3. If not a HW-reduced ACPI platform, OSPM writes SLP_TYPa (from the \_S5 object) with the
SLP_ENa bit set to the PM1a_CNT register.
4. OSPM writes SLP_TYPb (from the \_S5 object) with the SLP_ENb bit set to the PM1b_CNT
register, or writes the HW-reduced ACPI Sleep Type value for S5 and the SLP_EN bit to the
Sleep Control Register.
16.3 Initialization
This section covers the initialization sequences for an ACPI platform. After a reset or wake from an
S2, S3, or S4 sleeping state (as defined by the ACPI sleeping state definitions), the CPU will start
execution from its boot vector. At this point, the initialization software has many options, depending
on what the hardware platform supports. This section describes at a high level what should be done
for these different options. Figure 16-80 illustrates the flow of the boot-up software.
Boot Vector
SLP_TYP=S2
Yes
?
No
Initialize CPU
Init Memory Controller
Enable Memory
Configure Caches
Enable Caches Initialize CPU
Initialize Chipset Enable Memory
Configure Caches
SLP_TYP=S3
Yes
?
No
SLP_TYP=
Restore memory
S4BIOS Yes
Image
?
No
POST Jump To
Waking Vector
Initialize Memory
Image
* System
* Reserved
* ACPI NVS
* ACPI Reclaim
* ACPI Tables
* MPS Tables
* ...
Boot OS Loader
The processor will start executing at its power-on reset vector when waking from an S2, S3, or S4
sleeping state, during a power-on sequence, or as a result of a hard or soft reset.
When executing from the power-on reset vector as a result of a power-on sequence, a hard or soft
reset, or waking from an S4 sleep state, the platform firmware performs complete hardware
initialization; placing the system in a boot configuration. The firmware then passes control to the
operating system boot loader.
When executing from the power-on reset vector as a result of waking from an S2 or S3 sleep state,
the platform firmware performs only the hardware initialization required to restore the system to
either the state the platform was in prior to the initial operating system boot, or to the pre-sleep
configuration state. In multiprocessor systems, non-boot processors should be placed in the same
state as prior to the initial operating system boot. The platform firmware then passes control back to
OSPM system by jumping to either the Firmware_Waking_Vector or the
X_Firmware_Waking_Vector in the FACS (see Table 5-38 for more information). The contents of
operating system memory contents may not be changed during the S2 or S3 sleep state.
First, the platform runtime firmware determines whether this is a wake from S2 or S3 by examining
the SLP_TYP register value, which is preserved between sleeping sessions. If this is an S2 or S3
wake, then the platform runtime firmware restores minimum context of the system before jumping
to the waking vector. This includes:
• CPU configuration. Platform runtime firmware restores the pre-sleep configuration or initial
boot configuration of each CPU (MSR, MTRR, firmware update, SMBase, and so on).
Interrupts must be disabled (for IA-32 processors, disabled by CLI instruction).
• Memory controller configuration. If the configuration is lost during the sleeping state, the
platform runtime firmware initializes the memory controller to its pre-sleep configuration or
initial boot configuration.
• Cache memory configuration. If the configuration is lost during the sleeping state, the
platform runtime firmware initializes the cache controller to its pre-sleep configuration or initial
boot configuration.
• Functional device configuration. The platform runtime firmware doesn’t need to configure/
restore context of functional devices such as a network interface (even if it is physically included
in chipset) or interrupt controller. OSPM is responsible for restoring all context of these devices.
The only requirement for the hardware and platform runtime firmware is to ensure that
interrupts are not asserted by devices when the control is passed to OS.
• ACPI registers. SCI_EN bit must be set on non-HW-reduced ACPI platforms, and all event
status/enable bits (PM1x_STS, PM1x_EN, GPEx_STS and GPEx_EN) must not be changed by
platform runtime firmware.
Note: The platform runtime firmware may reconfigure the CPU, memory controller and cache memory
controller to either the pre-sleeping configuration or the initial boot configuration. OSPM must
accommodate both configurations.
When waking from an S4BIOS sleeping state, the platform boot firmware initializes a minimum
number of devices such as CPU, memory, cache, chipset and boot devices. After initializing these
devices, the platform boot firmware restores memory context from non-volatile memory such as
hard disk, and jumps to waking vector.
As mentioned previously, waking from an S4 state is treated the same as a cold boot: the platform
boot firmware runs POST and then initializes memory to contain the ACPI system description
tables. After it has finished this, it can call OSPM loader, and control is passed to OSPM.
When waking from S4 (either S4OS or S4BIOS), the platform boot firmware may optionally set
SCI_EN bit before passing control to OSPM. In this case, interrupts must be disabled (for IA-32
processors, disabled CLI instruction) until the control is passed to OSPM and the chipset must be
configured in ACPI mode.
Note: Before SCI is enabled, no SCI interrupt can occur. Nor can any SCI interrupt occur immediately
after ACPI is on. The SCI interrupt can only be signaled after OSPM has enabled one of the GPE/
PM1 enable bits.
When the platform is waking from an S1, S2 or S3 state, and from S4 and S5 on HW-reduced ACPI
platforms, OSPM assumes the hardware is already in the ACPI mode and will not issue an
ACPI_ENABLE command to the SMI_CMD port
S4 state, OSPM will restore this memory area and call the _WAK control method to enable the
platform boot firmware to reclaim its memory image.
Note: The memory information returned from the system address map reporting interfaces should be the
same before and after an S4 sleep.
When the system is first booting, OSPM will invoke E820 interfaces on IA-PC-based legacy
systems or the GetMemoryMap() interface on UEFI-enabled systems to obtain a system memory
map (see Section 15, “System Address Map Interfaces,” for more information). As an example, the
following memory map represents a typical IA-PC-based legacy platform’s physical memory map.
4 GB
Boot ROM
Boot Base
No Memory
Top of Memory1
Above 8 MB
RAM
8 MB
Contiguous
RAM
1 MB
Compatibility
Holes
640 KB
Compatibility
Memory
0
The names and attributes of the different memory regions are listed below:
• 0–640 KB. Compatibility Memory. Application executable memory for an 8086 system.
• 640 KB–1 MB. Compatibility Holes. Holes within memory space that allow accesses to be
directed to the PC-compatible frame buffer (A0000h-BFFFFh), to adapter ROM space (C0000h-
DFFFFh), and to system platform firmware space (E0000h-FFFFFh).
• 1 MB–8 MB. Contiguous RAM. An area of contiguous physical memory addresses. Operating
systems may require this memory to be contiguous in order for its loader to load the OS properly
on boot up. (No memory-mapped I/O devices should be mapped into this area.)
• 8 MB–Top of Memory1. This area contains memory to the “top of memory1” boundary. In this
area, memory-mapped I/O blocks are possible.
• Boot Base–4 GB. This area contains the bootstrap ROM.
The platform boot firmware should decide where the different memory structures belong, and then
configure the E820 handler to return the appropriate values.
For this example, the platform boot firmware will report the system memory map by E820 as shown
in Figure 15-4. Notice that the memory range from 1 MB to top of memory is marked as system
memory, and then a small range is additionally marked as ACPI reclaim memory. A legacy OS that
does not support the E820 extensions will ignore the extended memory range calls and correctly
mark that memory as system memory.
Reserved 1 MByte
Memory Compatibility
Holes
Available
Address space
640 KByte
Compatibility
System Memory Memory
0
Also, from the Top of Memory1 to the Top of Memory2, the platform boot firmware has set aside
some memory for its own use and has marked as reserved both ACPI NVS Memory and Reserved
Memory. A legacy OS will throw out the ACPI NVS Memory and correctly mark this as reserved
memory (thus preventing this memory range from being allocated to any add-in device).
OSPM will call the _PTS control method prior to initiating a sleep (by programming the sleep type,
followed by setting the SLP_EN bit). During a catastrophic failure (where the integrity of the AML
code interpreter or driver structure is questionable), if OSPM decides to shut the system off, it will
not issue a _PTS, but will immediately issue a SLP_TYP of "soft off" and then set the SLP_EN bit,
or directly write the HW-reduced ACPI Sleep Type value and the SLP_EN bit to the Sleep Control
Register. Hence, the hardware should not rely solely on the _PTS control method to sequence the
system to the "soft off" state. After waking from an S4 state, OSPM will restore the ACPI NVS
memory image and then issue the _WAK control method that informs platform runtime firmware
that its memory image is back.
16.3.3 OS Loading
At this point, the platform boot firmware has passed control to OSPM, either by using OSPM boot
loader (a result of waking from an S4/S5 or boot condition) or OSPM waking vector (a result of
waking from an S2 or S3 state). For the Boot OS Loader path, OSPM will get the system address
map via one of the mechanisms describe in Section 15, “System Address Map Interfaces.” If OSPM
is booting from an S4 state, it will then check the NVS image file’s hardware signature with the
hardware signature within the FACS table (built by platform boot firmware) to determine whether it
has changed since entering the sleeping state (indicating that the platforms fundamental hardware
configuration has changed during the current sleeping state). If the signature has changed, OSPM
will not restore the system context and can boot from scratch (from the S4 state). Next, for an S4
wake, OSPM will check the NVS file to see whether it is valid. If valid, then OSPM will load the
NVS image into system memory. Next, if not a HW-reduced ACPI platform, OSPM will check the
SCI_EN bit and if it is not set, will write the ACPI_ENABLE value to the SMI_CMD register to
switch into the system into ACPI mode and will then reload the memory image from the NVS file.
Boot OS Loader OS
Waking Vector
NVS File
No
?
Yes
Sanity Check
Compare memory and No Load OS Images
volume SSN
Yes
Memory Copy
No
Turn on ACPI
Execute _BFS
Execute _WAK
Continue
If an NVS image file did not exist, then OSPM loader will load OSPM from scratch. At this point, OSPM will gener-
ate a _WAK call that indicates to the platform runtime firmware that its ACPI NVS memory image has been suc-
cessfully and completely updated.
Systems employing a Non Uniform Memory Access (NUMA) architecture contain collections of
hardware resources including processors, memory, and I/O buses, that comprise what is commonly
known as a “NUMA node”. Two or more NUMA nodes are linked to each other via a high-speed
interconnect. Processor accesses to memory or I/O resources within the local NUMA node are
generally faster than processor accesses to memory or I/O resources outside of the local NUMA
node, accessed via the node interconnect. ACPI defines interfaces that allow the platform to convey
NUMA node topology information to OSPM both statically at boot time and dynamically at run time
as resources are added or removed from the system.
OSPM makes no assumptions about the proximity or nearness of different proximity domains. The
difference between two integers representing separate proximity domains does not imply distance
between the proximity domains (in other words, proximity domain 1 is not assumed to be closer to
proximity domain 0 than proximity domain 6).
Note: (Implementation Note) The size of the SLIT table is determined by the largest _PXM value used
in the system. Hence, to minimize the size of the SLIT table, the _PXM values assigned by the
system firmware should be in the range 0, …, N-1, where N is the number of System Localities. If
_PXM values are not packed into this range, the SLIT will still work, but more memory will have to
be allocated to store the “Entries” portion of the SLIT for the matrix.
The static SLIT table provides the boot time description of the relative distances among all System
Localities. For hot-added devices and dynamic reconfiguration of the system localities, the _SLI
object must be used for runtime update.
The _SLI method is an optional object that provides the runtime update of the relative distances from
the System Locality i to all other System Localities in the system. Since _SLI method is providing
This section describes the ACPI Platform Error Interfaces (APEI), which provide a means for the
platform to convey error information to OSPM. APEI extends existing hardware error reporting
mechanisms and brings them together as components of a coherent hardware error infrastructure.
APEI takes advantage of the additional hardware error information available in today’s hardware
devices and integrates much more closely with the system firmware.
As a result, APEI provides the following benefits:
• Allows for more extensive error data to be made available in a standard error record format for
determining the root cause of hardware errors.
• Is extensible, so that as hardware vendors add new and better hardware error reporting
mechanisms to their devices, APEI allows the platform and the OSPM to gracefully
accommodate the new mechanisms.
This provides information to help system designers understand basic issues about hardware errors,
the relationship between the firmware and OSPM, and information about error handling and the
APEI architecture components.
APEI consists of four separate tables:
• Error Record Serialization Table (ERST)
• Boot Error Record Table (BERT)
• Hardware Error Source Table (HEST)
• Error Injection Table (EINJ)
(CPER) compliant error record. The CPER format is described in the appendices of the UEFI
Specification.
The Boot Error Record Table (BERT) format is shown in Table 18-370.
The Boot Error Region is a range of addressable memory OSPM can access during initialization to
determine if an unhandled error condition occurred. System firmware must report this memory range
as firmware reserved. The format of the Boot Error Region follow that of an Error Status Block, this
is defined in Section 18.3.2.7. The format of the error status block is described by Table 18-380.
For details of some of the fields defined in Table 18-381, please refer to the definition of Section
Descriptors provided in the appendices of the UEFI Specification under the description of the
Common Platform Error Record.
The following sections detail each of the specific error source descriptors.
Note: Error source types 3, 4, and 5 are reserved for legacy reasons and must not be used.
Max Sections Per 4 12 Indicates the maximum number of error sections included in an
Record error record created as a result of an error reported by this error
source. Must be >= 1.
Max Raw Data 4 16 Indicates the size in bytes of the error data recorded by this
Length error source.
Error Status 12 20 Generic Address Structure as defined in Section 5.2.3.2.
Address This field specifies the location of a register that contains the
physical address of a block of memory that holds the error
status data for this error source. This range of memory must
reside in firmware reserved memory. OSPM maps this range
into system address space and reads the error status
information from the mapped address.
Notification 28 32 Hardware Error Notification Structure as defined in Table 18-
Structure 383. This structure specifies how this error source notifies
OSPM that an error has occurred.
Error Status Block 4 60 Identifies the length in bytes of the error status data block.
Length
The Error Status Address field specifies the location of an 8-byte memory-mapped register that
holds the physical address of the error status block. This error status block must reside in a range of
memory reported to OSPM as firmware reserved. OSPM maps the error status buffer into system
address space in order to read the error data.
Raw Data Offset 4 4 Offset in bytes from the beginning of the Error Status Block to raw
error data. The raw data must follow any Generic Error Data
Entries.
Raw Data Length 4 8 Length in bytes of the raw data.
Data Length 4 12 Length in bytes of the generic error data.
Error Severity 4 16 Identifies the error severity of the reported error:
0 – Recoverable
1 – Fatal
2 – Corrected
3 – None
Note: This is the error severity of the entire event. Each Generic
Error Data Entry also includes its own Error Severity field.
Generic Error Data Data 20 The information contained in this field is a collection of zero or
Entries Length more Generic Error Data Entries (see Table 18-381).
One or more Generic Error Data Entry structures may be recorded in the Generic Error Data
Entries field of the Generic Error Status Block structure. This allows the platform to accumulate
information for multiple hardware components related to a given error event. For example, if the
generic error source represents an error that occurs on a device on the secondary side of a PCI
Express / PCI-X Bridge, it is useful to record error information from the PCI Express Bridge and
from the PCI-X device. Utilizing two Generic Error Data Entry structures enables this. Table 18-
381 defines the layout of a Generic Error Data Entry.
For details of some of the fields defined in Table 18-381. Please refer to the definition of Section
Descriptors provided in the appendices of the UEFI Specification under the description of the
Common Platform Error Record.
Validation Bits 1 22 Identifies whether certain fields are populated with valid data.
This field indicates the validity of the following fields:
Bit 0 - If 1, the FRUId field contains valid information.
Bit 1 - If 1, the FRUString FRU Text field contains valid
information.
Bit 2 - If 1, the TimeStamp field contains valid information.
Bit 7:3 - Reserved, must be zero..
Flags 1 23 Flags describing the error data.
See the Flags field of the Section Descriptor in the UEFI
Specification appendix titled "Common Platform Error Record”.
Error Data Length 4 24 Length in bytes of the generic error data.
It is valid to have a Data Length of zero. This would be used for
instance in firmware-first error handling where the platform
reports errors to the OSPM using NMI.
FRU Id 16 28 Identifies the Field Replaceable Unit.
See the FRU Id field of the Section Descriptor in the UEFI
Specification appendix titled "Common Platform Error Record”.
FRU Text 20 44 Text field describing the Field Replaceable Unit.
See the FRU Text field of the Section Descriptor in the UEFI
Specification appendix titled "Common Platform Error Record”.
Timestamp 8 64 If marked valid per the validation bits field, this field correlates to
the time when the error information was collected by the system
software and may not necessarily represent the time of the error
event. The timestamp contains the local time in BCD format.
For traditional ACPI platforms the event signaling follows the model described in Section 5.6.4.1.1.
The platform implements a general purpose event (GPE) for the error notification, and the GPE has
an associated control method.
An example of a GPE control method for error notification is the following:
Method (\_GPE._L08) { // GPE 8 level error notification
Notify (error_device, 0x80)
}
For HW-reduced ACPI platforms, the event signaling follows the model described in Section 5.6.5
and Section 5.6.9. The platform implements a notification of error events via interrupts or a
GPIO pin. In both cases these are associated with an _EVT control method.
An example of an _EVT control method for GPIO-based error notification is the following:
Method (\_EVT) { // GPIO pin 300 error notification
Switch (Arg1) {
Case (300) {
Notify (error_device, 0x80)
}
}
}
The overall flow when the platform uses the event notification is:
The platform enumerates the error source with event as the notification method using the format in
Table 18-379 and Table 18-380
The platform surfaces an error device, PNP ID PNP0C33, to the OSPM
When the platform is ready to report an error, the platform populates the error status block including
the block status field ( Table 18-380)
Traditional ACPI platforms signal the error using an SCI, on the appropriate GPE:
• The OSPM evaluates the GPE control method associated with this event as indicated on
Section 5.6.4.1.1
• OSPM responds to this notification by checking the error status block of all generic error
sources with the SCI Generic notification type to identify the source reporting the error
HW-reduced ACPI platforms signal the error using a GPIO interrupt or another interrupt declared
under a generic event device (Section 5.6.9). In the case of GPIO-signaled events, an _AEI object
lists the appropriate GPIO pin, while for Interrupt-signaled events a _CRS object is used to list the
interrupt:
• The OSPM evaluates the control method associated with this event as indicated in
Section 5.6.5.3 and Section 5.6.9.3.
• OSPM responds to this notification by checking the error status block of all generic error
sources with the GPIO-Signal notification or Interrupt-signaled notification types to identify the
source reporting the error.
Error Resource (e.g.
Generic Error
Status Block Memory, Bus, Cache)
(3) Error Event
(if not polled)
OS RAS firmware
(6) Ack Error
Figure 18-84 APEI error flow example with external RAS controller
For GHESv2 error sources, the OSPM must acknowledge the consumption of the Error Status Block
by writing to the “Read Ack Register” listed in the GHESv2 structure (described in Table 18-382).
For platforms that describe multiple Generic Hardware Error Sources: The platform must provide a
unique memory region for the Error Status Block of each error source.
Read Ack 8 76 Contains a mask of bits to preserve when writing the Read
Preserve Ack register.
Read Ack Write 8 84 Contains a mask of bits to set when writing the Read Ack
register.
These are the steps the OS must take once detecting an error from a particular GHESv2 error source:
• OSPM detects error (via interrupt/exception or polling the block status)
• OSPM copies the error status block
• OSPM clears the block status field of the error status block
• OSPM acknowledges the error via Read Ack register. For example:
— OSPM reads the Read Ack register X
— OSPM writes (( X & ReadAckPreserve) | ReadAckWrite)
Bit [2] - GHES_ASSIST: If set, this bit indicates that although
OSPM is responsible for directly handling the error (as
expected when FIRMWARE_FIRST is not set), system
firmware reports additional information in the context of
an interrupt generated by the error. The additional
information is reported in a Generic Hardware Error Source
structure with a matching Related Source Id.
NOTE: If FIRMWARE_FIRST is set, this bit is reserved.
a Extract the error information from the error source and fill in the error information in the
data block of the generic error source it identified as an alternate in step 3. The error
information format follows the specification in Section 18.3.2.7.1
b Set the appropriate bit in the block status field (Table 18-380) to indicate to the OSPM that a
valid error condition is present.
c Clears error state from the hardware.
d Generates an NMI.
At this point, the OSPM NMI handler scans the list of generic error sources to find the error source
that reported the error and processes the error report
Table 18-387 below defines the serialization action status codes returned from
GET_COMMAND_STATUS.
Register Region is described as a generic address structure. This structure describes the physical
address of a register as well as the bit range that corresponds to a desired region of the register. The
bit range is defined as the smallest set of consecutive bits that contains every bit in the register that is
associated with the Serialization Instruction. If bits [6:5] and bits [3:2] all correspond to a
Serialization Instruction, the bit range for that instruction would be [6:2].
Because a bit range could contain bits that do not pertain to a particular Serialization Instruction (i.e.
bit 4 in the example above), a bit mask is required to distinguish all the bits in the region that
correspond to the instruction. The Mask field is defined to be this bit mask with a bit set to ‘1’ for
each bit in the bit range (defined by the register region) corresponding to the Serialization
Instruction. Note that bit 0 of the bit mask corresponds to the lowest bit in the bit range. In the
example used above, the mask would be 11011b or 0x1B.
The Instruction field identifies the operation to be performed on the register region by the instruction
entry. Table 18-389 identifies the instructions that are supported.
The Flags field allows qualifying flags to be associated with the instruction. Table 18-390 identifies
the flags that can be associated with Serialization Instructions.
18.5.1.2.1 READ_REGISTER_VALUE
A read register value instruction reads the register region and compares the result with the specified
value. If the values are not equal, the instruction failed. This can be described in pseudo code as
follows:
X = Read(register)
X = X >> Bit Offset described in Register Region
X = X & Mask
If (X != Value) FAIL
SUCCEED
18.5.1.2.2 READ_REGISTER
A read register instruction reads the register region. The result is a generic value and should not be
compared with Value. Value will be ignored. This can be described in pseudo code as follows:
X = Read(register)
X = X >> Bit Offset described in Register Region
X = X & Mask
Return X
18.5.1.2.3 WRITE_REGISTER_VALUE
A write register value instruction writes the specified value to the register region. If
PRESERVE_REGISTER is set in Instruction Flags, then the bits not corresponding to the write
value instruction are preserved. If the register is preserved, the write value instruction requires a read
of the register. This can be described in pseudo code as follows:
X = Value & Mask
X = X << Bit Offset described in Register Region
If (Preserve Register)
Y = Read(register)
Y = Y & ~(Mask << Bit Offset)
X = X | Y
Write(X, Register)
18.5.1.2.4 WRITE_REGISTER
A write register instruction writes a value to the register region. Value will be ignored. If
PRESERVE_REGISTER is set in Instruction Flags, then the bits not corresponding to the write
instruction are preserved. If the register is preserved, the write value instruction requires a read of the
register. This can be described in pseudo code as follows:
X = supplied value
X = X & Mask
X = X << Bit Offset described in Register Region
If (Preserve Register)
Y = Read(register)
Y = Y & ~(Mask << Bit Offset)
X = X | Y
Write(X, Register)
18.5.2 Operations
The error record serialization interface comprises three operations: Write, Read, and Clear. OSPM
uses the Write operation to write a single error record to the persistent store. The Read operation is
used to retrieve a single error record previously recorded to the persistent store using the write
operation. The Clear operation allows OSPM to notify the platform that a given error record has
been fully processed and is no longer needed, allowing the platform to recover the storage associated
with a cleared error record.
Where the Error Log Address Range is NVRAM, significant optimizations are possible since
transfer from the Error Log Address Range to a separate storage device is unnecessary. The platform
may still, however, copy the record from NVRAM to another device, should it choose to. This
allows, for example, the platform to copy error records to private log files. In order to give the
platform the opportunity to do this, OSPM must use the Write operation to persist error records even
when the Error Log Address Range is NVRAM. The Read and Clear operations, however, are
unnecessary in this case as OSPM is capable of reading and clearing error records without assistance
from the platform.
18.5.2.1 Writing
To write a single HW error record, OSPM executes the following steps:
1. Initializes the error record’s serialization info. OSPM must fill in the Signature.
2. Writes the error record to be persisted into the Error Log Address Range.
3. Executes the BEGIN_WRITE_OPERATION action to notify the platform that a record write
operation is beginning.
4. Executes the SET_RECORD_OFFSET action to inform the platform where in the
5. Error Log Address Range the error record resides.
6. Executes the EXECUTE_OPERATION action to instruct the platform to begin the write
operation.
7. Busy waits by continually executing CHECK_BUSY_STATUS action until FALSE is returned.
8. Executes a GET_COMMAND_STATUS action to determine the status of the write operation.
If an error is indicated, the OS
9. PM may retry the operation.
10. Executes an END_OPERATION action to notify the platform that the record write operation is
complete.
When OSPM performs the EXECUTE_OPERATION action in the context of a record write
operation, the platform attempts to transfer the error record from the designated offset in the Error
Log Address Range to a persistent store of its choice. If the Error Log Address Range is non-volatile
RAM, no transfer is required.
Where the platform is required to transfer the error record from the Error Log Address Range to a
persistent store, it performs the following steps in response to receiving a write command:
1. Sets some internal state to indicate that it is busy. OSPM polls by executing a
CHECK_BUSY_STATUS action until the operation is completed.
2. Reads the error record’s
3. Record ID field to determine where on the storage medium the supplied error record is to be
written. The platform attempts to locate the specified error record on the persistent store.
a If the specified error record does not exist, the platform attempts to write a new record to the
persistent store.
b If the specified error record does exists, then if the existing error record is large enough to be
overwritten by the supplied error record, the platform can do an in-place replacement. If the
existing record is not large enough to be overwritten, the platform must attempt to locate
space in which to write the new record. It may mark the existing record as Free and coalesce
adjacent free records in order to create the necessary space.
4. Transfers the error record to the selected location on the persistent store.
5. Updates an internal
6. Record Count if a new record was written.
7. Records the status of the operation so OSPM can retrieve the status by executing a
GET_COMMAND_STATUS action.
8. Modifies internal busy state as necessary so when OS
9. PM executes CHECK_BUSY_STATUS, the result indicates that the operation is complete.
If the Error Log Address Range resides in NVRAM, the minimum steps required of the platform are:
1. Sets some internal state to indication that it is busy. OSPM polls by executing a
CHECK_BUSY_STATUS action until the operation is completed.
2. Records the status of the o
3. peration so OSPM can retrieve the status by executing a GET_COMMAND_STATUS action.
4. Clear internal busy state so when OS
5. PM executes CHECK_BUSY_STATUS, the result indicates that the operation is complete.
18.5.2.2 Reading
During boot, OSPM attempts to retrieve all serialized error records from the persistent store. If the
Error Log Address Range does not reside in NVRAM, the following steps are executed by OSPM to
retrieve all error records:
1. Executes the BEGIN_ READ_OPERATION action to notify the platform that a record read
operation is beginning.
2. Executes the SET_ RECORD_OFFSET action to inform the platform at what offset in the Error
Log Address Range the error record is to be transferred.
3. Executes the SET_RECORD_IDENTIFER action to inform the platform which error record is
to be read from its persistent store.
4. Executes the EXECUTE_OPERATION action to instruct the platform to begin the read
operation.
5. Busy waits by continually executing CHECK_BUSY_STATUS action until FALSE is returned.
6. Executes a GET_COMMAND_STATUS action to determine the status of the read operation.
a If the status is Record Store Empty (0x04), continue to step 7.
b If an error occurred reading a valid error record, the status will be Failed (0x03), continue to
step 7.
c If the status is Record Not Found (0x05), indicating that the specified error record does not
exist, OSPM retrieves a valid identifier by executing a GET_RECORD_IDENTIFIER
action. The platform will return a valid record identifier.
d If the status is Success, OSPM transfers the retrieved record from the Error Log Address
Range to a private buffer and then executes the GET_RECORD_IDENTIFIER action to
determine the identifier of the next record in the persistent store.
7. Execute an END_OPERATION to notify the platform that the record read operation is
complete.
The steps performed by the platform to carry out a read request are as follows:
1. Sets some internal state to indicate that it is busy. OSPM polls by executing a
CHECK_BUSY_STATUS action until the operation is completed.
2. Using the record identifier supplied by OSPM through the SET_RECORD_IDENTIFIER
operation, determine which error record to read:
a If the identifier is 0x0 (unspecified), the platform reads the ‘first’ error record from its
persistent store. First, in this is implementation specific.
b If the identifier is non-zero, the platform attempts to locate the specified error record on the
persistent store.
c If the specified error record does not exist, set the status register’s
d Status to Record Not Found (0x05), and update the status register’s Identifier field with the
identifier of the ‘first’ error record.
3. Transfer the record from the persistent store to the offset specified by OSPM from the base of
the Error Log Address Range.
4. Record the Identifier of the ‘next’ valid error record that resides on the persistent store. This
allows OSPM to retrieve a valid record identifier by executing a GET_RECORD_IDENTIFIER
operation.
5. Record the status of the operation so OSPM can retrieve the status by executing a
GET_COMMAND_STATUS action.
6. Clear internal busy state so when OSPM executes CHECK_BUSY_STATUS, the result
indicates that the operation is complete.
Where the Error Log Address Range does reside in NVRAM, OSPM requires no platform support to
read persisted error records. OSPM can scan the Error Log Address Range on its own and retrieve
the error records it previously persisted.
18.5.2.3 Clearing
After OSPM has finished processing an error record, it will notify the platform by clearing the
record. This allows the platform to delete the record from the persistent store or mark it such that the
space is free and can be reused. The following steps are executed by OSPM to clear an error record:
1. Executes a BEGIN_ CLEAR_OPERATION action to notify the platform that a record clear
operation is beginning.
2. Executes a SET_RECORD_IDENTIFER action to inform the platform which error record is to
be cleared. This value must not be set to 0x0 (unspecified).
3. Executes an EXECUTE_OPERATION action to instruct the platform to begin the clear
operation.
18.5.2.4 Usage
This section describes several possible ways the error record serialization mechanism might be
implemented.
Register Region is described as a generic address structure. This structure describes the physical
address of a register as well as the bit range that corresponds to a desired region of the register. The
bit range is defined as the smallest set of consecutive bits that contains every bit in the register that is
associated with the injection Instruction. If bits [6:5] and bits [3:2] all correspond to an Injection
Instruction, the bit range for that instruction would be [6:2].
Because a bit range could contain bits that do not pertain to a particular injection Instruction (i.e. bit
4 in the example above), a bit mask is required to distinguish all the bits in the region that correspond
to the instruction. The Mask field is defined to be this bit mask with a bit set to a ‘1’ for each bit in
the bit range (defined by the register region) corresponding to the Injection Instruction. Note that bit
0 of the bit mask corresponds to the lowest bit in the bit range. In the example used above, the mask
would be 11011b or 0x1B.
Table 18-397 below defines the error injection status codes returned from
GET_COMMAND_STATUS.
Table 18-398 below defines the error type codes returned from GET_ERROR_TYPE.
Bit Description
31 Vendor Defined Error Type. If this bit is set, then the Error types and related data
structures are defined by the Vendor, as shown in Table 18-400.
Vendor Error Type 4 4 Specifies the offset from the beginning of the table to the
Extension Structure vendor error type extension structure. If no vendor error type
Offset extension is present, bit31 in error type must be clear and
this field must be set to 0.
Memory Error
Memory Address 8 0x10 Optional field which specifies the physical address of the
memory which is the target for the injection. Valid if Bit [1] of
the Flags field is set.
Memory Address 8 0x18 Optional field which provided a range mask for the address
Range field. Valid if Bit [1] of the Flags field is set. If the OSPM
doesn’t want to provide a range of address, then this field
should be zero.
PCIe SBDF 4 0x20 Byte 3 – PCIe Segment
Byte 2 – Bus Number
Byte 1 – Device Number [Bits 7:3], Function Number Bits
[2:0]
Byte 0 – RESERVED
Note: If the “Entry Count” field above is ZERO, then there are no action structures in the
TRIGGER_ERROR action table. The platform may make this field ZERO in situations where there
is no need for a TRIGGER_ERROR action (for example, in cases where the error injection action
seeds as well as consumes the error).
Note: The format of TRIGGER_ERROR Instructions Entries is the same as Injection Instruction entries
as described in Table 18-396.
— OSPM reads the Vendor ID, Device ID and Rev ID from the PCI config space whose path
(PCIe Segment/Device/Function) is provided in the “SBDF” field of the Vendor Error Type
Extension Structure.
— If the Vendor ID/Device ID and Rev IDs match, then the OSPM can identify the platform it
is running on and would know the Vendor error types that are supported by this platform
— The OSPM writes the vendor error type to inject in the “OEM Defined Structure” field. (see
Table 18-400)
• Optionally, the OSPM can choose the target of the injection, such as a memory range, PCIe
Segment/Device/Function or Processor APIC ID, depending on the type of error. The
OSPM does this by filling in the appropriate fields of the
“SET_ERROR_TYPE_WITH_ADDRESS Data structure”. See Table 18-399 for details
5. Executes an EXECUTE_OPERATION action to instruct the platform to begin the injection
operation.
6. Busy waits by continually executing CHECK_BUSY_STATUS action until the platform
indicates that the operation is complete by clearing the abstracted Busy bit.
7. Executes a GET_COMMAND_STATUS action to determine the status of the read operation.
8. If the status indicates that the platform cannot inject errors, stop.
9. Executes a GET_TRIGGER_ERROR_ACTION_TABLE operation to get the physical pointer
to the TRIGGER_ERROR action table. This provides the flexibility in systems where injecting
an error is a two (or more) step process.
10. Executes the actions specified in the TRIGGER_ERROR action table.
11. Execute an END_OPERATION to notify the platform that the error injection operation is
complete.
This section formally defines the ACPI Source Language (ASL). ASL is a source language for
defining ACPI objects including writing ACPI control methods. OEMs and platform firmware
developers define objects and write control methods in ASL and then use a translator tool (compiler)
to generate ACPI Machine Language (AML) versions of the control methods. For a formal
definition of AML, see the ACPI Machine Language (AML) Specification chapter.
AML and ASL are different languages though they are closely related.
Every ACPI-compatible OS must support AML. A given user can define some arbitrary source
language (to replace ASL) and write a tool to translate it to AML.
An OEM or platform firmware vendor needs to write ASL and be able to single-step AML for
debugging. (Debuggers and similar tools are expected to be AML-level tools, not source-level
tools.) An ASL translator implementer must understand how to read ASL and generate AML. An
AML interpreter author must understand how to execute AML.
This section has two parts:
• The ASL grammar, which is the formal ASL specification and also serves as a quick reference.
• A full ASL reference, which includes for each ASL operator: the operator invocation syntax, the
type of each argument, and a description of the action and use of the operator.
// Math operators
Z = X + Y Add (X, Y, Z)
Z = X / Y Divide (X, Y, , Z)
Z = X % Y Mod (X, Y, Z)
Z = X * Y Multiply (X, Y, Z)
Z = X - Y Subtract (X, Y, Z)
// Logical operators
(X == Y) LEqual (X, Y)
(X != Y) LNotEqual (X, Y)
(X < Y) LLess (X, Y)
(X > Y) LGreater (X, Y)
(X <= Y) LLessEqual (X, Y)
(X >= Y) LGreaterEqual (X, Y)
(X && Y) LAnd (X, Y)
(X || Y) LOr (X, Y)
!X LNot (X)
X = Y Store (Y, X)
X += Y Add (X, Y, X)
X /= Y Divide (X, Y, , X)
X %= Y Mod (X, Y, X)
X *= Y Multiply (X, Y, X)
X -= Y Subtract (X, Y, X)
// Miscellaneous
of an ASL compiler.
ASL statements declare objects. Each object has three parts, two of which might not be present.
LeadNameChar :=
‘A’-‘Z’ | ‘a’-‘z’ | ‘_’
DigitChar :=
‘0’-‘9’
NameChar :=
DigitChar | LeadNameChar
RootChar :=
‘\’
ParentPrefixChar :=
‘^’
PathSeparatorChar :=
‘.’
CommaChar :=
‘,’
SemicolonDelimiter :=
Nothing | ‘;’
NameSeg :=
<LeadNameChar> |
<LeadNameChar NameChar> |
<LeadNameChar NameChar NameChar> |
<LeadNameChar NameChar NameChar NameChar>
NameString :=
<RootChar NamePath> | <ParentPrefixChar PrefixPath NamePath> | NonEmptyNamePath
NamePath :=
Nothing | <NameSeg NamePathTail>
NamePathTail :=
Nothing | <PathSeparatorChar NameSeg NamePathTail>
NonEmptyNamePath :=
NameSeg | <NameSeg NamePathTail>
PrefixPath :=
Nothing | <ParentPrefixChar PrefixPath>
ASLCode :=
DefinitionBlockList
DefinitionBlockList :=
DefinitionBlockTerm | <DefinitionBlockTerm DefinitionBlockList>
// Major Terms
SuperName :=
NameString | ArgTerm | LocalTerm | DebugTerm | Type6Opcode | MethodInvocationTerm
Target :=
Nothing | SuperName
TermArg :=
Type2Opcode | DataObject | ArgTerm | LocalTerm | NameString | SymbolicExpression
MethodInvocationTerm :=
NameString( // NameString => Method
ArgList
) => Nothing | DataRefObject
// List Terms
ArgList :=
Nothing | <TermArg ArgListTail>
ArgListTail :=
Nothing | <CommaChar TermArg ArgListTail>
ByteList :=
Nothing | <ByteConstExpr ByteListTail>
ByteListTail :=
Nothing | <CommaChar ByteConstExpr ByteListTail>
DWordList :=
Nothing | <DWordConstExpr DWordListTail>
DWordListTail :=
Nothing | <CommaChar DWordConstExpr DWordListTail>
ExtendedAccessAttribTerm :=
ExtendedAccessAttribKeyword (
AccessLength //ByteConst
)
FieldUnitList :=
Nothing | <FieldUnit FieldUnitListTail>
FieldUnitListTail :=
Nothing | <CommaChar FieldUnit FieldUnitListTail>
FieldUnit :=
FieldUnitEntry | OffsetTerm | AccessAsTerm | ConnectionTerm
FieldUnitEntry :=
<Nothing | NameSeg> CommaChar Integer
PackageList :=
Nothing | <PackageElement PackageListTail>
PackageListTail :=
Nothing | <CommaChar PackageElement PackageListTail>
PackageElement :=
DataObject | NameString
ParameterTypePackage :=
ParameterTypesPackage :=
ObjectTypeKeyword | {Nothing | ParameterTypesPackageList}
ParameterTypesPackageList :=
ParameterTypePackage | <ParameterTypePackage CommaChar ParameterTypesPackageList>
TermList :=
Nothing | <Term SemicolonDelimiter TermList>
Term :=
Object | Type1Opcode | Type2Opcode | SymbolicExpression
Object :=
CompilerDirective | NamedObject | NameSpaceModifier
CaseTermList :=
Nothing | CaseTerm | DefaultTerm DefaultTermList | CaseTerm CaseTermList
DefaultTermList :=
Nothing | CaseTerm | CaseTerm DefaultTermList
IfElseTerm :=
IfTerm ElseTerm
LeadDigitChar :=
‘1’-‘9’
HexDigitChar :=
DigitChar | ‘A’-‘F’ | ‘a’-‘f’
OctalDigitChar :=
‘0’-‘7’
NullChar :=
0x00
// Data Terms
DataObject :=
BufferData | PackageData | IntegerData | StringData
DataRefObject :=
DataObject | ObjectReference | DDBHandle
ComputationalData :=
BufferData | IntegerData | StringData
BufferData :=
Type5Opcode | BufferTerm
IntegerData :=
Type3Opcode | Integer | ConstTerm
PackageData :=
PackageTerm
StringData :=
Type4Opcode | String
// Integer Terms
Integer :=
DecimalConst | OctalConst | HexConst
DecimalConst :=
LeadDigitChar | <DecimalConst DigitChar>
OctalConst :=
‘0’ | <OctalConst OctalDigitChar>
HexConst :=
<0x HexDigitChar> | <0X HexDigitChar> | <HexConst HexDigitChar>
ByteConst :=
Integer => 0x00-0xFF
WordConst :=
Integer => 0x0000-0xFFFF
DWordConst :=
Integer => 0x00000000-0xFFFFFFFF
QWordConst :=
Integer => 0x0000000000000000-0xFFFFFFFFFFFFFFFF
ByteConstExpr :=
<Type3Opcode | ConstExprTerm | Integer> => ByteConst
WordConstExpr :=
<Type3Opcode | ConstExprTerm | Integer> => WordConst
DWordConstExpr :=
<Type3Opcode | ConstExprTerm | Integer> => DWordConst
QWordConstExpr :=
<Type3Opcode | ConstExprTerm | Integer> => QWordConst
ConstTerm :=
ConstExprTerm | Revision
ConstExprTerm :=
Zero | One | Ones
// String Terms
String :=
‘”’ Utf8CharList ‘”’
Utf8CharList :=
Nothing | <EscapeSequence Utf8CharList> | <Utf8Char Utf8CharList>
Utf8Char :=
0x01-0x21 |
0x23-0x5B |
0x5D-0x7F |
0xC2-0xDF 0x80-0xBF |
0xE0 0xA0-0xBF 0x80-0xBF |
0xE1-0xEC 0x80-0xBF 0x80-0xBF |
0xED 0x80-0x9F 0x80-0xBF |
0xEE-0xEF 0x80-0xBF 0x80-0xBF |
0xF0 0x90-0xBF 0x80-0xBF 0x80-0xBF |
0xF1-0xF3 0x80-0xBF 0x80-0xBF 0x80-0xBF
// Escape sequences
EscapeSequence :=
SimpleEscapeSequence | OctalEscapeSequence | HexEscapeSequence
HexEscapeSequence :=
\x HexDigitChar |
\x HexDigitChar HexDigitChar
SimpleEscapeSequence :=
\' | \" | \a | \b | \f | \n | \r | \t | \v | \\
OctalEscapeSequence :=
\ OctalDigitChar |
\ OctalDigitChar OctalDigitChar |
\ OctalDigitChar OctalDigitChar OctalDigitChar
DDBHandle :=
Integer
ObjectReference :=
Integer
Boolean :=
True | False
True :=
Ones
False :=
Zero
// Symbolic Operator terms
Operators :=
'+' | '-' | '*' | '/' | '%' | '&' | '|' | '^' | '~' | '<' | '>' | '!' | '='
CompoundOperators :=
"<<" | ">>" | "++" | "-" | "==" | "!=" | "<=" | ">=" | "&&" | "||" | "+=" | "-=" | "*=" |
"/=" | "%=" | "<<=" | ">>=" | "&=" | "|=" | "^="
NamedObject :=
BankFieldTerm | CreateBitFieldTerm | CreateByteFieldTerm | CreateDWordFieldTerm |
CreateFieldTerm | CreateQWordFieldTerm | CreateWordFieldTerm | DataRegionTerm |
DeviceTerm | EventTerm | FieldTerm | FunctionTerm | IndexFieldTerm | MethodTerm |
MutexTerm | OpRegionTerm | PowerResTerm | ProcessorTerm | ThermalZoneTerm
NameSpaceModifier :=
AliasTerm | NameTerm | ScopeTerm
SymbolicExpressionTerm :=
( TermArg ) |
AddSymbolicTerm | AndSymbolicTerm | DecSymbolicTerm | DivideSymbolicTerm | IncSymbolicTerm |
LAndSymbolicTerm | LEqualSymbolicTerm | LGreaterEqualSymbolicTerm | LGreaterSymbolicTerm |
LLessEqualSymbolicTerm | LLessSymbolicTerm | LNotEqualSymbolicTerm | LNotSymbolicTerm |
LOrSymbolicTerm | ModSymbolicTerm | MultiplySymbolicTerm | NotSymbolicTerm |
OrSymbolicTerm | ShiftLeftSymbolicTerm | ShiftRightSymbolicTerm | SubtractSymbolicTerm |
XorSymbolicTerm
SymbolicAssignmentTerm :=
StoreSymbolicTerm | AddCompoundTerm | AndCompoundTerm | DivideCompoundTerm |
ModCompoundTerm | MultiplyCompoundTerm | OrCompoundTerm | ShiftLeftCompoundTerm |
ShiftRightCompoundTerm | SubtractCompoundTerm | XorCompoundTerm
Type1Opcode :=
BreakTerm | BreakPointTerm | ContinueTerm | FatalTerm | ForTerm | IfElseTerm | LoadTerm |
NoOpTerm | NotifyTerm | ReleaseTerm | ResetTerm | ReturnTerm | SignalTerm |
SleepTerm | StallTerm | SwitchTerm | UnloadTerm | WhileTerm
A Type 1 opcode term does not return a value and can only be used standalone on a line of ASL code.
Since these opcodes do not return a value they cannot be used as a term in an expression.
Type2Opcode :=
AcquireTerm | AddTerm | AndTerm | ConcatTerm | ConcatResTerm | CondRefOfTerm |
CopyObjectTerm | DecTerm | DerefOfTerm | DivideTerm |FindSetLeftBitTerm |
Type3Opcode :=
AddTerm | AndTerm | DecTerm | DerefOfTerm | DivideTerm | EISAIDTerm |
FindSetLeftBitTerm | FindSetRightBitTerm | FromBCDTerm | IncTerm | LAndTerm |
LEqualTerm | LGreaterTerm | LGreaterEqualTerm | LLessTerm | LLessEqualTerm | LNotTerm |
LNotEqualTerm | LOrTerm | MatchTerm | ModTerm | MultiplyTerm | NAndTerm | NOrTerm |
NotTerm | OrTerm | ShiftLeftTerm | ShiftRightTerm | SubtractTerm | ToBCDTerm |
ToIntegerTerm | XorTerm | SymbolicExpressionTerm
The Type 3 opcodes are a subset of Type 2 opcodes that return an Integer value and can be used in
an expression that evaluates to a constant. These opcodes may be evaluated at ASL compile-time. To
ensure that these opcodes will evaluate to a constant, the following rules apply: The term cannot
have a destination (target) operand, and must have either a Type3Opcode, Type4Opcode, Type5Opcode,
ConstExprTerm, Integer, BufferTerm, Package, or String for all arguments.
Type4Opcode :=
ConcatTerm | DerefOfTerm | FprintfTerm | MidTerm | PrintfTerm | ToDecimalStringTerm |
ToHexStringTerm | ToStringTerm
The Type 4 opcodes are a subset of Type 2 opcodes that return a String value and can be used in an
expression that evaluates to a constant. These opcodes may be evaluated at ASL compile-time. To
ensure that these opcodes will evaluate to a constant, the following rules apply: The term cannot
have a destination (target) operand, and must have either a Type3Opcode, Type4Opcode, Type5Opcode,
ConstExprTerm, Integer, BufferTerm, Package, or String for all arguments.
Type5Opcode :=
ConcatTerm | ConcatResTerm | DerefOfTerm | MidTerm | ResourceTemplateTerm |
ToBufferTerm | ToPLDTerm | ToUUIDTerm | UnicodeTerm
The Type 5 opcodes are a subset of Type 2 opcodes that return a Buffer value and can be used in an
expression that evaluates to a constant. These opcodes may be evaluated at ASL compile-time. To
ensure that these opcodes will evaluate to a constant, the following rules apply: The term cannot
have a destination (target) operand, and must have either a Type3Opcode, Type4Opcode, Type5Opcode,
ConstExprTerm, Integer, BufferTerm, Package, or String for all arguments.
Type6Opcode :=
RefOfTerm | DerefOfTerm | IndexTerm | IndexSymbolicTerm | UserTermObj
The Type 6 opcodes are a subset of Type 2 opcodes that return a Reference value and can be used in
an expression. They cannot be evaluated at compile time. Type 6 also includes the UserTerm, which
is a control method invocation.
AddCompoundTerm :=
Addend1-Result // TermArg => Integer => Target
+=
Addend2 // TermArg => Integer
=> Integer
AddSymbolicTerm :=
Addend1 // TermArg => Integer
+
Addend2 // TermArg => Integer
=> Integer
AddTerm :=
Add (
Addend1, // TermArg => Integer
Addend2, // TermArg => Integer
Result // Target
) => Integer
AliasTerm :=
Alias (
SourceObject, // NameString
AliasObject // NameString
)
AndCompoundTerm :=
Source1-Result // TermArg => Integer => Target
&=
Source2 // TermArg => Integer
=> Integer
AndSymbolicTerm :=
Source1 // TermArg => Integer
&
Source2 // TermArg => Integer
=> Integer
AndTerm :=
And (
Source1, // TermArg => Integer
Source2, // TermArg => Integer
Result // Target
) => Integer
ArgTerm :=
Arg0 | Arg1 | Arg2 | Arg3 | Arg4 | Arg5 | Arg6
BankFieldTerm :=
BankField (
RegionName, // NameString => OperationRegion
BankName, // NameString => FieldUnit
BankValue, // TermArg => Integer
AccessType, // AccessTypeKeyword
LockRule, // LockRuleKeyword
UpdateRule // UpdateRuleKeyword
) {FieldUnitList}
BreakPointTerm :=
BreakPoint
BreakTerm :=
Break
BufferTerm :=
Buffer (
BuffSize // Nothing | TermArg => Integer
) {StringData | ByteList} => Buffer
CaseTerm :=
Case (
Value // DataObject
) {TermList}
ConcatResTerm :=
ConcatenateResTemplate (
Source1, // TermArg => Buffer
Source2, // TermArg => Buffer
Result // Target
) => Buffer
ConcatTerm :=
Concatenate (
Source1, // TermArg => SuperName
Source2, // TermArg => SuperName
Result // Target
) => Buffer | String
ConnectionTerm :=
Connection (
ConnectionResource // NameString | ResourceMacroTerm
)
CondRefOfTerm :=
CondRefOf (
Source // NameString | ArgTerm | LocalTerm | DerefOfTerm
Destination // Target
) => Boolean
ContinueTerm :=
Continue
CopyObjectTerm :=
CopyObject (
Source, // TermArg => DataRefObject
Result, // NameString | LocalTerm | ArgTerm
) => DataRefObject
CreateBitFieldTerm :=
CreateBitField (
SourceBuffer, // TermArg => Buffer
BitIndex, // TermArg => Integer
BitFieldName // NameString
)
CreateByteFieldTerm :=
CreateByteField (
SourceBuffer, // TermArg => Buffer
ByteIndex, // TermArg => Integer
ByteFieldName // NameString
)
CreateDWordFieldTerm :=
CreateDWordField (
SourceBuffer, // TermArg => Buffer
ByteIndex, // TermArg => Integer
DWordFieldName // NameString
)
CreateFieldTerm :=
CreateField (
SourceBuffer, // TermArg => Buffer
BitIndex, // TermArg => Integer
NumBits, // TermArg => Integer
FieldName // NameString
)
CreateQWordFieldTerm :=
CreateQWordField (
SourceBuffer, // TermArg => Buffer
ByteIndex, // TermArg => Integer
QWordFieldName // NameString
)
CreateWordFieldTerm :=
CreateWordField (
SourceBuffer, // TermArg => Buffer
ByteIndex, // TermArg => Integer
WordFieldName // NameString
)
DataRegionTerm :=
DataTableRegion (
RegionName, // NameString
SignatureString, // TermArg => String
OemIDString, // TermArg => String
OemTableIDString // TermArg => String
)
DebugTerm :=
Debug
DecSymbolicTerm :=
Minuend // SuperName => Integer
--
=> Integer
DecTerm :=
Decrement (
Minuend // SuperName
) => Integer
DefaultTerm :=
Default {TermList}
DefinitionBlockTerm :=
DefinitionBlock (
AMLFileName, // String
TableSignature, // String
ComplianceRevision, // ByteConst
OEMID, // String
TableID, // String
OEMRevision // DWordConst
) {TermList}
DerefOfTerm :=
DerefOf (
Source // NameString | ArgTerm | LocalTerm | RefOfTerm | CondRefOfTerm
// IndexTerm | MethodInvocationTerm
) => DataRefObject
DeviceTerm :=
Device (
DeviceName // NameString
) {TermList}
DivideCompoundTerm :=
Dividend-Result // TermArg => Integer => Target
/=
Divisor // TermArg => Integer
=> Integer
DivideSymbolicTerm :=
Dividend // TermArg => Integer
/
Divisor // TermArg => Integer
=> Integer
DivideTerm :=
Divide (
Dividend, // TermArg => Integer
Divisor, // TermArg => Integer
Remainder, // Target
Result // Target
) => Integer // Returns Result
EISAIDTerm :=
EISAID (
EisaIdString // StringData
) => DWordConst
ElseIfTerm :=
ElseIf (
Predicate // TermArg => Integer
) {TermList} ElseTerm
ElseTerm :=
Else {TermList} | ElseIfTerm | Nothing
EventTerm :=
Event (
EventName // NameString
)
ExternalTerm :=
External (
ObjName, // NameString
ObjType, // Nothing | ObjectTypeKeyword
ResultType, // Nothing | ParameterTypePackage
ParameterTypes // Nothing | ParameterTypesPackage
)
FatalTerm :=
Fatal (
Type, // ByteConstExpr
Code, // DWordConstExpr
Arg // TermArg => Integer
)
FieldTerm :=
Field (
RegionName, // NameString => OperationRegion
AccessType, // AccessTypeKeyword
LockRule, // LockRuleKeyword
UpdateRule // UpdateRuleKeyword
) {FieldUnitList}
FindSetLeftBitTerm :=
FindSetLeftBit (
Source, // TermArg => Integer
Result // Target
) => Integer
FindSetRightBitTerm :=
FindSetRightBit (
Source, // TermArg => Integer
Result // Target
) => Integer
ForTerm :=
For (
Initialize,// Nothing | TermArg => ComputationalData
Predicate,// Nothing | TermArg => ComputationalData
Update // Nothing | TermArg => ComputationalData
) {TermList}
FprintfTerm :=
Fprintf (
TermArg,
String,
PrintfArgList
) => String
FromBCDTerm :=
FromBCD (
BCDValue, // TermArg => Integer
Result // Target
) => Integer
FunctionTerm :=
Function (
FunctionName, // NameString
ReturnType, // Nothing | ParameterTypePackage
ParameterTypes // Nothing | ParameterTypesPackage
) {TermList}
IfTerm :=
If (
Predicate // TermArg => Integer
) {TermList}
IncludeTerm :=
Include (
FilePathName // StringData
)
IncSymbolicTerm :=
Addend // SuperName => Integer
++
=> Integer
IncTerm :=
Increment (
Addend // SuperName
) => Integer
IndexFieldTerm :=
IndexField (
IndexName, // NameString => FieldUnit
DataName, // NameString => FieldUnit
AccessType, // AccessTypeKeyword
LockRule, // LockRuleKeyword
UpdateRule // UpdateRuleKeyword
) {FieldUnitList}
IndexSymbolicTerm :=
Source // TermArg => <String | Buffer | PackageTerm>
[ Index ] // TermArg => Integer
=> ObjectReference
IndexTerm :=
Index (
Source, // TermArg => <String | Buffer | PackageTerm>
Index, // TermArg => Integer
Destination // Target
) => ObjectReference
LAndSymbolicTerm :=
Source1 // TermArg => Integer
&&
Source2 // TermArg => Integer
=> Boolean
LAndTerm :=
LAnd (
Source1, // TermArg => Integer
Source2 // TermArg => Integer
) => Boolean
LEqualSymbolicTerm :=
Source1 // TermArg => ComputationalData
==
Source2 // TermArg => ComputationalData
=> Boolean
LEqualTerm :=
LEqual (
Source1, // TermArg => ComputationalData
Source2 // TermArg => ComputationalData
) => Boolean
LGreaterEqualSymbolicTerm :=
Source1 // TermArg => ComputationalData
>=
Source2 // TermArg => ComputationalData
=> Boolean
LGreaterEqualTerm :=
LGreaterEqual (
Source1, // TermArg => ComputationalData
LGreaterSymbolicTerm :=
Source1 // TermArg => ComputationalData
>
Source2 // TermArg => ComputationalData
=> Boolean
LGreaterTerm :=
LGreater (
Source1, // TermArg => ComputationalData
Source2 // TermArg => ComputationalData
) => Boolean
LLessEqualSymbolicTerm :=
Source1 // TermArg => ComputationalData
<=
Source2 // TermArg => ComputationalData
=> Boolean
LLessEqualTerm :=
LLessEqual (
Source1, // TermArg => ComputationalData
Source2 // TermArg => ComputationalData
) => Boolean
LLessSymbolicTerm :=
Source1 // TermArg => ComputationalData
<
Source2 // TermArg => ComputationalData
=> Boolean
LLessTerm :=
LLess (
Source1, // TermArg => ComputationalData
Source2 // TermArg => ComputationalData
) => Boolean
LNotEqualTerm :=
LNotEqual (
Source1, // TermArg => ComputationalData
Source2 // TermArg => ComputationalData
) => Boolean
LNotEqualSymbolicTerm :=
Source1 // TermArg => ComputationalData
!=
Source2 // TermArg => ComputationalData
=> Boolean
LNotSymbolicTerm :=
!
Source // TermArg => Integer
=> Boolean
LNotTerm :=
LNot (
LOrSymbolicTerm :=
Source1 // TermArg => Integer
||
Source2 // TermArg => Integer
=> Boolean
LoadTableTerm :=
LoadTable (
SignatureString, // TermArg => String
OemIDString, // TermArg => String
OemTableIDString, // TermArg => String
RootPathString, // Nothing | TermArg => String
ParameterPathString, // Nothing | TermArg => String
ParameterData // Nothing | TermArg => DataRefObject
) => DDBHandle
LoadTerm :=
Load (
Object, // NameString
DDBHandle // SuperName
)
LocalTerm :=
Local0 | Local1 | Local2 | Local3 | Local4 | Local5 | Local6 | Local7
LOrTerm :=
LOr (
Source1, // TermArg => Integer
Source2 // TermArg => Integer
) => Boolean
MatchTerm :=
Match (
SearchPackage, // TermArg => Package
Op1, // MatchOpKeyword
MatchObject1, // TermArg => ComputationalData
Op2, // MatchOpKeyword
MatchObject2, // TermArg => ComputationalData
StartIndex // TermArg => Integer
) => <Ones | Integer>
MethodTerm :=
Method (
MethodName, // NameString
NumArgs, // Nothing | ByteConstExpr
SerializeRule, // Nothing | SerializeRuleKeyword
SyncLevel, // Nothing | ByteConstExpr
ReturnType, // Nothing | ParameterTypePackage
ParameterTypes // Nothing | ParameterTypesPackage
) {TermList}
MidTerm :=
Mid (
Source, // TermArg => <Buffer | String>
Index, // TermArg => Integer
Length, // TermArg => Integer
Result // Target
) => <Buffer | String>
ModCompoundTerm :=
Dividend-Result // TermArg => Integer => Target
%=
Divisor // TermArg => Integer
=> Integer
ModSymbolicTerm :=
Dividend // TermArg => Integer
%
Divisor // TermArg => Integer
=> Integer
ModTerm :=
Mod (
Dividend, // TermArg => Integer
Divisor, // TermArg => Integer
Result // Target
) => Integer // Returns Result
MultiplyCompoundTerm :=
Multiplicand-Result // TermArg => Integer => Target
*=
Multiplier // TermArg => Integer
=> Integer
MultiplySymbolicTerm :=
Multiplicand // TermArg => Integer
*
Multiplier // TermArg => Integer
=> Integer
MultiplyTerm :=
Multiply (
Multiplicand, // TermArg => Integer
Multiplier, // TermArg => Integer
Result // Target
) => Integer
MutexTerm :=
Mutex (
MutexName, // NameString
SyncLevel // ByteConstExpr
)
NameTerm :=
Name (
ObjectName, // NameString
Object // DataObject
)
NAndTerm :=
NAnd (
Source1, // TermArg => Integer
Source2, // TermArg => Integer
Result // Target
) => Integer
NoOpTerm :=
NoOp
NOrTerm :=
NOr (
Source1, // TermArg => Integer
Source2, // TermArg => Integer
Result // Target
) => Integer
NotifyTerm :=
Notify (
Object, // SuperName => <ThermalZone | Processor | Device>
NotificationValue // TermArg => Integer
)
NotSymbolicTerm :=
~
Source // TermArg => Integer
=> Integer
NotTerm :=
Not (
Source, // TermArg => Integer
Result // Target
) => Integer
ObjectTypeTerm :=
ObjectType (
Object // NameString | ArgTerm | LocalTerm | DebugTerm |
// RefOfTerm | DerefOfTerm | IndexTerm
) => Integer
OffsetTerm :=
Offset (
ByteOffset // IntegerData
)
OpRegionTerm :=
OperationRegion (
RegionName, // NameString
RegionSpace, // RegionSpaceKeyword
Offset, // TermArg => Integer
OrCompoundTerm :=
Source1-Result // TermArg => Integer => Target
|=
Source2 // TermArg => Integer
=> Integer
OrSymbolicTerm :=
Source1 // TermArg => Integer
|
Source2 // TermArg => Integer
=> Integer
OrTerm :=
Or (
Source1, // TermArg => Integer
Source2, // TermArg => Integer
Result // Target
) => Integer
PackageTerm :=
Package (
NumElements // Nothing | ByteConstExpr | TermArg => Integer
) {PackageList} => Package
PLDKeyword :=
PLD_Revision | PLD_IgnoreColor | PLD_Red | PLD_Green | PLD_Blue |
PLD_Width | PLD_Height | PLD_UserVisible | PLD_Dock | PLD_Lid | PLD_Panel |
PLD_VerticalPosition | PLD_HorizontalPosition | PLD_Shape |
PLD_GroupOrientation | PLD_GroupToken | PLD_GroupPosition | PLD_Bay
PLD_Ejectable | PLD_EjectRequired | PLD_CabinetNumber
PLDKeywordList :=
PLDKeyword = StringData | PLDKeyword = IntegerData |
PLDKeyword = StringData, PLDKeywordList, PLDKeyword = IntegerData, PLDKeywordList
PowerResTerm :=
PowerResource (
ResourceName, // NameString
SystemLevel, // ByteConstExpr
ResourceOrder // WordConstExpr
) {TermList}
PrintfArgList :=
TermArg | TermArg , PrintfArgList
PrintfTerm :=
Printf (
String,
PrintfArgList
) => String
ProcessorTerm :=
Processor (
ProcessorName, // NameString
ProcessorID, // ByteConstExpr
PBlockAddress, // DWordConstExpr | Nothing (=0)
RawDataBufferTerm :=
RawDataBuffer (
BuffSize // Nothing | WordConst
) { ByteList} => RawDataBuffer
RefOfTerm :=
RefOf (
Source // NameString | ArgTerm | LocalTerm | DerefOfTerm
) => ObjectReference
ReleaseTerm :=
Release (
SyncObject // SuperName
)
ResetTerm :=
Reset (
SyncObject // SuperName
)
ReturnTerm :=
Return (
Arg // Nothing | TermArg => DataRefObject
)
ScopeTerm :=
Scope (
Location // NameString
) {TermList}
ShiftLeftCompoundTerm :=
Source-Result // TermArg => Integer => Target
<<=
ShiftCount // TermArg => Integer
=> Integer
ShiftLeftSymbolicTerm :=
Source // TermArg => Integer
<<
ShiftCount // TermArg => Integer
=> Integer
ShiftLeftTerm :=
ShiftLeft (
Source, // TermArg => Integer
ShiftCount, // TermArg => Integer
Result // Target
) => Integer
ShiftRightCompoundTerm :=
Source-Result // TermArg => Integer => Target
>>=
ShiftCount // TermArg => Integer
=> Integer
ShiftRightSymbolicTerm :=
Source // TermArg => Integer
>>
ShiftCount // TermArg => Integer
=> Integer
ShiftRightTerm :=
ShiftRight (
Source, // TermArg => Integer
ShiftCount, // TermArg => Integer
Result // Target
) => Integer
SignalTerm :=
Signal (
SyncObject // SuperName
)
SizeOfTerm :=
SizeOf (
DataObject // SuperName => <String | Buffer | Package>
) => Integer
SleepTerm :=
Sleep (
MilliSeconds // TermArg => Integer
)
StallTerm :=
Stall (
MicroSeconds // TermArg => Integer
)
StoreSymbolicTerm :=
Destination // SuperName
=
Source // TermArg => DataRefObject
=> DataRefObject
StoreTerm :=
Store (
Source, // TermArg => DataRefObject
Destination // SuperName
) => DataRefObject
SubtractCompoundTerm :=
Minuend-Result // TermArg => Integer => Target
-=
Subtrahend // TermArg => Integer
=> Integer
SubtractSymbolicTerm :=
Minuend // TermArg => Integer
-
Subtrahend // TermArg => Integer
=> Integer
SubtractTerm :=
Subtract (
Minuend, // TermArg => Integer
Subtrahend, // TermArg => Integer
Result // Target
) => Integer
SwitchTerm :=
Switch (
Predicate // TermArg => ComputationalData
) {CaseTermList}
ThermalZoneTerm :=
ThermalZone (
ThermalZoneName // NameString
) {TermList}
TimerTerm :=
Timer => Integer
ToBCDTerm :=
ToBCD (
Value, // TermArg => Integer
Result // Target
) => Integer
ToBufferTerm :=
ToBuffer (
Data, // TermArg => ComputationalData
Result // Target
) => ComputationalData
ToDecimalStringTerm :=
ToDecimalString (
Data, // TermArg => ComputationalData
Result // Target
) => String
ToHexStringTerm :=
ToHexString (
Data, // TermArg => ComputationalData
Result // Target
) => String
ToIntegerTerm :=
ToInteger (
ToPLDTerm :=
ToPLD (
PLDKeywordList
) => Buffer
ToStringTerm :=
ToString (
Source, // TermArg => Buffer
Length, // Nothing | TermArg => Integer
Result // Target
) => String
ToUUIDTerm :=
ToUUID (
String // StringData
) => Buffer
UnicodeTerm :=
Unicode (
String // StringData
) => Buffer
UnloadTerm :=
Unload (
DDBHandle // SuperName
)
WaitTerm :=
Wait (
SyncObject, // SuperName => Event
TimeoutValue // TermArg => Integer
) => Boolean // True means timed-out
WhileTerm :=
While (
Predicate // TermArg => Integer
) {TermList}
XorCompoundTerm :=
Source1-Result // TermArg => Integer => Target
^=
Source2 // TermArg => Integer
=> Integer
XorSymbolicTerm :=
Source1 // TermArg => Integer
^
Source2 // TermArg => Integer
=> Integer
XOrTerm :=
XOr (
FlowControlKeyword :=
FlowControlNone | FlowControlXon | FlowControlHardware
InterruptTypeKeyword :=
Edge | Level
InterruptLevel :=
ActiveHigh | ActiveLow
InterruptLevelKeyword :=
ActiveHigh | ActiveLow | ActiveBoth
IODecodeKeyword :=
Decode16 | Decode10
IoRestrictionKeyword :=
IoRestrictionNone | IoRestrictionInputOnly | IoRestrictionOutputOnly |
IoRestrictionNoneAndPreserve
LockRuleKeyword :=
Lock | NoLock
MatchOpKeyword :=
MTR | MEQ | MLE | MLT | MGE | MGT
MaxKeyword :=
MaxFixed | MaxNotFixed
MemTypeKeyword :=
Cacheable | WriteCombining | Prefetchable | NonCacheable
MinKeyword :=
MinFixed | MinNotFixed
ObjectTypeKeyword :=
UnknownObj | IntObj | StrObj | BuffObj | PkgObj | FieldUnitObj | DeviceObj |
EventObj | MethodObj | MutexObj | OpRegionObj | PowerResObj | ProcessorObj |
ThermalZoneObj | BuffFieldObj | DDBHandleObj
ParityKeyword :=
ParityTypeNone | ParityTypeSpace | ParityTypeMark | ParityTypeOdd | ParityTypeEven
PinConfigKeyword :=
PullDefault | PullUp | PullDown | PullNone
PolarityKeyword :=
PolarityHigh | PolarityLow
RangeTypeKeyword :=
ISAOnlyRanges | NonISAOnlyRanges | EntireRange
ReadWriteKeyword :=
ReadWrite | ReadOnly
RegionSpaceKeyword :=
UserDefRegionSpace | SystemIO | SystemMemory | PCI_Config | EmbeddedControl |
SMBus | SystemCMOS | PciBarTarget | IPMI | GeneralPurposeIO | GenericSerialBus
ResourceTypeKeyword :=
ResourceConsumer | ResourceProducer
SerializeRuleKeyword :=
Serialized | NotSerialized
ShareTypeKeyword :=
Shared | Exclusive | SharedAndWake | ExclusiveAndWake
SlaveModeKeyword :=
ControllerInitiated | DeviceInitiated
StopBitsKeyword :=
StopBitsZero | StopBitsOne | StopBitsOnePlusHalf | StopBitsTwo
TransferWidthKeyword :=
Width8Bit | Width16Bit | Width32Bit | Width64Bit | Width128Bit | Width256Bit
TranslationKeyword :=
SparseTranslation | DenseTranslation
TypeKeyword :=
TypeTranslation | TypeStatic
UpdateRuleKeyword :=
Preserve | WriteAsOnes | WriteAsZeros
UserDefRegionSpace :=
IntegerData => 0x80 - 0xFF
XferTypeKeyword :=
ResourceMacroList :=
Nothing | <ResourceMacroTerm ResourceMacroList>
ResourceMacroTerm :=
DMATerm | DWordIOTerm | DWordMemoryTerm | DWordSpaceTerm | EndDependentFnTerm |
ExtendedIOTerm | ExtendedMemoryTerm | ExtendedSpaceTerm | FixedDMATerm | FixedIOTerm |
GpioIntTerm | GpioIOTerm | I2CSerialBusTerm | InterruptTerm | IOTerm | IRQNoFlagsTerm |
IRQTerm | Memory24Term | Memory32FixedTerm | Memory32Term | QWordIOTerm | QWordMemoryTerm |
QWordSpaceTerm | RegisterTerm | SPISerialBusTerm | StartDependentFnTerm |
StartDependentFnNoPriTerm | UARTSerialBusTerm | VendorLongTerm | VendorShortTerm |
WordBusNumberTerm | WordIOTerm | WordSpaceTerm
DMATerm :=
DMA (
DMAType, // DMATypeKeyword (_TYP)
BusMaster, // BusMasterKeyword (_BM)
XferType, // XferTypeKeyword (_SIZ)
DescriptorName // Nothing | NameString
) {ByteList} // List of channels (0-7 bytes)
DWordIOTerm :=
DWordIO (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
RangeType, // Nothing (EntireRange) | RangeTypeKeyword (_RNG)
AddressGranularity, // DWordConstExpr (_GRA)
MinAddress, // DWordConstExpr (_MIN)
MaxAddress, // DWordConstExpr (_MAX)
AddressTranslation, // DWordConstExpr (_TRA)
AddressLength, // DWordConstExpr (_LEN)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName, // Nothing | NameString
TranslationType, // Nothing | TypeKeyword (_TTP)
TranslationDensity // Nothing | TranslationKeyword (_TRS)
)
DWordMemoryTerm :=
DWordMemory (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
MemType, // Nothing (NonCacheable) | MemTypeKeyword (_MEM)
DWordSpaceTerm :=
DWordSpace (
ResourceType, // ByteConstExpr (_RT), 0xC0 – 0xFF
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
TypeSpecificFlags, // ByteConstExpr (_TSF)
AddressGranularity, // DWordConstExpr (_GRA)
MinAddress, // DWordConstExpr (_MIN)
MaxAddress, // DWordConstExpr (_MAX)
AddressTranslation, // DWordConstExpr (_TRA)
AddressLength, // DWordConstExpr (_LEN)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName // Nothing | NameString
)
EndDependentFnTerm :=
EndDependentFn ()
ExtendedIOTerm :=
ExtendedIO (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
RangeType, // Nothing (EntireRange) | RangeTypeKeyword (_RNG)
AddressGranularity, // QWordConstExpr (_GRA)
MinAddress, // QWordConstExpr (_MIN)
MaxAddress, // QWordConstExpr (_MAX)
AddressTranslation, // QWordConstExpr (_TRA)
AddressLength, // QWordConstExpr (_LEN)
TypeSpecificAttributes, // Nothing | QWordConstExpr
DescriptorName, // Nothing | NameString
TranslationType, // Nothing | TypeKeyword (_TTP)
TranslationDensity // Nothing | TranslationKeyword (_TRS)
)
ExtendedMemoryTerm :=
ExtendedMemory (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
MemType, // Nothing (NonCacheable) | MemTypeKeyword (_MEM)
ReadWriteType, // ReadWriteKeyword (_RW)
AddressGranularity, // QWordConstExpr (_GRA)
ExtendedSpaceTerm :=
ExtendedSpace (
ResourceType, // ByteConstExpr (_RT), 0xC0 – 0xFF
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
TypeSpecificFlags, // ByteConstExpr (_TSF)
AddressGranularity, // QWordConstExpr (_GRA)
MinAddress, // QWordConstExpr (_MIN)
MaxAddress, // QWordConstExpr (_MAX)
AddressTranslation, // QWordConstExpr (_TRA)
AddressLength, // QWordConstExpr (_LEN)
TypeSpecificAttributes, // Nothing | QWordConstExpr (_ATT)
DescriptorName // Nothing | NameString
)
FixedDMATerm :=
FixedDMA (
DMAReq, //WordConstExpr (_DMA)
Channel, //WordConstExpr (_TYP)
XferWidth, //Nothing (Width32Bit) | TransferWidthKeyword (_SIZ)
DescriptorName, //Nothing | NameString
)
FixedIOTerm :=
FixedIO (
AddressBase, // WordConstExpr (_BAS)
RangeLength, // ByteConstExpr (_LEN)
DescriptorName // Nothing | NameString
)
GpioIntTerm :=
GpioInt(
InterruptType, // InterruptTypeKeyword (_MOD)
InterruptLevel, // InterruptLevelKeyword (_POL)
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
PinConfig, // PinConfigKeyword | ByteConstExpr (_PPI)
DeBounceTime // Nothing | WordConstExpr (_DBT)
ResourceSource, // StringData
ResourceSourceIndex, // Nothing (0) | ByteConstExpr
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
VendorData // Nothing | RawDataBuffer (_VEN)
) {DWordList} // List of GPIO pins (_PIN)
GpioIOTerm :=
GpioIO (
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
PinConfig, // PinConfigKeyword | ByteConstExpr (_PPIC)
DeBounceTime // Nothing | WordConstExpr (_DBT)
I2CSerialBusTerm :=
I2CSerialBusV2 (
SlaveAddress, // WordConstExpr (_ADR)
SlaveMode, // Nothing (ControllerInitiated) | SlaveModeKeyword (_SLV)
ConnectionSpeed, // DWordConstExpr (_SPE)
AddressingMode, // Nothing (AddressingMode7Bit) | AddressModeKeyword (_MOD)
ResourceSource, // StringData
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
VendorData // Nothing | RawDataBuffer (_VEN)
)
InterruptTerm :=
Interrupt (
ResourceType, // Nothing (ResourceConsumer)| ResourceTypeKeyword
InterruptType, // InterruptTypeKeyword (_LL, _HE)
InterruptLevel, // InterruptLevelKeyword (_LL, _HE)
ShareType, // Nothing (Exclusive) ShareTypeKeyword (_SHR)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName // Nothing | NameString
) {DWordList} // list of interrupts (_INT)
IOTerm :=
IO (
IODecode, // IODecodeKeyword (_DEC)
MinAddress, // WordConstExpr (_MIN)
MaxAddress, // WordConstExpr (_MAX)
Alignment, // ByteConstExpr (_ALN)
RangeLength, // ByteConstExpr (_LEN)
DescriptorName // Nothing | NameString
)
IRQNoFlagsTerm :=
IRQNoFlags (
DescriptorName // Nothing | NameString
) {ByteList} // list of interrupts (0-15 bytes)
IRQTerm :=
IRQ (
InterruptType, // InterruptTypeKeyword (_LL, _HE)
InterruptLevel, // InterruptLevelKeyword (_LL, _HE)
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
DescriptorName // Nothing | NameString
) {ByteList} // list of interrupts (0-15 bytes)
Memory24Term :=
Memory24 (
ReadWriteType, // ReadWriteKeyword (_RW)
MinAddress[23:8], // WordConstExpr (_MIN)
MaxAddress[23:8], // WordConstExpr (_MAX)
Memory32FixedTerm :=
Memory32Fixed (
ReadWriteType, // ReadWriteKeyword (_RW)
AddressBase, // DWordConstExpr (_BAS)
RangeLength, // DWordConstExpr (_LEN)
DescriptorName // Nothing | NameString
)
Memory32Term :=
Memory32 (
ReadWriteType, // ReadWriteKeyword (_RW)
MinAddress, // DWordConstExpr (_MIN)
MaxAddress, // DWordConstExpr (_MAX)
Alignment, // DWordConstExpr (_ALN)
RangeLength, // DWordConstExpr (_LEN)
DescriptorName // Nothing | NameString
)
PinConfigTerm :=
PinConfig (
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
PinConfigType, // ByteData (_TYP)
PinConfigValue, // ByteData (_VAL)
ResourceSource, // StringData
ResourceSourceIndex, // Nothing (0) | ByteConstExpr
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
VendorData // Nothing | RawDataBuffer (_VEN)
) {DWordList} (_PIN)
PinFunctionTerm :=
PinFunction (
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
PinPullConfiguration, // PinConfigKeyword | ByteConstExpr (_PPI)
FunctionNumber, // WordData
ResourceSource, // StringData
ResourceSourceIndex, // Nothing (0) | ByteConstExpr
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
VendorData // Nothing | RawDataBuffer (_VEN)
) {DWordList} (_PIN)
PinGroupTerm :=
PinGroup (
ResourceLabel, // StringData
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
VendorData // Nothing | RawDataBuffer (_VEN)
) {DWordList} (_PIN)
PinGroupConfigTerm :=
PinGroupConfig (
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
PinConfigType, // ByteData (_TYP)
PinConfigValue, // ByteData (_VAL)
ResourceSource, // StringData
ResourceSourceIndex, // Nothing (0) | ByteConstExpr
ResourceSourceLabel, // StringData
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
VendorData // Nothing | RawDataBuffer (_VEN)
PinGroupFunctionTerm :=
PinGroupFunction (
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
FunctionNumber, // WordData (_FUN)
ResourceSource, // StringData
ResourceSourceIndex, // Nothing (0) | ByteConstExpr
ResourceSourceLabel, // StringData
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
VendorData // Nothing | RawDataBuffer (_VEN)
QWordIOTerm :=
QWordIO (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
RangeType, // Nothing (EntireRange) | RangeTypeKeyword (_RNG)
AddressGranularity, // QWordConstExpr (_GRA)
MinAddress, // QWordConstExpr (_MIN)
MaxAddress, // QWordConstExpr (_MAX)
AddressTranslation, // QWordConstExpr (_TRA)
AddressLength, // QWordConstExpr (_LEN)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName, // Nothing | NameString
TranslationType, // Nothing | TypeKeyword (_TTP)
TranslationDensity // Nothing | TranslationKeyword (_TRS)
)
QWordMemoryTerm :=
QWordMemory (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
MemType, // Nothing (NonCacheable) | MemTypeKeyword (_MEM)
ReadWriteType, // ReadWriteKeyword (_RW)
AddressGranularity, // QWordConstExpr (_GRA)
MinAddress, // QWordConstExpr (_MIN)
MaxAddress, // QWordConstExpr (_MAX)
AddressTranslation, // QWordConstExpr (_TRA)
AddressLength, // QWordConstExpr (_LEN)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName, // Nothing | NameString
MemoryRangeType, // Nothing | AddressKeyword (_MTP)
TranslationType // Nothing | TypeKeyword (_TTP)
)
QWordSpaceTerm :=
QWordSpace (
ResourceType, // ByteConstExpr (_RT), 0xC0 – 0xFF
RawDataBufferTerm :=
RawDataBuffer (
(BuffSize) // Nothing | Integer
) {ByteList} => ByteList
RegisterTerm :=
Register (
AddressSpaceID, // AddressSpaceKeyword (_ASI)
RegisterBitWidth, // ByteConstExpr (_RBW)
RegisterOffset, // ByteConstExpr (_RBO)
RegisterAddress, // QWordConstExpr (_ADR)
AccessSize, // ByteConstExpr (_ASZ)
DescriptorName // Nothing | NameString
)
SPISerialBusTerm :=
SPISerialBusV2 (
DeviceSelection, // WordConstExpr (_ADR)
DeviceSelectionPolarity, // Nothing (PolarityLow) | DevicePolarityKeyword (_DPL)
WireMode, // Nothing (FourWireMode) | WireModeKeyword (_MOD)
DataBitLength, // ByteConstExpr (_LEN)
SlaveMode, // Nothing (ControllerInitiated) | SlaveModeKeyword (_SLV)
ConnectionSpeed, // DWordConstExpr (_SPE)
ClockPolarity, // ClockPolarityKeyword (_POL)
ClockPhase, // ClockPhaseKeyword (_PHA)
ResourceSource, // StringData
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
DescriptorName, // Nothing | NameString
ShareType, // Nothing (Exclusive) | ShareTypeKeyword (_SHR)
VendorData // Nothing | RawDataBuffer (_VEN)
)
StartDependentFnNoPriTerm :=
StartDependentFnNoPri () {ResourceMacroList}
StartDependentFnTerm :=
StartDependentFn (
CompatPriority, // ByteConstExpr (0-2)
PerfRobustPriority // ByteConstExpr (0-2)
) {ResourceMacroList}
UARTSerialBusTerm :=
UARTSerialBusV2(
Initial BaudRate, // DwordConstExpr (_SPE)
BitsPerByte, // Nothing (DataBitsEight) | DataBitsKeyword (_LEN)
VendorLongTerm :=
VendorLong (
DescriptorName // Nothing | NameString
) {ByteList}
VendorShortTerm :=
VendorShort (
DescriptorName // Nothing | NameString
) {ByteList} // Up to 7 bytes
WordBusNumberTerm :=
WordBusNumber (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
AddressGranularity, // WordConstExpr (_GRA)
MinAddress, // WordConstExpr (_MIN)
MaxAddress, // WordConstExpr (_MAX)
AddressTranslation, // WordConstExpr (_TRA)
AddressLength, // WordConstExpr (_LEN)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName // Nothing | NameString
)
WordIOTerm :=
WordIO (
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
RangeType, // Nothing (EntireRange) | RangeTypeKeyword (_RNG)
AddressGranularity, // WordConstExpr (_GRA)
MinAddress, // WordConstExpr (_MIN)
MaxAddress, // WordConstExpr (_MAX)
AddressTranslation, // WordConstExpr (_TRA)
AddressLength, // WordConstExpr (_LEN)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName, // Nothing | NameString
TranslationType, // Nothing | TypeKeyword (_TTP)
TranslationDensity // Nothing | TranslationKeyword (_TRS)
)
WordSpaceTerm :=
WordSpace (
ResourceType, // ByteConstExpr (_RT), 0xC0 – 0xFF
ResourceUsage, // Nothing (ResourceConsumer)| ResourceTypeKeyword
Decode, // Nothing (PosDecode) | DecodeKeyword (_DEC)
MinType, // Nothing (MinNotFixed) | MinKeyword (_MIF)
MaxType, // Nothing (MaxNotFixed) | MaxKeyword (_MAF)
TypeSpecificFlags, // ByteConstExpr (_TSF)
AddressGranularity, // WordConstExpr (_GRA)
MinAddress, // WordConstExpr (_MIN)
MaxAddress, // WordConstExpr (_MAX)
AddressTranslation, // WordConstExpr (_TRA)
AddressLength, // WordConstExpr (_LEN)
ResourceSourceIndex, // Nothing | ByteConstExpr
ResourceSource, // Nothing | StringData
DescriptorName // Nothing | NameString
)
The following table lists the name modifiers that can be prefixed to an ASL name.
declare _T_x objects normally (using Name) and must not define them more than once within the
same scope.
19.3.2.1 Integers
DigitChar := ‘0’-‘9’
LeadDigitChar := ‘1’-‘9’
OctalDigitChar := ‘0’-‘7’
HexDigitChar := DigitChar | ‘A’-‘F’ | ‘a’-‘f’
Numeric constants can be specified in decimal, octal, or hexadecimal. Octal constants are preceded
by a leading zero (0), and hexadecimal constants are preceded by a leading zero and either a lower or
upper case ‘x’. In some cases, the grammar specifies that the number must evaluate to an integer
within a limited range, such as 0x00–0xFF, and so on.
19.3.2.2 Strings
String := ‘”’ Utf8CharList ‘”’
Utf8CharList := Nothing | <EscapeSequence Utf8CharList> | <Utf8Char Utf8CharList>
Utf8Char := 0x01-0x21 |
0x23-0x5B |
0x5D-0x7F |
0xC2-0xDF 0x80-0xBF |
0xE0 0xA0-0xBF 0x80-0xBF |
0xE1-0xEC 0x80-0xBF 0x80-0xBF |
0xED 0x80-0x9F 0x80-0xBF |
0xEE-0xEF 0x80-0xBF 0x80-0xBF |
0xF0 0x90-0xBF 0x80-0xBF 0x80-0xBF |
0xF1-0xF3 0x80-0xBF 0x80-0xBF 0x80-0xBF |
0xF4 0x80-0x8F 0x80-0xBF 0x80-0xBF
EscapeSeq := SimpleEscapeSeq | OctalEscapeSeq | HexEscapeSeq
SimpleEscapeSeq := \' | \" | \a | \b | \f | \n | \r | \t | \v | \\
OctalEscapeSeq := \ OctalDigitChar |
\ OctalDigitChar OctalDigitChar |
\ OctalDigitChar OctalDigitChar OctalDigitChar
HexEscapeSeq := \x HexDigitChar |
\x HexDigitChar HexDigitChar
NullChar := 0x00
String literals consist of zero or more ASCII characters surrounded by double quotation marks ("). A
string literal represents a sequence of characters that, taken together, form a null-terminated string.
After all adjacent strings in the constant have been concatenated, a null character is appended.
Strings in the source file may be encoded using the UTF-8 encoding scheme as defined in the
Unicode 4.0 specification. UTF-8 is a byte-oriented encoding scheme, where some characters take a
single byte and others take multiple bytes. The ASCII character values 0x01-0x7F take up exactly
one byte.
However, only one operator currently supports UTF-8 strings: Unicode. Since string literals are
defined to contain only non-null character values, both Hex and Octal escape sequence values must
be non-null values in the ASCII range 0x01 through 0xFF. For arbitrary byte data (outside the range
of ASCII values), the Buffer object should be used instead.
Since the backslash is used as the escape character and also the namespace root prefix, any string
literals that are to contain a fully qualified namepath from the root of the namespace must use the
double backslash to indicate this:
Name (_EJD, ”\\_SB.PCI0.DOCK1”)
Since literal strings are read-only constants, the following ASL statement (for example) is not
supported:
Store (“ABC”, ”DEF”)
automatically generates an End descriptor and calculates the checksum for the resource template.
The format for the ResourceTemplate macro is as follows:
ResourceTemplate ()
{
// List of resource macros
}
The following is an example of how these macros can be used to create a resource template that can
be returned from a _PRS control method:
Name (PRS0, ResourceTemplate ()
{
StartDependentFn (1, 1)
{
IRQ (Level, ActiveLow, Shared) {10, 11}
DMA (TypeF, NotBusMaster, Transfer16) {4}
IO (Decode16, 0x1000, 0x2000, 0, 0x100)
IO (Decode16, 0x5000, 0x6000, 0, 0x100, IO1)
}
StartDependentFn (1, 1)
{
IRQ (Level, ActiveLow, Shared) {}
DMA (TypeF, NotBusMaster, Transfer16){5}
IO (Decode16, 0x3000, 0x4000, 0, 0x100)
IO (Decode16, 0x5000, 0x6000, 0, 0x100, IO2)
}
EndDependentFn ()
})
The resource template macros for each of the resource descriptors are listed below, after the table
that defines the resource descriptor. The resource template macros are formally defined in
Section 6.4.1, “ASL Macros for Resource Descriptors.”
The reserved names (such as _MIN and _MAX) for the fields of each resource descriptor are defined
in the appropriate table entry of the table that defines that resource descriptor.
Object Reference Reference to an object created using the RefOf, Index, or CondRefOf operators
Operation Region Operation Region (A region within an Address Space)
Package Collection of ASL objects with a fixed number of elements (up to 255).
Power Resource Power Resource description object
Processor Processor description object
RawDataBuffer An array of bytes. Uninitialized elements are zero by default. RawDataBuffer does
not contain any AML encoding bytes, only the raw bytes.
String Null-terminated ASCII string.
Thermal Zone Thermal Zone description object
Note: (Compatibility Note) The ability to store and manipulate object references was first introduced in
ACPI 2.0. In ACPI 1.0 references could not be stored in variables, passed as parameters or
returned from functions.
CopyObject
Explicitly store a copy of the operand object to the target name. No implicit type
conversion is performed. (This operator is used to avoid the implicit conversion
inherent in the ASL Store operator.)
An implicit source conversion will be attempted anytime a source operand contains a data type that
is different that the type expected by the operator. For example:
Store (“5678”, Local1)
Add (0x1234, Local1, BUF1)
In the Add statement above, Local1 contains a String object and must undergo conversion to an
Integer object before the Add operation can proceed.
In some cases, the operator may take more than one type of operand (such as Integer and String). In
this case, depending on the type of the operand, the highest priority conversion is applied. The table
below describes the source operand conversions available. For example:
Store (Buffer (1) {}, Local0)
Name (ABCD, Buffer (10) {1, 2, 3, 4, 5, 6, 7, 8, 9, 0})
CreateDWordField (ABCD, 2, XYZ)
Name (MNOP, ”1234”)
Concatenate (XYZ, MNOP, Local0)
The Concatenate operator can take an Integer, Buffer or String for its first two parameters and the
type of the first parameter determines how the second parameter will be converted. In this example,
the first parameter is of type Buffer Field (from the CreateDWordField operator). What should it be
converted to: Integer, Buffer or String? According to Table 19-408, the highest priority conversion
is to Integer. Therefore, both of the following objects will be converted to Integers:
XYZ (0x05040302)
MNOP (0x31, 0x32, 0x33, 0x34)
And will then be joined together and the resulting type and value will be:
Buffer (0x02, 0x03, 0x04, 0x05, 0x31, 0x32, 0x33, 0x34)
Since BUF1 is a named object of fixed type Buffer, the Integer result of the Add operation must be
converted to a Buffer before it is stored into BUF1.
To convert To an object
from an of this Data This action is performed by the AML Interpreter:
object of this Type
Data Type
Field Unit [See the If the Field Unit is smaller than or equal to the size of an Integer (in bits), it
Integer and will be treated as an Integer. If the Field Unit is larger than the size of an
Buffer Rules] Integer, it will be treated as a Buffer. The size of an Integer is indicated by
the Definition Block table header’s Revision field. A Revision field value
less than 2 indicates that the size of an Integer is 32 bits. A value greater
than or equal to 2 signifies that the size of an Integer is 64 bits. (See the
conversion rules for the Integer and Buffer data types.)
Integer Buffer If no buffer object exists, a new buffer object is created based on the size of
the integer (4 bytes for 32-bit integers and 8 bytes for 64-bit integers). If a
buffer object already exists, the Integer overwrites the entire Buffer object.
If the integer requires more bits than the size of the Buffer, then the integer
is truncated before being copied to the Buffer. If the integer contains fewer
bits than the size of the buffer, the Integer is zero-extended to fill the entire
buffer.
Buffer Field The Integer overwrites the entire Buffer Field. If the integer is smaller than
the size of the buffer field, it is zero-extended. If the integer is larger than
the size of the buffer field, the upper bits are truncated.
Compatibility Note: This conversion was first introduced in ACPI 2.0. The
behavior in ACPI 1.0 was undefined.
Debug Object The integer is displayed as a hexadecimal value.
Field Unit The Integer overwrites the entire Field Unit. If the integer is smaller than the
size of the buffer field, it is zero-extended. If the integer is larger than the
size of the buffer field, the upper bits are truncated.
String If no string object exists, a new string object is created based on the size of
the integer (8 characters for 32-bit integers and 16 characters for 64-bit
integers). If the string already exists, it is completely overwritten and
truncated or extended to accommodate the converted integer exactly. In
either case, the entire integer is converted to a string of hexadecimal ASCII
characters.
Package Package If no package object exists, a new package object is created. If the package
already exists, it is completely overwritten and truncated or extended to
accommodate the source package exactly. Any and all existing valid (non-
null) package elements of the target package are deleted, and the entire
contents of the source package are copied into the target package.
Debug Object Each element of the package is displayed based on its type.
To convert To an object
from an of this Data This action is performed by the AML Interpreter:
object of this Type
Data Type
String Buffer If no buffer object exists, a new buffer object is created. If a buffer object
already exists, it is completely overwritten. If the string is longer than the
buffer, the string is truncated before copying. If the string is shorter than the
buffer, the remaining buffer bytes are set to zero. In either case, the string
is treated as a buffer, with each ASCII string character copied to one buffer
byte, including the null terminator. A null (zero-length) string will be
converted to a zero-length buffer.
Buffer Field The string is treated as a buffer. If this buffer is smaller than the size of the
buffer field, it is zero extended. If the buffer is larger than the size of the
buffer field, the upper bits are truncated.
Compatibility Note: This conversion was first introduced in ACPI 2.0. The
behavior in ACPI 1.0 was undefined.
Debug Object Each string character is displayed as an ASCII character.
Field Unit Each character of the string is written, starting with the first, to the Field
Unit. If the Field Unit is less than eight bits, then the upper bits of each
character are lost. If the Field Unit is greater than eight bits, then the
additional bits are zeroed.
Integer If no integer object exists, a new integer is created. The integer is initialized
to the value zero and the ASCII string is interpreted as a hexadecimal
constant. Each string character is interpreted as a hexadecimal value (‘0’-
‘9’, ‘A’-‘F’, ‘a’-‘f’), starting with the first character as the most significant digit,
and ending with the first non-hexadecimal character, end-of-string, or when
the size of an integer is reached (8 characters for 32-bit integers and 16
characters for 64-bit integers). Note: the first non-hex character terminates
the conversion without error, and a “0x” prefix is not allowed. Conversion of
a null (zero-length) string to an integer is not allowed.
do not create unnecessary copies of Local1 or Local2. Also, this behavior enables the call-by-
reference semantics of control method invocation.
Description
The AccessAs operator is used within a FieldList to specify the Access Type, Access Attributes, and
Access Length for the remaining FieldUnits within the list (or until another AccessAs operator is
encountered.) It allows FieldUnits to have different access types within a single Field definition.
Supported AccessTypes:
• AnyAcc
• ByteAcc
• WordAcc
• DwordAcc
• QWordAcc
• BufferAcc
Supported simple AccessAttributes (with SMBus synonyms):
• AttribQuick (SMBQuick)
• AttribSendReceive (SMBSendReceive)
• AttribByte (SMBByte)
• AttribWord (SMBWord)
• AttribBlock (SMBBlock)
• AttribProcessCall (SMBProcessCall)
• AttribBlockProcessCall (SMBBlockProcessCall)
Access Attributes that require an AccessLength argument:
• AttribBytes (AccessLength)
• AttribRawBytes (AccessLength)
• AttribRawProcessBytes (AccessLength)
Description
Ownership of the Mutex is obtained. If the Mutex is already owned by a different invocation, the
current execution thread is suspended until the owner of the Mutex releases it or until at least
TimeoutValue milliseconds have elapsed. A Mutex can be acquired more than once by the same
invocation.
Note: For Mutex objects referenced by a _DLM object, the host OS may also contend for ownership.
This operation returns True if a timeout occurred and the mutex ownership was not acquired. A
TimeoutValue of 0xFFFF (or greater) indicates that there is no timeout and the operation will wait
indefinitely.
Description
The operands are added and the result is optionally stored into Result. Overflow conditions are
ignored and the result of overflows simply loses the most significant bits.
Description
Creates a new object named AliasObject that refers to and acts exactly the same as SourceObject.
AliasObject is created as an alias of SourceObject in the namespace. The SourceObject name must
already exist in the namespace. If the alias is to a name within the same definition block, the
SourceObject name must be logically ahead of this definition in the block.
Example
The following example shows the use of an Alias term:
Alias (\SUS.SET.EVEN, SSE)
Description
A bitwise AND is performed and the result is optionally stored into Result.
Description
Up to 7 argument-object references can be passed to a control method. On entry to a control method,
only the argument objects that are passed are usable.
Description
This operator creates data field objects. The contents of the created objects are obtained by a
reference to a bank selection register.
This encoding is used to define named data field objects whose data values are fields within a larger
object selected by a bank-selected register.
Example
The following is a block of ASL sample code using BankField:
• Creates a 4-bit bank-selected register in system I/O space.
• Creates overlapping fields in the same system I/O space that are selected via the bank register.
//
// Define a 256-byte operational region in SystemIO space
// and name it GIO0
Description
Break causes execution to continue immediately following the innermost enclosing While or
Switch scope, in the current Method. If there is no enclosing While or Switch within the current
Method, a fatal error is generated.
Compatibility Note: In ACPI 1.0, the Break operator continued immediately following the
innermost “code package.” Starting in ACPI 2.0, the Break operator was changed to exit the
innermost “While” or “Switch” package. This should have no impact on existing code, since the
ACPI 1.0 definition was, in practice, useless.
Description
Used for debugging, the Breakpoint opcode stops the execution and enters the AML debugger. In
the non-debug version of the AML interpreter, BreakPoint is equivalent to Noop.
Description
The optional BufferSize argument specifies the size of the buffer and an optional initial value of the
buffer is specified via the Initializer. The initial value can be either an ASCII String or a list of byte
values separated by commas. Strings are automatically null terminated with a single zero byte.
The relationship between the BufferSize and the Initializer is summarized by the rules below.
In the typical case, the BufferSize is identical to the length of the Initializer:
If the BufferSize is not specified, the length of the Initializer is used as the buffer size:
If the BufferSize is larger than the length of the Initializer, the BufferSize is used as the final buffer
size. At runtime, the AML interpreter will automatically pad zeros to the Initializer to match the
BufferSize:
If the BufferSize is smaller than the length of the Initializer, the length of the Initializer is used as the
buffer size:
If the Initializer is not specified, the AML interpreter creates a buffer containing all zeros, the length
of which matches the BufferSize:
If neither the BufferSize nor the Initializer are specified, a buffer of zero length is created:
Description
Execute code based upon the value of a Switch statement.
If the Case Value is an Integer, Buffer or String, then control passes to the statement that matches the
value of the enclosing Switch (Value). If the Case value is a Package, then control passes if any
member of the package matches the Switch (Value). The Switch CaseTermList can include any
number of Case instances, but no two Case Values (or members of a Value, if Value is a Package)
within the same Switch statement can contain the same value.
Execution of the statement body begins at the start of the TermList and proceeds until the end of the
TermList body or until a Break or Continue operator transfers control out of the body.
Description
Source2 is concatenated to Source1 and the result data is optionally stored into Result.
For the Source1/Integer case, a String or Buffer that cannot be implicitly converted to an Integer will
generate a fatal error.
Examples
Device (DEVX) {}
Name (PKGX, Package () {1,2,3,"Battery1"})
Method (MTHX, 2)
{
Concatenate ("My Object: ", DEVX, Debug) // MyObject: Device
Description
The resource descriptors from Source2 are appended to the resource descriptors from Source1. Then
a new end tag and checksum are appended and the result is stored in Result, if specified. If either
Source1 or Source2 is exactly 1 byte in length, a run-time error occurs. An empty buffer is treated as
a resource template with only an end tag.
Description
On success, the Destination object is set to refer to Source and the execution result of this operation
is the value True. On failure, Destination is unchanged and the execution result of this operation is
the value False. This can be used to reference items in the namespace that may appear dynamically
(for example, from a dynamically loaded definition block).
CondRefOf is equivalent to RefOf except that if the Source object does not exist, it is fatal for
RefOf but not for CondRefOf.
Examples
OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100)// GenericSerialBus device at command value
offset zero
Description
The Connection macro declares the connection attributes for subsequent fields defined within the
Field declaration.
Description
Continue causes execution to continue at the start of the innermost enclosing While scope, in the
currently executing Control Method, at the point where the condition is evaluated. If there is no
enclosing While within the current Method, a fatal error is generated.
Description
If Destination is already an initialized object of type DataRefObject, the original contents of
Destination are discarded and replaced with Source. Otherwise, a fatal error is generated.
Note: (Compatibility Note) The CopyObject operator was first introduced new in ACPI 2.0.
Description
A new buffer field object named BitFieldName is created for the bit of SourceBuffer at the bit index
of BitIndex. The bit-defined field within SourceBuffer must exist.BitFieldName is created for the bit
of SourceBuffer at the bit index of BitIndex. The bit-defined field within SourceBuffer must exist.
Description
A new buffer field object named ByteFieldName is created for the byte of SourceBuffer at the byte
index of ByteIndex. The byte-defined field within SourceBuffer must exist.
Description
A new buffer field object named DWordFieldName is created for the DWord of SourceBuffer at the
byte index of ByteIndex. The DWord-defined field within SourceBuffer must exist.
Description
A new buffer field object named FieldName is created for the bits of SourceBuffer at BitIndex for
NumBits. The entire bit range of the defined field within SourceBuffer must exist. If NumBits
evaluates to zero, a fatal exception is generated.
Description
A new buffer field object named QWordFieldName is created for the QWord of SourceBuffer at the
byte index of ByteIndex. The QWord-defined field within SourceBuffer must exist.
Description
A new bufferfield object named WordFieldName is created for the word of SourceBuffer at the byte
index of ByteIndex. The word-defined field within SourceBuffer must exist.
Arguments
Creates a new region named RegionName. SignatureString, OemIDString and OemTableIDString
are evaluated as strings.
Description
A Data Table Region is a special Operation Region whose RegionSpace is SystemMemory. Any
table referenced by a Data Table Region must be in memory marked by AddressRangeReserved or
AddressRangeNVS.
The memory referred to by the Data Table Region is the memory that is occupied by the table
referenced in XSDT that is identified by SignatureString, OemIDString and OemTableIDString.
Any Field object can reference RegionName
The base address of a Data Table region is the address of the first byte of the header of the table
identified by SignatureString, OemIDString and OemTableIDString. The length of the region is the
length of the table.
Description
The debug data object is a virtual data object. Writes to this object provide debugging information.
On at least debug versions of the interpreter, any writes into this object are appropriately displayed
on the system’s native kernel debugger. All writes to the debug object are otherwise benign. If the
system is in use without a kernel debugger, then writes to the debug object are ignored. The
following table relates the ASL term types that can be written to the Debug object to the format of
the information on the kernel debugger display.
The Debug object is a write-only object; attempting to read from the debug object is not supported.
Arguments
Minuend is evaluated as an Integer.
Description
This operation decrements the Minuend by one and the result is stored back to Minuend. Equivalent
to Subtract (Minuend, 1, Minuend). Underflow conditions are ignored and the result is Ones.
Description
Within the body of a Switch (page 995) statement, the statements specified by TermList will be
executed if no Case (page 901) statement value matches the Switch statement value. If Default is
omitted and no Case match is found, none of the statements in the Switch body are executed. There
can be at most one Default statement in the immediate scope of the parent Switch statement. The
Default statement can appear anywhere in the body of the Switch statement.
Description
The DefinitionBlock term specifies the unit of data and/or AML code that the OS will load as part of
the Differentiated Definition Block or as part of an additional Definition Block.
This unit of data and/or AML code describes either the base system or some large extension (such as
a docking station). The entire DefinitionBlock will be loaded and compiled by the OS as a single
unit, and can be unloaded by the OS as a single unit.
System software loads a definition block by referencing the objects in the TermList package in order.
The object list is encoded as TermList, so that rather than describing a static object list, it is possible
to describe a dynamic object list according to the system settings. See "Section 5.4.2, Definition
Block Loading."
Note: For compatibility with ACPI versions before ACPI 2.0, the bit width of Integer objects is
dependent on the ComplianceRevision of the DSDT. If the ComplianceRevision is less than 2, all
integers are restricted to 32 bits. Otherwise, full 64-bit integers are used. The version of the DSDT
sets the global integer width for all integers, including integers in SSDTs.
Description
If the Source evaluates to an object reference, the actual contents of the object referred to are
returned. If the Source evaluates to a string, the string is evaluated as an ASL name (relative to the
current scope) and the contents of that object are returned. If the object specified by Source does not
exist then a fatal error is generated. If the object specified is a reference generated by the Index()
operator and refers to an uninitialized package element, then a fatal error is generated.
Note: (Compatibility Note) The use of a String with DerefOf was first introduced in ACPI 2.0.
Description
A Device Package is one of the basic ways the Differentiated Definition Block describes the
hardware devices in the system to the operating software. Each Device Package is defined
somewhere in the hierarchical namespace corresponding to that device’s location in the system.
Within the namespace of the device are other names that provide information and control of the
device, along with any sub-devices that in turn describe sub-devices, and so on.
For any device, the platform runtime firmware provides only information that is added to the device
in a non-hardware standard manner. This type of value-added function is expressible in the ACPI
Definition Block such that operating software can use the function.
The platform runtime firmware supplies Device Objects only for devices that are obtaining some
system-added function outside the device’s normal capabilities and for any Device Object required
to fill in the tree for such a device. For example, if the system includes a PCI device (integrated or
otherwise) with no additional functions such as power management, the platform runtime firmware
would not report such a device; however, if the system included an integrated ISA device below the
integrated PCI device (device is an IS bridge), then the system would include a Device Package for
the ISA device with the minimum feature being added being the ISA device’s ID and configuration
information and the parent PCI device, because it is required to get the ISA Device Package
placement in the namespace correct.
The device object list is encoded as TermList, so that rather than describing a static device object list,
it is possible to describe a dynamic device object list according to the system settings. See
"Section 5.4.2, Definition Block Loading."
Example
The following block of ASL sample code shows a nested use of Device objects to describe an IDE
controller connected to the root PCI bus.
Name (_GTF) {
…
}
}
Device (SLAV) {
Name (_ADR, 1)
Name (_PR0, Package () {0, PIDE})
Name (_GTF) {
…
}
}
}
}
Description
Dividend is divided by Divisor, then the resulting remainder is optionally stored into Remainder and
the resulting quotient is optionally stored into Result. Divide-by-zero exceptions are fatal.
The function return value is the Result (quotient).
Description
The DMA macro evaluates to a buffer which contains a DMA resource descriptor. The format of the
DMA resource descriptor can be found in “DMA Descriptor” (page 384). The macro is designed to
be used inside of a ResourceTemplate (page 988).
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
TranslationType is an optional argument that specifies whether the resource type on the secondary
side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same
(TypeStatic). If TypeTranslation is specified, then the secondary side of the bus is Memory. If
TypeStatic is specified, then the secondary side of the bus is I/O. If nothing is specified, then
TypeStatic is assumed. The 1-bit field DescriptorName._TTP is automatically created to refer to this
portion of the resource descriptor, where ‘1’ is TypeTranslation and ‘0’ is TypeStatic. See _TTP
(page 406) for more information
TranslationDensity is an optional argument that specifies whether or not the translation from the
primary to secondary bus is sparse (SparseTranslation) or dense (DenseTranslation). It is only
used when TranslationType is TypeTranslation. If nothing is specified, then DenseTranslation is
assumed. The 1-bit field DescriptorName._TRS is automatically created to refer to this portion of
the resource descriptor, where ‘1’ is SparseTranslation and ‘0’ is DenseTranslation. See _TRS
(page 406) for more information.
Description
The DWordIO macro evaluates to a buffer which contains a 32-bit I/O range resource descriptor.
The format of the 32-bit I/O range resource descriptor can be found in “DWord Address Space
Descriptor ” (page 398). The macro is designed to be used inside of a ResourceTemplate (page 988).
Cacheable specifies whether or not the memory region is cacheable (Cacheable), cacheable and
write-combining (WriteCombining), cacheable and prefetchable (Prefetchable) or uncacheable
(NonCacheable). If nothing is specified, then NonCacheable is assumed. The 2-bit field
DescriptorName._MEM is automatically created to refer to this portion of the resource descriptor,
where ‘1’ is Cacheable, ‘2’ is WriteCombining, ‘3’ is Prefetchable and ‘0’ is NonCacheable.
ReadAndWrite specifies whether or not the memory region is read-only (ReadOnly) or read/write
(ReadWrite). If nothing is specified, then ReadWrite is assumed. The 1-bit field
DescriptorName._RW is automatically created to refer to this portion of the resource descriptor,
where ‘1’ is ReadWrite and ‘0’ is ReadOnly.
AddressGranularity evaluates to a 32-bit integer that specifies the power-of-two boundary (- 1) on
which the Memory range must be aligned. The 32-bit field DescriptorName._GRA is automatically
created to refer to this portion of the resource descriptor.
AddressMinimum evaluates to a 32-bit integer that specifies the lowest possible base address of the
Memory range. The value must have ‘0’ in all bits where the corresponding bit in
AddressGranularity is ‘1’. For bridge devices which translate addresses, this is the address on the
secondary bus. The 32-bit field DescriptorName._MIN is automatically created to refer to this
portion of the resource descriptor.
AddressMaximum evaluates to a 32-bit integer that specifies the highest possible base address of the
Memory range. The value must have ‘0’ in all bits where the corresponding bit in
AddressGranularity is ‘1’. For bridge devices which translate addresses, this is the address on the
secondary bus. The 32-bit field DescriptorName._MAX is automatically created to refer to this
portion of the resource descriptor.
AddressTranslation evaluates to a 32-bit integer that specifies the offset to be added to a secondary
bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge
devices or bridges which do not perform translation, this must be ‘0’. The 32-bit field
DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.
RangeLength evaluates to a 32-bit integer that specifies the total number of bytes decoded in the
Memory range. The 32-bit field DescriptorName._LEN is automatically created to refer to this
portion of the resource descriptor.
ResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the
resource descriptor within the object specified by ResourceSource. If this argument is specified, the
ResourceSource argument must also be specified.
ResourceSource is an optional argument which evaluates to a string containing the path of a device
which produces the pool of resources from which this Memory range is allocated. If this argument is
specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
MemoryRangeType is an optional argument that specifies the memory usage. The memory can be
marked as normal (AddressRangeMemory), used as ACPI NVS space (AddressRangeNVS), used
as ACPI reclaimable space (AddressRangeACPI) or as system reserved
(AddressRangeReserved). If nothing is specified, then AddressRangeMemory is assumed. The 2-
bit field DescriptorName._MTP is automatically created in order to refer to this portion of the
Description
The DWordMemory macro evaluates to a buffer which contains a 32-bit memory resource
descriptor. The format of the 32-bit memory resource descriptor can be found in “DWord Address
Space Descriptor ” (page 398). The macro is designed to be used inside of a ResourceTemplate
(page 988).
Description
The DWordSpace macro evaluates to a buffer which contains a 32-bit Address Space resource
descriptor. The format of the 32-bit Address Space resource descriptor can be found in “DWord
Address Space Descriptor ” (page 398). The macro is designed to be used inside of a
ResourceTemplate (page 988).
Arguments
The EisaIdString must be a String object of the form “UUUNNNN”, where “U” is an uppercase
letter and “N” is a hexadecimal digit. No asterisks or other characters are allowed in the string.
Description
Converts EisaIdString, a 7-character text string argument, into its corresponding 4-byte numeric
EISA ID encoding. It can be used when declaring IDs for devices that have EISA IDs.
Example
EISAID (“PNP0C09”) // This is a valid invocation of the macro.
Description
If Predicate evaluates to 0 in an If statement, then control is transferred to the Else portion, which
can consist of zero or more ElseIf statements followed by zero or one Else statements. If the
Predicate of any ElseIf statement evaluates to non-zero, the statements in its term list are executed
and then control is transferred past the end of the final Else term. If no Predicate evaluates to non-
zero, then the statements in the Else term list are executed.
Example
The following example checks Local0 to be zero or non-zero. On non-zero, CNT is incremented;
otherwise, CNT is decremented.
If (LGreater (Local0, 5)
{
Increment (CNT)
} Else If (Local0) {
Add (CNT, 5, CNT)
}
Else
{
Decrement (CNT)
}
Arguments
Predicate is evaluated as an Integer.
Description
If the Predicate of any ElseIf statement evaluates to non-zero, the statements in its term list are
executed and then control is transferred past the end of the final Else. If no Predicate evaluates to
non-zero, then the statements in the Else term list are executed.
Note: (Compatibility Note) The ElseIf operator was first introduced in ACPI 2.0, but is backward
compatible with the ACPI 1.0 specification. An ACPI 2.0 and later ASL compiler must synthesize
ElseIf from the If. and Else opcodes available in 1.0. For example:
If (predicate1)
{
…statements1…
}
ElseIf (predicate2)
{
…statements2…
}
Else
{
…statements3…
}
Description
The EndDependentFn macro generates an end-of-dependent-function resource descriptor buffer
inside of an ResourceTemplate (page 988). It must be matched with a StartDependentFn (page 993)
or StartDependentFnNoPri (page 994) macro.
Description
For more information about the uses of an event synchronization object, see the ASL definitions for
the Wait, Signal, and Reset function operators.
‘1’. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit
field DescriptorName._MIN is automatically created to refer to this portion of the resource
descriptor.
AddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the
I/O range. The value must have ‘0’ in all bits where the corresponding bit in AddressGranularity is
‘1’. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit
field DescriptorName._MAX is automatically created to refer to this portion of the resource
descriptor.
AddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary
bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge
devices or bridges which do not perform translation, this must be ‘0’. The 64-bit field
DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.
RangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the I/O
range. The 64-bit field DescriptorName._LEN is automatically created to refer to this portion of the
resource descriptor.
TypeSpecificAttributes is an optional argument that specifies attributes specific to this resource type.
See Section 6.4.3.5.4.1,”Type Specific Attributes”.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operatorsDescription
The ExtendedIO macro evaluates to a buffer which contains a 64-bit I/O resource descriptor, which
describes a range of I/O addresses. The format of the 64-bit I/O resource descriptor can be found in
“Extended Address Space Descriptor” (page 389). The macro is designed to be used inside of a
ResourceTemplate (page 988).
TranslationType is an optional argument that specifies whether the resource type on the secondary
side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same
(TypeStatic). If TypeTranslation is specified, then the secondary side of the bus is Memory. If
TypeStatic is specified, then the secondary side of the bus is I/O. If nothing is specified, then
TypeStatic is assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to
this portion of the resource descriptor, where ‘1’ is TypeTranslation and ‘0’ is TypeStatic. See _TTP
(page 406) for more information
TranslationDensity is an optional argument that specifies whether or not the translation from the
primary to secondary bus is sparse (SparseTranslation) or dense (DenseTranslation). It is only
used when TranslationType is TypeTranslation. If nothing is specified, then DenseTranslation is
assumed. The 1-bit field DescriptorName._TRS is automatically created to refer to this portion of
the resource descriptor, where ‘1’ is SparseTranslation and ‘0’ is DenseTranslation. See _TRS
(page 406) for more information.
secondary bus. The 64-bit field DescriptorName ._MAX is automatically created to refer to this
portion of the resource descriptor.
AddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary
bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge
devices or bridges which do not perform translation, this must be ‘0’. The 64-bit field
DescriptorName. _TRA is automatically created to refer to this portion of the resource descriptor.
RangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the
Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this
portion of the resource descriptor.
TypeSpecificAttributes is an optional argument that specifies attributes specific to this resource type.
See Section 6.4.3.5.4.1,”Type Specific Attributes”.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
MemoryRangeType is an optional argument that specifies the memory usage. The memory can be
marked as normal (AddressRangeMemory), used as ACPI NVS space (AddressRangeNVS), used
as ACPI reclaimable space (AddressRangeACPI) or as system reserved
(AddressRangeReserved). If nothing is specified, then AddressRangeMemory is assumed. The 2-
bit field DescriptorName. _MTP is automatically created in order to refer to this portion of the
resource descriptor, where ‘0’ is AddressRangeMemory, ‘1’ is AddressRangeReserved, ‘2’ is
AddressRangeACPI and ‘3’ is AddressRangeNVS.
TranslationType is an optional argument that specifies whether the resource type on the secondary
side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same
(TypeStatic). If TypeTranslation is specified, then the secondary side of the bus is I/O. If TypeStatic
is specified, then the secondary side of the bus is I/O. If nothing is specified, then TypeStatic is
assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to this portion of
the resource descriptor, where ‘1’ is TypeTranslation and ‘0’ is TypeStatic. See _TTP (page 406) for
more information.
Description
The ExtendedMemory macro evaluates to a buffer which contains a 64-bit memory resource
descriptor, which describes a range of memory addresses. The format of the 64-bit memory resource
descriptor can be found in “Extended Address Space Descriptor” (page 402). The macro is designed
to be used inside of a ResourceTemplate (page 988).
Arguments
ResourceType evaluates to an 8-bit integer that specifies the type of this resource. Acceptable values
are 0xC0 through 0xFF.
ResourceUsage specifies whether the Memory range is consumed by this device
(ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified,
then ResourceConsumer is assumed.
Decode specifies whether or not the device decodes the Memory range using positive (PosDecode)
or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit
field DescriptorName. _DEC is automatically created to refer to this portion of the resource
descriptor, where ‘1’ is SubDecode and ‘0’ is PosDecode.
IsMinFixed specifies whether the minimum address of this Memory range is fixed (MinFixed) or
can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit
field DescriptorName. _MIF is automatically created to refer to this portion of the resource
descriptor, where ‘1’ is MinFixed and ‘0’ is MinNotFixed.
IsMaxFixed specifies whether the maximum address of this Memory range is fixed (MaxFixed) or
can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit
field DescriptorName. _MAF is automatically created to refer to this portion of the resource
descriptor, where ‘1’ is MaxFixed and ‘0’ is MaxNotFixed.
TypeSpecificFlags evaluates to an 8-bit integer. The flags are specific to the ResourceType.
AddressGranularity evaluates to a 64-bit integer that specifies the power-of-two boundary (- 1) on
which the Memory range must be aligned. The 64-bit field DescriptorName. _GRA is automatically
created to refer to this portion of the resource descriptor.
AddressMinimum evaluates to a 64-bit integer that specifies the lowest possible base address of the
Memory range. The value must have ‘0’ in all bits where the corresponding bit in
AddressGranularity is ‘1’. For bridge devices which translate addresses, this is the address on the
secondary bus. The 64-bit field DescriptorName._MIN is automatically created to refer to this
portion of the resource descriptor.
AddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the
Memory range. The value must have ‘0’ in all bits where the corresponding bit in
AddressGranularity is ‘1’. For bridge devices which translate addresses, this is the address on the
secondary bus. The 64-bit field DescriptorName._MAX is automatically created to refer to this
portion of the resource descriptor.
AddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary
bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge
devices or bridges which do not perform translation, this must be ‘0’. The 64-bit field
DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.
RangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the
Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this
portion of the resource descriptor.
TypeSpecificAttributes is an optional argument that specifies attributes specific to this resource type.
See Section 6.4.3.5.4.1,”Type Specific Attributes”.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The ExtendedSpace macro evaluates to a buffer which contains a 64-bit Address Space resource
descriptor, which describes a range of addresses. The format of the 64-bit AddressSpace descriptor
can be found in “Extended Address Space Descriptor” (page 402). The macro is designed to be used
inside of a ResourceTemplate (page 988).
Example
This example shows the use of External in conjunction with Scope within an SSDT:
Scope (\_SB.PCI0)
{
}
}
Description
In response, the OS must log the fatal event and perform a controlled OS shutdown in a timely
fashion.
FieldUnitList is a variable-length list of individual field unit definitions, separated by commas. Each
entry in the field unit list is one of the following:
FieldUnitName is the ACPI name for the field unit (1 to 4 characters), and BitLength is the length of
the field unit in bits. Offset is used to specify the byte offset of the next defined field unit. This can
be used instead of defining the bit lengths that need to be skipped. AccessAs is used to define the
access type and attributes for the remaining field units within the list. Connection is used to identify
the connection resource of the field access. This is necessary for GenericSerialBus and
GeneralPurposeIO operation region address spaces only.
Description
Declares a series of named data objects whose data values are fields within a larger object. The fields
are parts of the object named by RegionName, but their names appear in the same scope as the Field
term.
For example, the field operator allows a larger operation region that represents a hardware register to
be broken down into individual bit fields that can then be accessed by the bit field names. Extracting
and combining the component field from its parent is done automatically when the field is accessed.
When reading from a FieldUnit, returned values are normalized (shifted and masked to the proper
length.) The data type of an individual FieldUnit can be either a Buffer or an Integer, depending on
the bit length of the FieldUnit. If the FieldUnit is smaller than or equal to the size of an Integer (in
bits), it will be treated as an Integer. If the FieldUnit is larger than the size of an Integer, it will be
treated as a Buffer. The size of an Integer is indicated by the DSDT header’s Revision field. A
revision less than 2 indicates that the size of an Integer is 32 bits. A value greater than or equal to 2
signifies that the size of an Integer is 64 bits. For more information about data types and FieldUnit
type conversion rules, see Section 19.3.5.7, “Data Type Conversion Rules”.
Accessing the contents of a field data object provides access to the corresponding field within the
parent object. If the parent object supports Mutex synchronization, accesses to modify the
component data objects will acquire and release ownership of the parent object around the
modification.
The following table relates region types declared with an OperationRegion term to the different
access types supported for each region.
The named FieldUnit data objects are provided in the FieldList as a series of names and bit widths.
Bits assigned no name (or NULL) are skipped. The ASL compiler supports the Offset (ByteOffset)
macro within a FieldList to skip to the bit position of the supplied byte offset, and the AccessAs
macro to change access within the field list.
GenericSerialBus, SMBus and IPMI regions are inherently non-linear, where each offset within the
respective address space represents a variable sized (0 to 32 bytes) field. Given this uniqueness,
these operation regions include restrictions on their field definitions and require the use of a region-
specific data buffer when initiating transactions. For more information on the SMBus data buffer
format, see Section 13, “ACPI System Management Bus Interface Specification,”. For more
information on the IPMI data buffer format, see Section 5.5.2.4.4, “Declaring IPMI Operation
Regions". For more information on the Generic Serial Bus data buffer format, see Section 5.5.2.4.6
"Declaring Generic Serial Bus Operation Regions."
For restrictions on the use of Fields with GeneralPurposeIO OpRegions, see Section 5.5.2.4.5,
"Declaring General PurposeIO Operation Regions".
Example
OperationRegion (MIOC, PCI_Config, Zero, 0xFF)
Field (MIOC, AnyAcc, NoLock, Preserve)
{
Offset (0x58),
HXGB, 32,
HXGT, 32,
GAPE, 8,
MR0A, 4,
MR0B, 4
}
Description
The one-based bit location of the first MSb (most significant set bit) is optionally stored into Result.
The result of 0 means no bit was set, 1 means the left-most bit set is the first bit, 2 means the left-
most bit set is the second bit, and so on.
Description
The one-based bit location of the most LSb (least significant set bit) is optionally stored in Result.
The result of 0 means no bit was set, 32 means the first bit set is the thirty-second bit, 31 means the
first bit set is the thirty-first bit, and so on.
128Bit or Width256Bit. If not specified, Width32Bit is assumed. The bit field name _SIZ is
automatically created to refer to this portion of the resource descriptor.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The FixedDMA macro evaluates to a buffer that contains a Fixed DMA Descriptor (Section 6.4.3).
Description
The FixedIO macro evaluates to a buffer which contains a fixed I/O resource descriptor. The format
of the fixed I/O resource descriptor can be found in “Fixed Location I/O Port Descriptor ”
(page 387). The macro is designed to be used inside of a ResourceTemplate (page 988).
Description
For is a macro that creates a loop by converting the input arguments to the equivalent ASL While
loop.
Note: Creation of a named object more than once in a given scope is not allowed. As such,
unconditionally creating named objects within a For loop must be avoided. A fatal error will be
generated on the second iteration of the loop, during the attempt to create the same named object a
second time.
Example
The following example shows the use of the For macro to create a loop, followed by the equivalent
While loop that is actually emitted by the ASL compiler:
for (local0 = 0, local0 < 8, local0++)
{
}
Local0 = 0
While (Local0 < 8)
{
Local0++
}
Description
Fprintf is a macro that converts the evaluated FormatString into a series of string Concatenate
operations, storing the result in Destination
Example
The following ASL example uses Fprintf to write a formatted string of Arg0 and Arg1 to the Named
Object STR1.
Fprintf (STR1, "%o: %o Successful", Arg1, Arg0)
Description
The FromBCD operation is used to convert BCDValue to a numeric format and store the numeric
value into Result.
Description
Function declares a named package containing a series of terms that collectively represent a control
method. A control method is a procedure that can be invoked to perform computation. Function
opens a name scope.
System software executes a control method by executing the terms in the package in order. For more
information on method execution, see Section 5.5.2, “Control Method Execution.”
The current namespace location used during name creation is adjusted to be the current location on
the namespace tree. Any names created within this scope are “below” the name of this package. The
current namespace location is assigned to the method package, and all namespace references that
occur during control method execution for this package are relative to that location.
Functions are equivalent to a Method that specifies NotSerialized. As such, a function should not
create any named objects, since a second thread that might re-enter the function will cause a fatal
error if an attempt is made to create the same named object twice.
Example
The following block of ASL sample code shows the use of Function for defining a control method:
Function (EXAM, IntObj, {StrObj, {IntObj, StrObj}})
{
Name (Temp,””)
Store (Arg0, Temp) // could have used Arg1
Return (SizeOf (Concatenate (Arg1, Temp)))
}
ResourceSource is a string which uniquely identifies the GPIO controller referred to by this
descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that
utilizes the namespace search rules.
ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.
ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte
data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to
this portion of the resource descriptor.
PinList is a list of (zero-based) pin numbers on the ResourceSource that are described by this
descriptor. For interrupt pin descriptors, only one pin is allowed. The bit field name _PIN is
automatically created to refer to this portion of the resource descriptor.
Description
The GpioInt macro evaluates to a buffer that contains a GPIO Interrupt Connection resource
descriptor. The format of the GPIO Interrupt Connection resource descriptor can be found in "GPIO
Connection Descriptor" (Section 6.4.3.8.1). The macro is designed to be used inside of a Resource
Template (Section 19.3.3).
been disconnected by the driver. If not specified, IoRestrictionNone is assumed. The bit field name
_IOR is automatically created to refer to this portion of the resource descriptor.
ResourceSource is a string which uniquely identifies the GPIO controller referred to by this
descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that
utilizes the namespace search rules.
ResourceSourceIndex is an optional argument and is always 0 for this revision.
ResourceUsage is an optional argument and is always ResourceConsumer for this revision.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte
data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to
this portion of the resource descriptor.
PinList is a list of pin numbers on the ResourceSource that are described by this descriptor. The bit
field name _PIN is automatically created to refer to this portion of the resource descriptor.
Description
The GpioIo macro evaluates to a buffer that contains a GPIO IO Connection resource descriptor.
The format of the GPIO IO Connection resource descriptor can be found in "GPIO Connection
Descriptor" (Section 6.4.3.8.1). The macro is designed to be used inside of a Resource Template
(Section 19.3.3).
ResourceSource is a string which uniquely identifies the I2C bus controller referred to by this
descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that
utilizes the namespace search rules.
ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.
ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Shared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is
assumed. The bit field name _SHR is automatically created to refer to this portion of the resource
descriptor.
VendorData is an optional argument that specifies an object to be decoded by the OS driver. It is a
RawDataBuffer. The bit field name _VEN is automatically created to refer to this portion of the
resource descriptor.
Description
The I2CSerialBusV2 macro evaluates to a buffer that contains an I2C Serial Bus resource descriptor
(Version 2). The macro is designed to be used inside of a ResourceTemplate (see Section 19.3.3).
Description
If the Predicate is non-zero, the term list of the If term is executed.
Example
The following examples all check for bit 3 in Local0 being set, and clear it if set.
// example 1
// example 2
Description
Include another file that contains ASL terms to be inserted in the current file of ASL terms. The file
must contain elements that are grammatically correct in the current scope.
Example
Include ("dataobj.asl")
Description
Add one to the Addend and place the result back in Addend. Equivalent to Add (Addend, 1,
Addend). Overflow conditions are ignored and the result of an overflow is zero.
Description
When Source evaluates to a Buffer, Index returns a reference to a Buffer Field containing the nth
byte in the buffer. When Source evaluates to a String, Index returns a reference to a Buffer Field
containing the nth character in the string. When Source evaluates to a Package, Index returns a
reference to the nth object in the package.
Note: DeRefOf is necessary in the first operand of the Store operator in order to get the actual object,
rather than just a reference to the object. If DeRefOf were not used, then Local0 would contain an
object reference to the sixth element in the first package rather than the number 1.
The Index operator returns a reference to an 8-bit Buffer Field (similar to that created using
CreateByteField).
If Source is evaluated to a buffer data type, the ObjectReference refers to the byte at Index within
Source. If Source is evaluated to a buffer data type, a Store operation will only change the byte at
Index within Source.
The following example ASL code shows the results of a series of Store operations:
Name (SRCB, Buffer () {0x10, 0x20, 0x30, 0x40})
Name (BUFF, Buffer () {0x1, 0x2, 0x3, 0x4})
The following will store 0x78 into the 3rd byte of the destination buffer:
Store (0x12345678, Index (BUFF, 2))
The following will store 0x10 into the 2nd byte of the destination buffer:
Store (SRCB, Index (BUFF, 1))
The following will store 0x41 (an ‘A’) into the 4th byte of the destination buffer:
Store (“ABCDEFGH”, Index (BUFF, 3))
Note: (Compatibility Note) First introduced in ACPI 2.0. In ACPI 1.0, the behavior of storing data larger
than 8-bits into a buffer using Index was undefined.
The Index operator returns a reference to an 8-bit Buffer Field (similar to that created using
CreateByteField).
Arguments
ResourceUsage describes whether the device consumes the specified interrupt
(ResourceConsumer) or produces it for use by a child device (ResourceProducer). If nothing is
specified, then ResourceConsumer is assumed.
EdgeLevel describes whether the interrupt is edge triggered (Edge) or level triggered (Level). The
field DescriptorName. _HE is automatically created to refer to this portion of the resource
descriptor, where ‘1’ is Edge and ‘0’ is Level.
ActiveLevel describes whether the interrupt is active-high (ActiveHigh) or active-low (ActiveLow).
The field DescriptorName. _LL is automatically created to refer to this portion of the resource
descriptor, where ‘1’ is ActiveHigh and ‘0’ is ActiveLow.
Shared describes whether the interrupt can be shared with other devices (Shared) or not
(Exclusive), and whether it is capable of waking the system from a low-power idle or system sleep
state (SharedAndWake or ExclusiveAndWake). The field DescriptorName. _SHR is
automatically created to refer to this portion of the resource descriptor, where ‘1’ is Shared and ‘0’ is
Exclusive. If nothing is specified, then Exclusive is assumed.
ResourceSourceIndex evaluates to an integer between 0x00 and 0xFF and describes the resource
source index. If it is not specified, then it is not generated. If this argument is specified, the
ResourceSource argument must also be specified.
ResourceSource evaluates to a string which uniquely identifies the resource source. If it is not
specified, it is not generated. If this argument is specified, but the ResourceSourceIndex argument is
not specified, a zero value is assumed.
DescriptorName evaluates to a name string which refers to the entire resource descriptor.
InterruptList is a comma-delimited list on integers, at least one value is required. Each integer
represents a 32-bit interrupt number. At least one interrupt must be defined, and there may be no
duplicates in the list. The field “DescriptorName. _INT” is automatically created to refer to this
portion of the resource descriptor.
Description
The Interrupt macro evaluates to a buffer that contains an interrupt resource descriptor. The format
of the interrupt resource descriptor can be found in Section 6.4.3.6, Extended Interrupt Descriptor.
The macro is designed to be used inside of a ResourceTemplate (page 988).
The interrupt macro uses the ResourceUsage field to distinguish two types of devices, a
ResourceProducer and a ResourceConsumer.
A ResourceProducer represents a device that can forward interrupts from one or more devices to
processors under the OSPM. Usage of ResourceProducer within interrupt macros is undefined and
will be ignored by the OSPM. Declaring interrupt macros as ResourceProducer is not
recommended.
A ResourceConsumer is a device that consumes the interrupts declared in the InterruptList. Most
devices fall under this category and use this method to declare the interrupts that can be generated by
that device. The interrupt descriptors declared as ResourceConsumer, are generated by either the
main interrupt controller described in the MADT or by a device that acts as an “interrupt producer”.
The ResourceSource field is used to make this distinction. If this is omitted, the interrupt numbers in
the InterruptList identify global system interrupts, GSIVs, and these interrupts target the main
interrupt controller described in the MADT (see section 5.2.12). The ResourceSource field may also
provide the name of a device that is an “interrupt producer”. In this case the interrupt numbers in the
InterruptList refer to the private interrupt number space of the indicated an interrupt set of the
“interrupt producer” device.
The ResourceSourceIndex parameter is reserved. If platform specifies that “Interrupt
ResourceSource support” in the Platform-Wide OSC (bit 13 in Table 6-175), this parameter and
must be zero.
The following example illustrates how to specify consumption of a “secondary interrupt”. In this
example, the device SDC0 consumes a secondary interrupt from MUX0, which multiplexes a group
of secondary interrupts lines and generates a single summary interrupt (also referred to as an
“interrupt producer”). The device driver for MUX0 is expected to generate a specific software based
secondary interrupt based on implementation defined details of that device:
Scope(\_SB) {
Device(MUX0){
Name(_HID, EISAID("ACME0F0F")) // vendor specific interrupt combiner
Name(_UID, 0)
Name(_CRS, ResourceTemplate () {
//Register Interface
MEMORY32FIXED(ReadWrite, 0x30000000, 0x200, )
//Summary Interrupt line (GSIV 51)
Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) {51}
})
}
Device(SDC0){
Name(_HID, EISAID("PNP0D40")) // SDA Standard Compliant SD Host Controller
Name(_UID, 0)
Name(_CRS, ResourceTemplate () {
//Register Interface
MEMORY32FIXED(ReadWrite, 0xFF000000, 0x200, )
Description
Creates a series of named data objects whose data values are fields within a larger object accessed by
an index/data-style reference to IndexName and DataName.
This encoding is used to define named data objects whose data values are fields within an index/data
register pair. This provides a simple way to declare register variables that occur behind a typical
index and data register pair.
Accessing the contents of an indexed field data object will automatically occur through the
DataName object by using an IndexName object aligned on an AccessType boundary, with
synchronization occurring on the operation region that contains the index data variable, and on the
Global Lock if specified by LockRule.
The value written to the IndexName register is defined to be a byte offset that is aligned on an
AccessType boundary. For example, if AccessType is DWordAcc, valid index values are 0, 4, 8, etc.
This value is always a byte offset and is independent of the width or access type of the DataName
register.
Example
The following is a block of ASL sample code using IndexField:
Creates an index/data register in system I/O space made up of 8-bit registers.
• Creates a FET0 field within the indexed range.
Method (EX1) {
// Define a 256-byte operational region in SystemIO space
// and name it GIO0
} // End EX1
Description
The Interrupt macro evaluates to a buffer that contains an interrupt resource descriptor. The format
of the interrupt resource descriptor can be found in Section 6.4.3.6, Extended Interrupt Descriptor.
The macro is designed to be used inside of a ResourceTemplate (page 988).
Argument
Decode describes whether the I/O range uses 10-bit decode (Decode10) or 16-bit decode
(Decode16). The field DescriptorName. _DEC is automatically created to refer to this portion of the
resource descriptor, where ‘1’ is Decode16 and ‘0’ is Decode10.
AddressMin evaluates to a 16-bit integer that specifies the minimum acceptable starting address for
the I/O range. It must be an even multiple of AddressAlignment. The field DescriptorName._MIN is
automatically created to refer to this portion of the resource descriptor.
AddressMax evaluates to a 16-bit integer that specifies the maximum acceptable starting address for
the I/O range. It must be an even multiple of AddressAlignment. The field DescriptorName._MAX is
automatically created to refer to this portion of the resource descriptor.
AddressAlignment evaluates to an 8-bit integer that specifies the alignment granularity for the I/O
address assigned. The field DescriptorName. _ALN is automatically created to refer to this portion
of the resource descriptor.
RangeLength evaluates to an 8-bit integer that specifies the number of bytes in the I/O range. The
field DescriptorName. _LEN is automatically created to refer to this portion of the resource
descriptor.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The IO macro evaluates to a buffer which contains an IO resource descriptor. The format of the IO
descriptor can be found in “I/O Port Descriptor” (page 383). The macro is designed to be used inside
of a ResourceTemplate (page 988).
Arguments
EdgeLevel describes whether the interrupt is edge triggered (Edge) or level triggered (Level). The
field DescriptorName. _HE is automatically created to refer to this portion of the resource
descriptor, where ‘1’ is Edge and ActiveHigh and ‘0’ is Level and ActiveLow.
ActiveLevel describes whether the interrupt is active-high (ActiveHigh) or active-low (ActiveLow).
The field DescriptorName. _LL is automatically created to refer to this portion of the resource
descriptor, where ‘1’ is Edge and ActiveHigh and ‘0’ is Level and ActiveLow.
Shared describes whether the interrupt can be shared with other devices (Shared) or not
(Exclusive), and whether it is capable of waking the system from a low-power idle or system sleep
state (SharedAndWake or ExclusiveAndWake). The field DescriptorName. _SHR is
automatically created to refer to this portion of the resource descriptor, where ‘1’ is Shared and ‘0’
is Exclusive. If nothing is specified, then Exclusive is assumed.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
InterruptList is a comma-delimited list of integers in the range 0 through 15, at least one value is
required. There may be no duplicates in the list.
Description
The IRQ macro evaluates to a buffer that contains an IRQ resource descriptor. The format of the
IRQ descriptor can be found in “IRQ Descriptor” ((page 383). The macro produces the three-byte
form of the descriptor. The macro is designed to be used inside of a ResourceTemplate (page 988).
Description
If both values are non-zero, True is returned: otherwise, False is returned.
Description
If the values are equal, True is returned; otherwise, False is returned. For integers, a numeric
compare is performed. For strings and buffers, True is returned only if both lengths are the same and
the result of a byte-wise compare indicates exact equality.
Description
If Source1 is greater than Source2, True is returned; otherwise, False is returned. For integers, a
numeric comparison is performed. For strings and buffers, a lexicographic comparison is performed.
True is returned if a byte-wise (unsigned) compare discovers at least one byte in Source1 that is
numerically greater than the corresponding byte in Source2. False is returned if at least one byte in
Source1 is numerically less than the corresponding byte in Source2. In the case of byte-wise
equality, True is returned if the length of Source1 is greater than Source2, False is returned if the
length of Source1 is less than or equal to Source2.
Description
If Source1 is greater than or equal to Source2, True is returned; otherwise, False is returned.
Equivalent to LNot(LLess()). See the description of the LLess operator.
Description
If Source1 is less than Source2, True is returned; otherwise, False is returned. For integers, a
numeric comparison is performed. For strings and buffers, a lexicographic comparison is performed.
True is returned if a byte-wise (unsigned) compare discovers at least one byte in Source1 that is
numerically less than the corresponding byte in Source2. False is returned if at least one byte in
Source1 is numerically greater than the corresponding byte in Source2. In the case of byte-wise
equality, True is returned if the length of Source1 is less than Source2, False is returned if the length
of Source1 is greater than or equal to Source2.
Arguments
Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1
dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type
of Source1.
Description
If Source1 is less than or equal to Source2, True is returned; otherwise False is returned. Equivalent
to LNot(LGreater()). See the description of the LGreater operator.
Description
If the value is zero True is returned; otherwise, False is returned.
Description
If Source1 is not equal to Source2, True is returned; otherwise False is returned. Equivalent to
LNot(LEqual()).See the description of the LEqual operator.
Definition Block should contain an ACPI DESCRIPTION_HEADER of type SSDT. The Definition
Block must be totally contained within the supplied operation region or operation region field.
OSPM reads this table into memory, the checksum is verified, and then it is loaded into the ACPI
namespace. The DDBHandle parameter is the handle to the Definition Block that can be used to
unload the Definition Block at a future time via the Unload operator.
Description
Performs a run-time load of a Definition Block. Any table referenced by Load must be in memory
marked as AddressRangeReserved or AddressRangeNVS.
The OS can also check the OEM Table ID and Revision ID against a database for a newer revision
Definition Block of the same OEM Table ID and load it instead.
The default namespace location to load the Definition Block is relative to the root of the namespace.
The new Definition Block can override this by specifying absolute names or by adjusting the
namespace location using the Scope operator.
Loading a Definition Block is a synchronous operation. Upon completion of the operation, the
Definition Block has been loaded. The control methods defined in the Definition Block are not
executed during load time.
Description
Performs a run-time load of a Definition Block from the XSDT. Any table referenced by LoadTable
must be in memory marked by AddressRangeReserved or AddressRangeNVS.
Note: OSPM loads the DSDT and all SSDTs during initialization. As such, Definition Blocks to be
conditionally loaded via LoadTable must contain signatures other than “SSDT”.
Loading a Definition Block is a synchronous operation. Upon completion of the operation, the
Definition Block has been loaded. The control methods defined in the Definition Block are not
executed during load time.
Example
Store (LoadTable (“OEM1”, ”MYOEM”, ”TABLE1”, ”\\_SB.PCI0”,”MYD”,
Package () {0,”\\_SB.PCI0”}), Local0)
This operation would search through the RSDT or XSDT for a table with the signature “OEM1,” the
OEM ID of “MYOEM,” and the table ID of “TABLE1.” If not found, it would store Zero in Local0.
Otherwise, it will store a package containing 0 and “\\_SB.PCI0” into the variable at
\_SB.PCI0.MYD.
Description
Up to 8 local objects can be referenced in a control method. On entry to a control method, these
objects are uninitialized and cannot be used until some value or reference is stored into the object.
Once initialized, these objects are preserved in the scope of execution for that control method.
Description
If either value is non-zero, True is returned; otherwise, False is returned.
Arguments
SearchPackage is evaluated to a package object and is treated as a one-dimension array. Each
package element must evaluate to either an integer, a string, or a buffer. Uninitialized package
elements and elements that do not evaluate to integers, strings, or buffers are ignored. Op1 and Op2
are match operators. MatchObject1 and MatchObject2 are the objects to be matched and must each
evaluate to either an integer, a string, or a buffer. StartIndex is the starting index within the
SearchPackage.
Description
A comparison is performed for each element of the package, starting with the index value indicated
by StartIndex (0 is the first element). If the element of SearchPackage being compared against is
called P[i], then the comparison is:
If (P[i] Op1 MatchObject1) and (P[i] Op2 MatchObject2) then Match => i is returned.
If the comparison succeeds, the index of the element that succeeded is returned; otherwise, the
constant object Ones is returned. The data type of the MatchObject dictates the required type of the
package element. If necessary, the package element is implicitly converted to match the type of the
MatchObject. If the implicit conversion fails for any reason, the package element is ignored (no
match.)
Op1 and Op2 have the values and meanings listed in the following table.
Example
Following are some example uses of Match:
Name (P1,
Package () {1981, 1983, 1985, 1987, 1989, 1990, 1991, 1993, 1995, 1997, 1999, 2001}
)
// match P1[i] > 1984 and P1[i] <= 2000, starting with 3rd element
Match (P1, MGT, 1984, MLE, 2000, 3) // -> 3, first match at or past Start
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The Memory24 macro evaluates to a buffer which contains an 24-bit memory descriptor. The
format of the 24-bit memory descriptor can be found in “24-Bit Memory Range Descriptor ”
(page 390). The macro is designed to be used inside of a ResourceTemplate (page 988).
Note: The use of Memory24 is deprecated and should not be used in new designs.
Description
The Memory32 macro evaluates to a buffer which contains a 32-bit memory descriptor, which
describes a memory range with a minimum, a maximum and an alignment. The format of the 32-bit
memory descriptor can be found in “32-Bit Memory Range Descriptor ” (page 392). The macro is
designed to be used inside of a ResourceTemplate (page 988).
Description
The Memory32Fixed macro evaluates to a buffer which contains a 32-bit memory descriptor, which
describes a fixed range of memory addresses. The format of the fixed 32-bit memory descriptor can
be found in 32-Bit Fixed Memory Range Descriptor (page 393). The macro is designed to be used
inside of a ResourceTemplate (page 988).
ReturnType is optional and specifies the type(s) of the object(s) returned by the method. If the
method does not return an object, then nothing is specified or UnknownObj is specified. To specify
a single return type, simply use the ObjectTypeKeyword (e.g. IntObj, PkgObj, etc.). To specify
multiple possible return types, enclose the comma-separated ObjectTypeKeywords with braces. For
example: {IntObj, BuffObj}.
ParameterTypes is optional and specifies the type of the method parameters. It is a comma-
separated, variable-length list of the expected object type or types for each of the method parameters,
enclosed in braces. For each parameter, the parameter type consists of either an ObjectTypeKeyword
or a comma-separated sub-list of ObjectTypeKeywords enclosed in braces. If ParameterTypes is
specified, the number of parameters must match NumArgs.
TermList is a variable-length list of executable ASL statements representing the body of the control
method.
Description
Creates a new control method of name MethodName. This is a named package containing a series of
object references that collectively represent a control method, which is a procedure that can be
invoked to perform computation. Method opens a name scope.
System software executes a control method by referencing the objects in the package in order. For
more information on method execution, see Section 5.5.2, “Control Method Execution.”
The current namespace location used during name creation is adjusted to be the current location on
the namespace tree. Any names created within this scope are “below” the name of this package. The
current namespace location is assigned to the method package, and all namespace references that
occur during control method execution for this package are relative to that location.
If a method is declared as Serialized, an implicit mutex associated with the method object is
acquired at the specified SyncLevel. If no SyncLevel is specified, SyncLevel 0 is assumed. The
serialize rule can be used to prevent reentering of a method. This is especially useful if the method
creates namespace objects. Without the serialize rule, the reentering of a method will fail when it
attempts to create the same namespace object.
There are eight local variables automatically available for each method, referenced as Local0
through Local7. These locals may be used to store any type of ASL object.
Also notice that all namespace objects created by a method have temporary lifetime. When method
execution exits, the created objects will be destroyed.
Examples
The following block of ASL sample code shows a use of Method for defining a control method that
turns on a power resource.
Method (_ON) {
Store (One, GIO.IDEP) // assert power
Sleep (10) // wait 10ms
Store (One, GIO.IDER) // de-assert reset#
Stall (10) // wait 10us
Store (Zero, GIO.IDEI) // de-assert isolation
}
This method is an implementation of _SRS (Set Resources). It shows the use of a method argument
and two method locals.
Description
If Source is a buffer, then Length bytes, starting with the Indexth byte (zero-based) are optionally
copied into Result. If Index is greater than or equal to the length of the buffer, then the result is an
empty buffer. Otherwise, if Index + Length is greater than or equal to the length of the buffer, then
only bytes up to and including the last byte are included in the result.
If Source is a string, then Length characters, starting with the Indexth character (zero-based) are
optionally copied into Result. If Index is greater than or equal to the length of the buffer, then the
result is an empty string. Otherwise, if Index + Length is greater than or equal to the length of the
string, then only bytes up to an including the last character are included in the result.
Description
The Dividend is divided by Divisor, and then the resulting remainder is optionally stored into Result.
If Divisor evaluates to zero, a fatal exception is generated.
Description
The Multiplicand is multiplied by Multiplier and the result is optionally stored into Result. Overflow
conditions are ignored and results are undefined.
Description
A synchronization object provides a control method with a mechanism for waiting for certain events.
To prevent deadlocks, wherever more than one synchronization object must be owned, the
synchronization objects must always be released in the order opposite the order in which they were
acquired.
The SyncLevel parameter declares the logical nesting level of the synchronization object. The
current sync level is maintained internally for a thread, and represents the greatest SyncLevel among
mutex objects that are currently acquired by the thread. The SyncLevel of a thread before acquiring
any mutexes is zero. The SyncLevel of the Global Lock (\_GL) is zero.
All Acquire terms must refer to a synchronization object with a SyncLevel that is equal or greater
than the current level, and all Release terms must refer to a synchronization object with a SyncLevel
that is equal to the current level.
Mutex synchronization provides the means for mutually exclusive ownership. Ownership is acquired
using an Acquire term and is released using a Release term. Ownership of a Mutex must be
relinquished before completion of any invocation. For example, the top-level control method cannot
exit while still holding ownership of a Mutex. Acquiring ownership of a Mutex can be nested (can be
acquired multiple times by the same thread).
Arguments
Creates a new object named ObjectName. Attaches Object to ObjectName in the Global ACPI
namespace.
Description
Creates ObjectName in the namespace, which references the Object.
Example
The following example creates the name PTTX in the root of the namespace that references a
package.
Name (\PTTX, // Port to Port Translate Table
Package () {Package () {0x43, 0x59}, Package) {0x90, 0xFF}}
)
The following example creates the name CNT in the root of the namespace that references an integer
data object with the value 5.
Name (\CNT, 5)
Description
A bitwise NAND is performed and the result is optionally stored in Result.
Description
This operation has no effect.
Description
A bitwise NOR is performed and the result is optionally stored in Result.
Description
A bitwise NOT is performed and the result is optionally stored in Result.
Description
Object type determines the notification values. For example, the notification values for a thermal
zone object are different from the notification values used for a device object. Undefined notification
values are treated as reserved and are ignored by the OS.
For lists of defined Notification values, see Section 5.6.6, “Device Object Notifications.”
Arguments
ByteOffset is the new offset (in bytes) for the next FieldUnit within a FieldList.
Description
The Offset operator is used within a FieldList to specify the byteOffset of the next defined field
within its parent operation region. This can be used instead of defining the bit lengths that need to be
skipped. All offsets are defined starting from zero, based at the starting address of the parent region.
Description
The execution result of this operation is an integer that has the numeric value of the object type for
Object.
The object type codes are listed in Table 18-20. Notice that if this operation is performed on an
object reference such as one produced by the Alias, Index, or RefOf statements, the object type of
the base object is returned. For typeless objects such as predefined scope names (in other words,
\_SB, \_GPE, etc.), the type value 0 (Uninitialized) is returned.
16 Debug Object
>16 Reserved
Description
The One operator returns an Integer with the value 1. Writes to this object are not allowed. The use
of this operator can reduce AML code size, since it is represented by a one-byte AML opcode.
Description
The Ones operator returns an Integer with all bits set to 1. Writes to this object are not allowed. The
use of this operator can reduce AML code size, since it is represented by a one-byte AML opcode.
Note: The actual value of the integer returned by the Ones operator depends on the integer width of the
DSDT. If the revision of the DSDT is 1 or less, the integer width is 32 bits and Ones returns
0xFFFFFFFF. If the revision of the DSDT is 2 or greater, the integer width is 64 bits and Ones
returns 0xFFFFFFFFFFFFFFFF. This difference must be considered when performing
comparisons against the Ones Integer.
Description
An Operation Region is a type of data object where read or write operations to the data object are
performed in some hardware space. For example, the Definition Block can define an Operation
Region within a bus, or system I/O space. Any reads or writes to the named object will result in
accesses to the I/O space.
Operation regions are regions in some space that contain hardware registers for exclusive use by
ACPI control methods. In general, no hardware register (at least byte-granular) within the operation
region accessed by an ACPI control method can be shared with any accesses from any other source,
with the exception of using the Global Lock to share a region with the firmware. The entire
Operation Region can be allocated for exclusive use to the ACPI subsystem in the host OS.
Operation Regions that are defined within the scope of a method are the exception to this rule. These
Operation Regions are known as “Dynamic” since the OS has no idea that they exist or what
registers they use until the control method is executed. Using a Dynamic SystemIO or
SystemMemory Operation Region is not recommended since the OS cannot guarantee exclusive
access. All other types of Operation Regions may be Dynamic.
Operation Regions define the overall base address and length of a hardware region, but they cannot
be accessed directly by AML code. A Field object containing one or more FieldUnits is used to
overlay the Operation Region in order to access individual areas of the Region. An individual
FieldUnit within an Operation Region may be as small as one bit, or as large as the length of the
entire Region. FieldUnit values are normalized (shifted and masked to the proper length.) The data
type of a FieldUnit can be either a Buffer or an Integer, depending on the bit length of the
FieldUnit. If the FieldUnit is smaller than or equal to the size of an Integer (in bits), it will be treated
as an Integer. If the FieldUnit is larger than the size of an Integer, it will be treated as a Buffer. The
size of an Integer is indicated by the DSDT header’s Revision field. A revision less than 2 indicates
that the size of an Integer is 32 bits. A value greater than or equal to 2 signifies that the size of an
Integer is 64 bits. For more information about data types and FieldUnit type conversion rules, see
Section 19.3.5.7, “Data Type Conversion Rules”.
An Operation Region object implicitly supports Mutex synchronization. Updates to the object, or a
Field data object for the region, will automatically synchronize on the Operation Region object;
however, a control method may also explicitly synchronize to a region to prevent other accesses to
the region (from other control methods). Notice that according to the control method execution
model, control method execution is non-preemptive. Because of this, explicit synchronization to an
Operation Region needs to be done only in cases where a control method blocks or yields execution
and where the type of register usage requires such synchronization.
The predefined Operation Region types specified in ACPI are shown in the Table 5-156 on
page 260.
Example
The following example ASL code shows the use of OperationRegion combined with Field to
describe IDE 0 and 1 controlled through general I/O space, using one FET.
OperationRegion (GIO, SystemIO, 0x125, 0x1)
Field (GIO, ByteAcc, NoLock, Preserve) {
IDEI, 1, // IDEISO_EN - isolation buffer
IDEP, 1, // IDE_PWR_EN - power
IDER, 1 // IDERST#_EN - reset#
}
Description
A bitwise OR is performed and the result is optionally stored in Result.
Description
Declares an unnamed aggregation of named data items, constants, and/or references to non-data
namespace objects. The size of the package is NumElements. The PackageList contains the data
items, constants, and/or object references used to initialize the package.
If NumElements is absent, it is automatically set by the ASL compiler to match the number of
elements in the PackageList. If NumElements is present and greater than the number of elements in
the PackageList, the default entry of type Uninitialized (see ObjectType) is used to initialize the
package elements beyond those initialized from the PackageList.
There are three types of package elements allowed in the PackageList: ConstantData
Objects(Integers, Strings, Buffers, and Packages), named references that resolve to Data Objects
(Integers, Strings, Buffers, and Packages), and named references to objects other than Data Objects.
These constant terms are resolved at ASL compile time:
• Integer Constant
• String Constant
• Buffer Constant
• Package Constant
These Named References to Data Objects are resolved to actual data by the AML Interpreter at
runtime:
• Integer reference
• String reference
• Buffer reference
• Buffer Field reference
• Field Unit reference
• Package reference
These Named References to non-Data Objects cannot be resolved to values. They are instead
returned in the package as references:
• Device reference
• Event reference
• Method reference
• Mutex reference
• Operation Region reference
• Power Resource reference
• Processor reference
• Thermal Zone reference
Note: For Package elements of type Package (defining a subpackage), individual elements of the
subpackage are resolved according to the rules above, both compile-time and runtime.
Evaluating an uninitialized element will yield a runtime error, but elements can be assigned values at
runtime to define them (via the Index operator). It is a compile time error for NumElements to be less
than the number of elements defined in the PackageList.
The ASL compiler can emit two different AML opcodes for a Package declaration, either
PackageOp or VarPackageOp. For small, fixed-length packages, the PackageOp is used and this
opcode is compatible with ACPI 1.0. A VarPackageOp will be emitted if any of the following
conditions are true:
• The NumElements argument is a TermArg that can only be resolved at runtime.
• At compile time, NumElements resolves to a constant that is larger than 255.
• The PackageList contains more than 255 initializer elements.
Example
Name (INT1, 0x1234)
Processor (CPU0, 0, 0x1010, 6) {}
PowerResource (PWR1, 0, 0) {}
Description
The PinConfig macro evaluates to a buffer that contains a Pin Configuration resource descriptor.
The format of the Pin Configuration resource descriptor can be found in “Pin Configuration
Descriptor” on page 423. The macro is designed to be used inside of an ASL Resource Template
(Section 19.3.3).
Note: There is some overlap between the properties set by GpioIo/GpioInt/ PinFunction and
PinConfig descriptors. For example, both are setting properties such as pull-ups. If the same
property is specified by multiple descriptors for the same pins, the order in which these properties
are applied is undetermined. To avoid any conflicts, GpioInt/GpioIo/PinFunction should provide a
default value for these properties when PinConfig is used. If PinConfig is used to set pin bias,
PullDefault should be used for GpioIo/GpioInt/ PinFunction. If PinConfig is used to set debounce
timeout, 0 should be used for GpioIo/GpioInt. If PinConfig is used to set drive strength, 0 should be
used for GpioIo.
Example
//
// Description: GPIO
//
Device (GPI0)
{
Name (_HID, "PNPFFFE")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4FE00000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x54}
})
Return(RBUF)
}
}
//
// Description: I2C controller 1
//
Device (I2C1)
{
Name (_HID, "PNPFFFF")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4F800000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x55}
//
// Description: Physical display panel
//
Device (SDIO)
{
Name (_HID, "PNPFFFD")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4F900000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x57}
GpioIo(Shared, PullDefault, 0, 0, IoRestrictionNone,
"\\_SB.GPI0",) {2, 3}
// Configure 20k Pull down
PinConfig(Exclusive, 0x02, 20000, "\\_SB.GPI0", 0,
ResourceConsumer, ) {2, 3}
// Enable Schmitt-trigger
PinConfig(Exclusive, 0x0D, 1, "\\_SB.GPI0", 0,
ResourceConsumer, ) {2, 3}
// Set slew rate to custom value 3
PinConfig(Exclusive, 0x0B, 3, "\\_SB.GPI0", 0,
ResourceConsumer, ) {2, 3}
})
Return(RBUF)
}
}
Description
The PinFunction macro evaluates to a buffer that contains a Pin Function resource descriptor, as
described in this section. The macro is designed to be used inside of a Resource Template
(Section 19.3.3).
Note: PinFunction macro allows for maximum flexibility to define the desired function of each pin
individually. It is the responsibility of the firmware writer to take into account any platform-level
restrictions where pin function must be applied at a coarser granularity. Thus, if the platform design
requires the functions for a set of pins to be configured as group, the firmware writer must ensure
this is done in the corresponding PinFunction description by specifying all relevant pins in a single
PinFunction. In the multi-pin scenario, the OSPM must honor the PinFunction requirements for all
of the specified pins on an “all-or-nothing” basis.
Note: The Pin Function descriptor is intended for scenarios where non-GPIO functions are desired.
For GPIO-based functionalities, the firmware should always specify the appropriate GpioIo or
Gpioint descriptor.
Example:
//
// Description: GPIO
//
Device (GPI0)
{
Name (_HID, "PNPFFFE")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4FE00000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x54}
})
Return(RBUF)
}
//
// Description: I2C controller 1
//
Device (I2C1)
{
Name (_HID, "PNPFFFF")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4F800000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x55}
//
// Description: I2C controller 2
//
Device (I2C2)
{
Name (_HID, "PNPFFFF")
Name (_UID, 0x1)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4F900000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x56}
PinFunction(Exclusive, PullUp, 0x0, 0x4,
"\\_SB.GPI0", 0, ResourceConsumer, ) {2, 3}
})
Return(RBUF)
}
}
//
// Description: Physical display panel
//
Device (DISP)
{
Name (_HID, "PNPFFFD")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Description
The PinGroup macro evaluates to a buffer that contains a Pin Group resource descriptor. The format
of the Pin Group resource descriptor can be found in "Pin Group Descriptor" (Section 6.4.3.11). The
macro is designed to be used inside of a Resource Template (Section 19.3.3).
PinGroup resource descriptors must be declared within the scope of the pin controller device to
which the pins belong.
Description
The PinGroupConfig macro evaluates to a buffer that contains a Pin Group Configuration resource
descriptor. The format of the Pin Group Configuration resource descriptor can be found in "Pin
Group Configuration Descriptor" (Section 6.4.3.13). The macro is designed to be used inside of a
Resource Template (Section 19.3.3).
Example
//
// Description: GPIO
//
Device (GPI0)
{
Name (_HID, "PNPFFFE")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4FE00000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x54}
PinGroup(“group1”, ResourceProducer) {2, 3}
})
Return(RBUF)
}
//
// Description: I2C controller 1
//
Device (I2C1)
{
Name (_HID, "PNPFFFF")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4F800000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x55}
// Set function I2C1 for SDA/SCL pins
PinGroupFunction(Exclusive, 0x5, "\\_SB.GPI0, 0,
“group1”, ResourceConsumer, )
// Configure 10k Pull up for SDA/SCL pins
PinGroupConfig(Exclusive, 0x01, 10000, "\\_SB.GPI0 ",
0, “group1”, ResourceConsumer, )
})
Return(RBUF)
}
}
//
// Description: I2C controller 2
//
Device (I2C2)
{
Name (_HID, "PNPFFFF")
Name (_UID, 0x1)
Method (_STA)
{
Return(0xf)
}
Method (_CRS, 0x0, NotSerialized)
{
Name (RBUF, ResourceTemplate()
{
Memory32Fixed(ReadWrite, 0x4F900000, 0x20)
Interrupt(ResourceConsumer, Level, ActiveHigh,
Shared) {0x56}
// Set function I2C2 for SDA/SCL pins
PinGroupFunction(Exclusive, 0x4, "\\_SB.GPI0 ", 0,
“group1”, ResourceConsumer, )
// Configure 10k Pull up for SDA/SCL pins
PinGroupConfig(Exclusive, 0x01, 10000, "\\_SB.GPI0 ",
0, “group1”, ResourceConsumer,)
})
Return(RBUF)
}
}
//
// Description: Physical display panel
//
Device (DISP)
{
Name (_HID, "PNPFFFD")
Name (_UID, 0x0)
Method (_STA)
{
Return(0xf)
}
• DescriptorName is an optional argument that specifies a name for an integer constant that will
be created in the current scope that contains the offset of this resource descriptor within the
current resource template buffer. The predefined descriptor field names may be appended to this
name to access individual fields within the descriptor via the Buffer Field operators.
• ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.
• ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this
revision.
• VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined
byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to
refer to this portion of the resource descriptor.
Description
The PinGroupFunction macro evaluates to a buffer that contains a Pin Function resource descriptor.
The format of the Pin Function resource descriptor can be found in “Pin Function Descriptor” on
page 422. The macro is designed to be used inside of an ASL Resource Template (Section 19.3.3).
Description
For a definition of the PowerResource term, see Section 7.2, “Declaring a Power Resource Object.”
The power management object list is encoded as TermList, so that rather than describing a static
power management object list, it is possible to describe a dynamic power management object list
according to the system settings. See "Section 5.4.2, Definition Block Loading."
FormatArgs is a comma separated list of Named Objects, Locals, or Args that can be evaluated to a
string. Each argument is added to the FormatString using the Concatenate operation at the location
specified by %o in order of appearance.
Description
The Printf macro converts a format string into a series of cascading string Concatenate operations,
and stores the result in the Debug object
Example
The following ASL example uses Printf to write a formatted string with the values of Arg0, Arg1,
Arg2, and Arg3 to the Debug Object.
Printf ("%o: Unexpected value for %o, %o at line %o",
Arg0, Arg1, Arg2, Arg3)
Syntax
Processor (ProcessorName, ProcessorID, PBlockAddress, PblockLength) {TermList}
Arguments
Declares a named processor object named ProcessorName. Processor opens a name scope. Each
processor is required to have a unique ProcessorID value that is unique from any other ProcessorID
value.
For each processor in the system, the ACPI system firmware declares one processor object in the
namespace anywhere within the \_SB scope. For compatibility with operating systems implementing
ACPI 1.0, the processor object may also be declared under the \_PR scope. An ACPI-compatible
namespace may define Processor objects in either the \_SB or \_PR scope but not both.
PBlockAddress provides the system I/O address for the processors register block. Each processor
can supply a different such address. PBlockLength is the length of the processor register block, in
bytes and is either 0 (for no P_BLK) or 6. With one exception, all processors are required to have the
same PBlockLength. The exception is that the boot processor can have a non-zero PBlockLength
when all other processors have a zero PBlockLength. It is valid for every processor to have a
PBlockLength of 0.
Description
The following block of ASL sample code shows a use of the Processor term.
Processor (
\_PR.CPU0, // Namespace name
1,
0x120, // PBlk system IO address
6 // PBlkLen
) {ObjectList}
The TermList is an optional list that may contain an arbitrary number of ASL Objects. Processor-
specific objects that may be included in the TermList include _PTC, _CST, _PCT, _PSS, _PPC,
_PSD, _TSD, _CSD, _PDC, _TPC, _TSS, and _OSC. These processor-specific objects can only be
specified when the processor object is declared within the \_SB scope. For a full definition of these
objects, see Section 8, “Processor Configuration and Control.”
The optional processor object list is encoded as TermList, so that rather than describing a static
processor object list, it is possible to describe a dynamic processor object list according to the system
settings. See "Section 5.4.2, Definition Block Loading."
Description
The QWordIO macro evaluates to a buffer which contains a 64-bit I/O resource descriptor, which
describes a range of I/O addresses. The format of the 64-bit I/O resource descriptor can be found in
QWord Address Space Descriptor (page 395). The macro is designed to be used inside of a
ResourceTemplate (page 988).
secondary bus. The 64-bit field DescriptorName._MIN is automatically created to refer to this
portion of the resource descriptor.
AddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the
Memory range. The value must have ‘0’ in all bits where the corresponding bit in
AddressGranularity is ‘1’. For bridge devices which translate addresses, this is the address on the
secondary bus. The 64-bit field DescriptorName._MAX is automatically created to refer to this
portion of the resource descriptor.
AddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary
bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge
devices or bridges which do not perform translation, this must be ‘0’. The 64-bit field
DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.
RangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the
Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this
portion of the resource descriptor.
ResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the
resource descriptor within the object specified by ResourceSource. If this argument is specified, the
ResourceSource argument must also be specified.
ResourceSource is an optional argument which evaluates to a string containing the path of a device
which produces the pool of resources from which this Memory range is allocated. If this argument is
specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
MemoryRangeType is an optional argument that specifies the memory usage. The memory can be
marked as normal (AddressRangeMemory), used as ACPI NVS space (AddressRangeNVS), used
as ACPI reclaimable space (AddressRangeACPI) or as system reserved
(AddressRangeReserved). If nothing is specified, then AddressRangeMemory is assumed. The 2-
bit field DescriptorName. _MTP is automatically created in order to refer to this portion of the
resource descriptor, where ‘0’ is AddressRangeMemory, ‘1’ is AddressRangeReserved, ‘2’ is
AddressRangeACPI and ‘3’ is AddressRangeNVS.
TranslationType is an optional argument that specifies whether the resource type on the secondary
side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same
(TypeStatic). If TypeTranslation is specified, then the secondary side of the bus is I/O. If TypeStatic
is specified, then the secondary side of the bus is I/O. If nothing is specified, then TypeStatic is
assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to this portion of
the resource descriptor, where ‘1’ is TypeTranslation and ‘0’ is TypeStatic. See _TTP (page 406) for
more information.
Description
The QWordMemory macro evaluates to a buffer which contains a 64-bit memory resource
descriptor, which describes a range of memory addresses. The format of the 64-bit memory resource
descriptor can be found in “QWord Address Space Descriptor ” (page 395). The macro is designed
to be used inside of a ResourceTemplate (page 988).
RangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the
Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this
portion of the resource descriptor.
ResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the
resource descriptor within the object specified by ResourceSource. If this argument is specified, the
ResourceSource argument must also be specified.
ResourceSource is an optional argument which evaluates to a string containing the path of a device
which produces the pool of resources from which this Memory range is allocated. If this argument is
specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The QWordSpace macro evaluates to a buffer which contains a 64-bit Address Space resource
descriptor, which describes a range of addresses. The format of the 64-bit AddressSpace descriptor
can be found in “QWord Address Space Descriptor ” (page 395). The macro is designed to be used
inside of a ResourceTemplate (page 988).
19.6.113 RawDataBuffer
Syntax
RawDataBuffer (RDBufferSize) {ByteList} => RawDataBuffer
Arguments
Declares a RawDataBuffer of size RDBufferSize and optional initial value of ByteList.
Description
The optional RDBufferSize parameter specifies the size of the buffer and must be a word constant.
The initial value is specified in Initializer ByteList. If RDBufferSize is not specified, it defaults to the
size of initializer. If the count is too small to hold the value specified by initializer, the initializer size
is used.
Note that a RawDataBuffer is not encoded as a Buffer (Opcode, Package length bytes, etc), but
rather contains only the raw bytes specified.
Description
Returns an object reference to Object. If the Object does not exist, the result of a RefOf operation is
fatal. Use the CondRefOf term in cases where the Object might not exist.
The primary purpose of RefOf() is to allow an object to be passed to a method as an argument to the
method without the object being evaluated at the time the method was loaded.
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The Register macro evaluates to a buffer which contains a generic register resource descriptor. The
format of the generic register resource descriptor can be found in “Generic Register Descriptor ”
(page 409). The macro is designed to be used inside of a ResourceTemplate (page 988).
Description
If the mutex object is owned by the current invocation, ownership for the Mutex is released once. It
is fatal to release ownership on a Mutex unless it is currently owned. A Mutex must be totally
released before an invocation completes.
Description
This operator is used to reset an event synchronization object to a non-signaled state. See also the
Wait and Signal function operator definitions.
Description
For a full definition of the ResourceTemplateTerm macro, see Section 19.3.3, “ASL Resource
Templates”.
Description
Returns control to the invoking control method, optionally returning a copy of the object named in
Arg. If no Arg object is specified, a Return(Zero) is generated by the ASL compiler.
Note: In the absence of an explicit Return () statement, the return value to the caller is undefined.
Description
The Revision operator returns an Integer containing the current revision of the AML interpreter.
Writes to this object are not allowed.
Description
The object referred to by Location must already exist in the namespace and be one of the following
object types that has a namespace scope associated with it:
• A predefined scope such as: \ (root), \_SB, \GPE, \_PR, \_TZ, etc.
• Device
• Processor
• Thermal Zone
• Power Resource
The Scope term alters the current namespace location to the existing Location. This causes the
defined objects within TermList to be created relative to this new location in the namespace.
The object list is encoded as TermList, so that rather than describing a static object list, it is possible
to describe a dynamic object list according to the system settings. See "Section 5.4.2, Definition
Block Loading."
Note: When creating secondary SSDTs, it is often required to use the Scope operator to change the
namespace location in order create objects within some part of the namespace that has been defined
by the main DSDT. Use the External operator to declare the scope location so that the ASL
compiler will not issue an error for an undefined Location.
Examples
The following example ASL code uses the Scope operator and creates several objects:
Scope (\PCI0)
{
Name (X, 3)
Scope (\)
{
Method (RQ) {Return (0)}
}
Name (^Y, 4)
}
This example shows the use of External in conjunction with Scope within an SSDT:
DefinitionBlock ("ssdt.aml", "SSDT", 2, "X", "Y", 0x00000001)
{
External (\_SB.PCI0, DeviceObj)
Scope (\_SB.PCI0)
{
}
}
Arguments
Source and ShiftCount are evaluated as Integers.
Description
Source is shifted left with the least significant bit zeroed ShiftCount times. The result is optionally
stored into Result.
Description
Source is shifted right with the most significant bit zeroed ShiftCount times. The result is optionally
stored into Result.
Description
The Event object is signaled once, allowing one invocation to acquire the event.
Description
Returns the size of a buffer, string, or package data object.
For a buffer, it returns the size in bytes of the data. For a string, it returns the size in bytes of the
string, not counting the trailing NULL. For a package, it returns the number of elements. For an
object reference, the size of the referenced object is returned. Other data types cause a fatal run-time
error.
Description
The implementation of Sleep is to round the request up to the closest sleep time supported by the OS
and relinquish the processor.
Description
The SPISerialBusV2 macro evaluates to a buffer that contains a SPI Serial Bus resource descriptor
(Version 2). The macro is designed to be used inside of a ResourceTemplate (see Section 19.3.3).
Description
The implementation of Stall is OS-specific, but must not relinquish control of the processor.
Because of this, delays longer than 100 microseconds must use Sleep instead of Stall.
Arguments
CompatibilityPriority indicates the relative compatibility of the configuration specified by
ResourceList relative to the PC/AT. 0 = Good, 1 = Acceptable, 2 = Sub-optimal.
PerformancePriority indicates the relative performance of the configuration specified by
ResourceList relative to the other configurations. 0 = Good, 1 = Acceptable, 2 = Sub-optimal.
ResourceList is a list of resources descriptors which must be selected together for this configuration.
Description
The StartDependentFn macro evaluates to a buffer which contains a start dependent function
resource descriptor, which describes a group of resources which must be selected together. Each
subsequent StartDependentFn or StartDependentFnNoPri resource descriptor introduces a new
choice of resources for configuring the device, with the last choice terminated with an
EndDependentFn resource descriptor. The format of the start dependent function resource descriptor
can be found in “Start Dependent Functions Descriptor” (page 385). This macro generates the two-
byte form of the resource descriptor. The macro is designed to be used inside of a ResourceTemplate
(page 988).
Description
The StartDependentFnNoPri macro evaluates to a buffer which contains a start dependent function
resource descriptor, which describes a group of resources which must be selected together. Each
subsequent StartDependentFn or StartDependentFnNoPri resource descriptor introduces a new
choice of resources for configuring the device, with the last choice terminated with an
EndDependentFn resource descriptor. The format of the start dependent function resource descriptor
can be found in “Start Dependent Functions Descriptor” (page 385). This macro generates the one-
byte form of the resource descriptor. The macro is designed to be used inside of a ResourceTemplate
(page 988).
This is similar to StartDependentFn (page 993) with both CompatibilityPriority and
PerformancePriority set to 1, but is one byte shorter.
Arguments
This operation evaluates Source, converts it to the data type of Destination, and writes the result into
Destination. For information on automatic data-type conversion, see Section 19.3.5, “ASL Data
Types.”
Description
Stores to OperationRegion Field data types may relinquish the processor depending on the address
space.
All stores (of any type) to the constant Zero, constant One, or constant Ones object are not allowed.
Stores to read-only objects are fatal. The execution result of the operation depends on the type of
Destination. For any type other than an operation region field, the execution result is the same as the
data written to Destination. For operation region fields with an AccessType of ByteAcc, WordAcc,
DWordAcc, QWordAcc or AnyAcc, the execution result is the same as the data written to
Destination as in the normal case, but when the AccessType is BufferAcc, the operation region
handler may modify the data when it is written to the Destination so that the execution result
contains modified data.
Example
The following example creates the name CNT that references an integer data object with the value 5
and then stores CNT to Local0. After the Store operation, Local0 is an integer object with the value
5.
Name (CNT, 5)
Store (CNT, Local0)
Description
Subtrahend is subtracted from Minuend, and the result is optionally stored into Result. Underflow
conditions are ignored and the result simply loses the most significant bits.
Arguments
Expression is an ASL expression that evaluates to an Integer, String or Buffer.
Description
The Switch, Case and Default statements help simplify the creation of conditional and branching
code. The Switch statement transfers control to a statement within the enclosed body of executable
ASL code
If the Case Value is an Integer, Buffer or String, then control passes to the statement that matches the
value of Switch (Expression). If the Case value is a Package, then control passes if any member of
the package matches the Switch (Value) The Switch CaseTermList can include any number of Case
instances, but no two Case Values (or members of a Value, if Value is a Package) within the same
Switch statement can have the same value.
Execution of the statement body begins at the selected TermList and proceeds until the TermList end
of body or until a Break or Continue statement transfers control out of the body.
The Default statement is executed if no Case Value matches the value of Switch (expression). If the
Default statement is omitted, and no Case match is found, none of the statements in the Switch body
are executed. There can be at most one Default statement. The Default statement can appear
anywhere in the body of the Switch statement.
A Case or Default term can only appear inside a Switch statement. Switch statements can be nested.
(Compatibility Note) The Switch, Case, and Default terms were first introduced in ACPI 2.0.
However, their implementation is backward compatible with ACPI 1.0 AML interpreters.
Example
Use of the Switch statement usually looks something like this:
Switch (expression)
{
Case (value) {
Statements executed if Lequal (expression, value)
}
Case (Package () {value, value, value}) {
Statements executed if Lequal (expression, any value in package)
}
Default {
Statements executed if expression does not equal
any case constant-expression
}
}
Note: (Compiler Note) The following example demonstrates how the Switch statement should be
translated into ACPI 1.0-compatible AML:
is translated as:
Name (_T_I, 0) // Create Integer temporary variable for result
While (One)
{
Store (Add (ABCD (), 1), _T_I)
If (LEqual (_T_I, 1)) {
…statements1…
}
Else {
If (LNotEqual (Match (Package () {4, 5, 6}, MEQ, _T_I, MTR, 0, 0), Ones)) {
…statements2…
}
Else {
…statements3…
}
Break
}
The While (One) is emitted to enable the use of Break and Continue within the Switch statement.
Temporary names emitted by the ASL compiler should appear at the top level of the method, since
the Switch statement could appear within a loop and thus attempt to create the name more than once.
Note: If the ASL compiler is unable to determine the type of the expression, then it will generate a
warning and assume a type of Integer. The warning will indicate that the code should use one of the
type conversion operators (Such as ToInteger, ToBuffer, ToDecimalString or ToHexString).
Caution: Some of these operators are defined starting with ACPI 2.0 and as such may not be
supported by ACPI 1.0b compatible interpreters.
For example:
Switch (ABCD ()) // Cannot determine the type because methods can return anything.
{
…case statements…
}
will generate a warning and the following code:
Name (_T_I, 0)
Store (ABCD (), _T_I)
Description
A thermal zone may be declared in the namespace anywhere within the \_SB scope. For
compatibility with operating systems implementing ACPI 1.0, a thermal zone may also be declared
under the \_TZ scope. An ACPI-compatible namespace may define Thermal Zone objects in either
the \_SB or \_TZ scope but not both.
For example ASL code that uses a ThermalZone statement, see Section 11, “Thermal Management.”
The thermal object list is encoded as TermList, so that rather than describing a static thermal object
list, it is possible to describe a dynamic thermal object list according to the system settings. See
"Section 5.4.2, Definition Block Loading."
Description
The timer opcode returns a monotonically increasing value that can be used by ACPI methods to
measure time passing, this enables speed optimization by allowing AML code to mark the passage
of time independent of OS ACPI interpreter implementation.
The Sleep opcode can only indicate waiting for longer than the time specified.
The value resulting from this opcode is 64 bits. It is monotonically increasing, but it is not
guaranteed that every result will be unique, i.e. two subsequent instructions may return the same
value. The only guarantee is that each subsequent evaluation will be greater-than or equal to the
previous ones.
The period of this timer is 100 nanoseconds. While the underlying hardware may not support this
granularity, the interpreter will do the conversion from the actual timer hardware frequency into 100
nanosecond units.
Users of this opcode should realize that a value returned only represents the time at which the
opcode itself executed. There is no guarantee that the next opcode in the instruction stream will
execute in any particular time bound.
The OSPM can implement this using the ACPI Timer and keep track of overrun. Other
implementations are possible. This provides abstraction away from chipset differences
Description
The ToBCD operator is used to convert Value from a numeric (Integer) format to a BCD format and
optionally store the numeric value into Result.
Description
Data is converted to buffer type and the result is optionally stored into Result. If Data is an integer,
it is converted into n bytes of buffer (where n is 4 if the definition block has defined integers as 32
bits or 8 if the definition block has defined integers as 64 bits as indicated by the Definition Block
table header’s Revision field), taking the least significant byte of integer as the first byte of buffer. If
Data is a buffer, no conversion is performed. If Data is a string, each ASCII string character is
copied to one buffer byte, including the string null terminator. A null (zero-length) string will be
converted to a zero-length buffer.
Description
Data is converted to a decimal string, and the result is optionally stored into Result. If Data is
already a string, no action is performed. If Data is a buffer, it is converted to a string of decimal
values separated by commas. (Each byte of the buffer is converted to a single decimal value.) A
zero-length buffer will be converted to a null (zero-length) string.
Description
Data is converted to a hexadecimal string, and the result is optionally stored into Result. If Data is
already a string, no action is performed. If Data is a buffer, it is converted to a string of hexadecimal
values separated by commas. A zero-length buffer will be converted to a null (zero-length) string.
Description
Data is converted to integer type and the result is optionally stored into Result. If Data is a string, it
must be either a decimal or hexadecimal numeric string (in other words, prefixed by “0x”) and the
value must not exceed the maximum of an integer value. If the value is exceeding the maximum, the
result of the conversion is unpredictable. A null (zero-length) string is illegal. If Data is a Buffer, the
first 8 bytes of the buffer are converted to an integer, taking the first byte as the least significant byte
of the integer. A zero-length buffer is illegal. If Data is an integer, no action is performed.
Arguments
PLDKeywordList is a list of PLDKeyword types that describe elements of a Physical Layer
Description (_PLD) buffer that can be assigned values. The table below shows the available
PLDKeyword types and their assignable types. Refer to the _PLD section for a description of the
_PLD method object.
A subset of PLDKeyword types can be assigned string values for improved readability. Those types
and their assignable values are shown in the table below.
PLD_Shape “ROUND”,”OVAL”,”SQUARE”,
“VERTICALRECTANGLE”,
“HORIZONTALRECTANGLE”,
“VERTICALTRAPEZOID”,
“HORIZONTALTRAPEZOID”,
“UNKNOWN”
Description
The ToPLD macro converts a list of PLDKeyword types into a _PLD buffer object.
Example
The following ASL shows an example using ToPLDto construct a _PLD buffer/package object.
Name (_PLD, Package (0x01) // _PLD: Physical Location of Device
{
ToPLD (
PLD_Revision = 0x2,
PLD_IgnoreColor = 0x1,
PLD_Red = 0x37,
PLD_Green = 0x44,
PLD_Blue = 0xFF,
PLD_Width = 0x4,
PLD_Height = 0x19,
PLD_UserVisible = 0x1,
PLD_Dock = 0x0,
PLD_Lid = 0x1,
PLD_Panel = "TOP",
PLD_VerticalPosition = "CENTER",
PLD_HorizontalPosition = "RIGHT",
PLD_Shape = "VERTICALRECTANGLE",
PLD_GroupOrientation = 0x1,
PLD_GroupToken = 0xA,
PLD_GroupPosition = 0x21,
PLD_Bay = 0x1,
PLD_Ejectable = 0x0,
PLD_EjectRequired = 0x1,
PLD_CabinetNumber = 0x1E,
PLD_CardCageNumber = 0x17,
PLD_Reference = 0x0,
PLD_Rotation = 0x7,
PLD_Order = 0x3,
PLD_VerticalOffset = 0x141,
PLD_HorizontalOffset = 0x2C)
})
Description
Starting with the first byte, the contents of the buffer are copied into the string until the number of
characters specified by Length is reached or a null (0) character is found. If Length is not specified or
is Ones, then the contents of the buffer are copied until a null (0) character is found. If the source
buffer has a length of zero, a zero length (null terminator only) string will be created. The result is
copied into the Result.
Description
This macro will convert an ASCII string to a 128-bit buffer. The string must have the following
format:
aabbccdd-eeff-gghh-iijj-kkllmmnnoopp
where aa – pp are one byte hexadecimal numbers, made up of hexadecimal digits. The resulting
buffer has the following format:
IsBigEndian is an optional argument that specifies whether the device is expecting big endian
(BigEndian) or little endian (LittleEndian) data formats. LittleEndian is the default. The bit field
_END is automatically created to refer to this portion of the resource descriptor.
Parity is an optional argument that specifies whether the type of parity bits included after the data in
a packet are to be interpreted as space parity (ParityTypeSpace), mark parity (ParityTypeMark), odd
parity (ParityTypeOdd), even parity (ParityTypeEven) or no parity (ParityTypeNone).
ParityTypeNone is the default. The bit field PAR is automatically created to refer to this portion of
the resource descriptor.
FlowControl is an optional argument that specifies whether there is hardware-based flow control
(FlowControlHardware), software-based flow control (FlowControlXON) or no flow control
(FlowControlNone) used when communicating with the device. FlowControlNone is the default.
The bit field_FLC is automatically created to refer to this portion of the resource descriptor.
ReceiveBufferSize evaluates to a 16-bit integer that specifies the upper limit in bytes of the receive
buffer that can be optimally utilized while communicating with this device. The bit field_RXL is
automatically created to refer to this portion of the resource descriptor.
TransmitBufferSize evaluates to a 16-bit integer that specifies the upper limit in bytes of the transmit
buffer that can be optimally utilized while communicating with this device. The bit field _TXL is
automatically created to refer to this portion of the resource descriptor.
ResourceSource is a string which uniquely identifies the UART bus controller referred to by this
descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that
utilizes the namespace search rules.
ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.
ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Shared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is
assumed. The bit field name _SHR is automatically created to refer to this portion of the resource
descriptor.
VendorData is an optional argument that specifies an object to be decoded by the OS driver. It is a
RawDataBuffer. The bit field name _VEN is automatically created to refer to this portion of the
resource descriptor.
Description
The UARTSerialBusV2 macro evaluates to a buffer that contains a UART Serial Bus resource
descriptor (Version 2). The macro is designed to be used inside of a ResourceTemplate
(seeSection 19.3.3 ).
Description
Performs a run-time unload of a Definition Block that was loaded using a Load term or LoadTable
term. Loading or unloading a Definition Block is a synchronous operation, and no control method
execution occurs during the function. On completion of the Unload operation, the Definition Block
has been unloaded (all the namespace objects created as a result of the corresponding Load
operation will be removed from the namespace).
Description
The VendorLong macro evaluates to a buffer which contains a vendor-defined resource descriptor.
The format of the long form of the vendor-defined resource descriptor can be found in Vendor-
Defined Descriptor (page 388). The macro is designed to be used inside of a ResourceTemplate
(page 988).
This is similar to VendorShort (page 1006), except that the number of allowed bytes in
VendorByteList is 65,533 (instead of 7).
Description
The VendorShort macro evaluates to a buffer which contains a vendor-defined resource descriptor.
The format of the short form of the vendor-defined resource descriptor can be found in “Vendor-
Defined Descriptor” (page 388). The macro is designed to be used inside of a ResourceTemplate
(page 988).
This is similar to VendorLong (page 1006), except that the number of allowed bytes in
VendorByteList is 7 (instead of 65,533).
Description
The pending signal count is decremented. If there is no pending signal count, the processor is
relinquished until a signal count is posted to the Event or until at least TimeoutValue milliseconds
have elapsed.
This operation returns a non-zero value if a timeout occurred and a signal was not acquired. A
TimeoutValue of 0xFFFF (or greater) indicates that there is no time out and the operation will wait
indefinitely.
Description
If the Predicate is non-zero, the list of terms in TermList is executed. The operation repeats until the
Predicate evaluates to zero.
Note: Creation of a named object more than once in a given scope is not allowed. As such,
unconditionally creating named objects within a While loop must be avoided. A fatal error will be
generated on the second iteration of the loop, during the attempt to create the same named object
a second time.
RangeLength evaluates to a 16-bit integer that specifies the total number of bus numbers decoded in
the bus number range. The 16-bit field DescriptorName. _LEN is automatically created to refer to
this portion of the resource descriptor.
ResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the
resource descriptor within the object specified by ResourceSource. If this argument is specified, the
ResourceSource argument must also be specified.
ResourceSource is an optional argument which evaluates to a string containing the path of a device
which produces the pool of resources from which this I/O range is allocated. If this argument is
specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The WordBusNumber macro evaluates to a buffer which contains a 16-bit bus-number resource
descriptor. The format of the 16-bit bus number resource descriptor can be found in “Word Address
Space Descriptor ” (page 400). The macro is designed to be used inside of a ResourceTemplate
(page 988).
ISARanges specifies whether the I/O ranges specifies are limited to valid ISA I/O ranges (ISAOnly),
valid non-ISA I/O ranges (NonISAOnly) or encompass the whole range without limitation
(EntireRange). The 2-bit field DescriptorName._RNG is automatically created to refer to this
portion of the resource descriptor, where ‘1’ is NonISAOnly, ‘2’ is ISAOnly and ‘0’ is EntireRange.
AddressGranularity evaluates to a 16-bit integer that specifies the power-of-two boundary (- 1) on
which the I/O range must be aligned. The 16-bit field DescriptorName. _GRA is automatically
created to refer to this portion of the resource descriptor.
AddressMinimum evaluates to a 16-bit integer that specifies the lowest possible base address of the I/
O range. The value must have ‘0’ in all bits where the corresponding bit in AddressGranularity is
‘1’. For bridge devices which translate addresses, this is the address on the secondary bus. The 16-bit
field DescriptorName._MIN is automatically created to refer to this portion of the resource
descriptor.
AddressMaximum evaluates to a 16-bit integer that specifies the highest possible base address of the
I/O range. The value must have ‘0’ in all bits where the corresponding bit in AddressGranularity is
‘1’. For bridge devices which translate addresses, this is the address on the secondary bus. The 16-bit
field DescriptorName._MAX is automatically created to refer to this portion of the resource
descriptor.
AddressTranslation evaluates to a 16-bit integer that specifies the offset to be added to a secondary
bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge
devices or bridges which do not perform translation, this must be ‘0’. The 16-bit field
DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.
RangeLength evaluates to a 16-bit integer that specifies the total number of bytes decoded in the I/O
range. The 16-bit field DescriptorName. _LEN is automatically created to refer to this portion of the
resource descriptor.
ResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the
resource descriptor within the object specified by ResourceSource. If this argument is specified, the
ResourceSource argument must also be specified.
ResourceSource is an optional argument which evaluates to a string containing the path of a device
which produces the pool of resources from which this I/O range is allocated. If this argument is
specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
TranslationType is an optional argument that specifies whether the resource type on the secondary
side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same
(TypeStatic). If TypeTranslation is specified, then the secondary side of the bus is Memory. If
TypeStatic is specified, then the secondary side of the bus is I/O. If nothing is specified, then
TypeStatic is assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to
this portion of the resource descriptor, where ‘1’ is TypeTranslation and ‘0’ is TypeStatic. See _TTP
(page 406) for more information
TranslationDensity is an optional argument that specifies whether or not the translation from the
primary to secondary bus is sparse (SparseTranslation) or dense (DenseTranslation). It is only
used when TranslationType is TypeTranslation. If nothing is specified, then DenseTranslation is
assumed. The 1-bit field DescriptorName. _TRS is automatically created to refer to this portion of
the resource descriptor, where ‘1’ is SparseTranslation and ‘0’ is DenseTranslation. See _TRS
(page 406) for more information.
Description
The WordIO macro evaluates to a buffer which contains a 16-bit I/O range resource descriptor. The
format of the 16-bit I/O range resource descriptor can be found in “Word Address Space Descriptor
” (page 400). The macro is designed to be used inside of a ResourceTemplate (page 988).
AddressMaximum evaluates to a 16-bit integer that specifies the highest possible bus number for the
bus number range. The value must have ‘0’ in all bits where the corresponding bit in
AddressGranularity is ‘1’. For bridge devices which translate addresses, this is the address on the
secondary bus. The 16-bit field DescriptorName._MAX is automatically created to refer to this
portion of the resource descriptor.
AddressTranslation evaluates to a 16-bit integer that specifies the offset to be added to a secondary
bus bus number which results in the corresponding primary bus bus number. For all non-bridge
devices or bridges which do not perform translation, this must be ‘0’. The 16-bit field
DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.
RangeLength evaluates to a 16-bit integer that specifies the total number of bus numbers decoded in
the bus number range. The 16-bit field DescriptorName. _LEN is automatically created to refer to
this portion of the resource descriptor.
ResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the
resource descriptor within the object specified by ResourceSource. If this argument is specified, the
ResourceSource argument must also be specified.
ResourceSource is an optional argument which evaluates to a string containing the path of a device
which produces the pool of resources from which this I/O range is allocated. If this argument is
specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.
DescriptorName is an optional argument that specifies a name for an integer constant that will be
created in the current scope that contains the offset of this resource descriptor within the current
resource template buffer. The predefined descriptor field names may be appended to this name to
access individual fields within the descriptor via the Buffer Field operators.
Description
The WordSpace macro evaluates to a buffer which contains a 16-bit Address Space resource
descriptor. The format of the 16-bit Address Space resource descriptor can be found in “Word
Address Space Descriptor ” (page 400). The macro is designed to be used inside of a
ResourceTemplate (page 988).
Description
A bitwise XOR is performed and the result is optionally stored into Result.
Description
The Zero operator returns an Integer with the value 0. Writes to this object are not allowed. The use
of this operator can reduce AML code size, since it is represented by a one-byte AML opcode.
This section formally defines the ACPI Control Method Machine Language (AML) language. AML
is the ACPI Control Method virtual machine language, machine code for a virtual machine that is
supported by an ACPI-compatible OS. ACPI control methods can be written in AML, but humans
ordinarily write control methods in ASL.
AML is the language processed by the ACPI AML interpreter. It is primarily a declarative language.
It’s best not to think of it as a stream of code, but rather as a set of declarations that the ACPI AML
interpreter will compile into the ACPI Namespace at definition block load time. For example, notice
that DefByte allocates an anonymous integer variable with a byte-size initial value in ACPI
namespace, and passes in an initial value. The byte in the AML stream that defines the initial value is
not the address of the variable’s storage location.
An OEM or platform firmware vendor needs to write ASL and be able to single-step AML for
debugging. (Debuggers and other ACPI control method language tools are expected to be AML-
level tools, not source-level tools.) An ASL translator implementer must understand how to read
ASL and generate AML. An AML interpreter author must understand how to execute AML.
AML and ASL are different languages, though they are closely related.
All ACPI-compatible operating systems must support AML. A given user can define some arbitrary
source language (to replace ASL) and write a tool to translate it to AML. However, the ACPI group
will support a single translator for a single language, ASL.
SegCount := ByteData
Note: SegCount can be from 1 to 255. For example: MultiNamePrefix(35) is encoded as 0x2f 0x23 and
followed by 35 NameSegs. So, the total encoding length will be 1 + 1 + 35*4 = 142. Notice that:
DualNamePrefix NameSeg NameSeg has a smaller encoding than the encoding of:
MultiNamePrefix(2) NameSeg NameSeg
Note: The high 2 bits of the first byte reveal how many follow bytes are in the PkgLength. If the
PkgLength has only one byte, bit 0 through 5 are used to encode the package length (in other
words, values 0-63). If the package length value is more than 63, more than one byte must be
used for the encoding in which case bit 4 and 5 of the PkgLeadByte are reserved and must be
zero. If the multiple bytes encoding is used, bits 0-3 of the PkgLeadByte become the least
significant 4 bits of the resulting package length value. The next ByteData will become the next
least significant 8 bits of the resulting value and so on, up to 3 ByteData bytes. Thus, the maximum
package length is 2**28.
// 2 WriteAsZeros
// bit 7: Reserved (must be 0)
PblkLen := ByteData
DefBreak := BreakOp
BreakOp := 0xA5
DefBreakPoint := BreakPointOp
BreakPointOp := 0xCC
DefContinue := ContinueOp
ContinueOp := 0x9F
DefNoop := NoopOp
NoopOp := 0xA3
EventObject := SuperName
DefTimer := TimerOp
TimerOp := 0x5B 0x33
0x16-0x2D — — — —
0x2E (‘.’) DualNamePrefix Name Object NameSeg —
NameSeg
0x2F (‘/’) MultiNamePrefix Name Object ByteData —
NameSeg(N)
0x30-0x39 DigitChar— Name — —
('0'-'9') Object—
0x3A-0x40 — — — —
0x41-0x5A NameChar Name Object — —
(‘A’-‘Z’)
0x5B (‘[’) ExtOpPrefix — ByteData —
0x5B 0x00 — — — —
0x5B 0x01 MutexOp Term Object NameString —
ByteData
0x5B 0x02 EventOp Term Object NameString —
0x5B 0x12 CondRefOfOp Term Object SuperName —
SuperName
0x5B 0x13 CreateFieldOp Term Object TermArg —
TermArg
TermArg
NameString
0x5B 0x1F LoadTableOp Term Object TermArg —
TermArg
TermArg
TermArg
TermArg
TermArg
0x5B 0x20 LoadOp Term Object NameString —
SuperName
Assume further that a definition block is loaded that creates a node \S0.CPU.SET, and loads a block
using it as a root. Assume the loaded block contains the following names:
STP1
^GET
^^PCI0
^^PCI0.SBS
\S2
\S2.ISA.COM1
^^^S3
^^^S2.MEM
^^^S2.MEM.SET
Scope(\S0.CPU.SET.STP1) {
XYZ
^ABC
^ABC.DEF
}
'STP1'
ParentPrefixChar 'GET_'
ParentPrefixChar ParentPrefixChar 'PCI0'
ParentPrefixChar ParentPrefixChar DualNamePrefix 'PCI0' 'SBS_'
RootChar 'S2__'
RootChar MultiNamePrefix 3 'S2__' 'ISA_' 'COM1'
ParentPrefixChar ParentPrefixChar ParentPrefixChar 'S3__'
ParentPrefixChar ParentPrefixChar ParentPrefixChar DualNamePrefix 'S2__' 'MEM_'
ParentPrefixChar ParentPrefixChar ParentPrefixChar MultiNamePrefix 3 'S2__' 'MEM_' 'SET_'
After the block is loaded, the namespace will look like this (names added to the namespace by the
loading operation are shown in bold):
\
S0
MEM
SET
GET
CPU
SET
STP1
XYZ
ABC
DEF
GET
PCI0
SBS
S1
MEM
SET
GET
CPU
SET
GET
S2
ISA
COM1
MEM
SET
S3
} ACPI_TABLE_HEADER;
In the Table Definition Language, an ACPI table header can be described as follows:
: "ECDT"
: 00000000
: 01
: 00
: "OEM "
: "MACHINE1"
: 00000001
: ""
: 00000000
Additionally and optionally, it can also be described with accompanying field names:
Signature : "ECDT" [Embedded Controller Boot Resources Table]
Table Length : 00000000
Revision : 01
Checksum : 00
Oem ID : "OEM "
Oem Table ID : "MACHINE1"
Oem Revision : 00000001
Asl Compiler ID : ""
Asl Compiler Revision : 00000000
Note: In the ACPI table header, the TableLength, Checksum, AslCompilerId, and the
AslCompilerRevision fields are all output fields that are filled in automatically by the compiler
during table generation. Also, the field names are output by a disassembler that formats existing
tables into TDL code.
//
// Field Terms
//
FieldList :=
Field |
<Field FieldList>
Field :=
<FieldDefinition OptionalFieldComment> |
CommentField
FieldDefinition :=
OptionalFieldName :=
Nothing |
AsciiCharList // Optional field name/description
FieldValue :=
IntegerExpression | String | Buffer | Flags | Label
OptionalFieldComment :=
Nothing |
<'[' AsciiCharList ']'>
CommentField :=
<'//' AsciiCharList NewLine> |
<'/*' AsciiCharList '*/'> |
<'[' AsciiCharList ']'>
//
// Data Expressions
//
IntegerExpression :=
Integer |
<IntegerExpression IntegerOperator IntegerExpression> |
<'(' IntegerExpression ')'>
//
// Operators below are shown in precedence order. The precedence rules
// are the same as the C language. Parentheses have precedence over
// all operators.
//
IntegerOperator :=
'!' | '~' | '*' | '/' | '%' | '+' | '-' | '<<' | '>>' |
'<' | '>' | '<=' | '>=' | '==' | '!=' | '&' | '^' | '|' |
'&&' |'||' |
//
// Data Types
//
String :=
<'"' AsciiCharList '"'>
Buffer :=
ByteConstList
Guid :=
<DWordConst '-' WordConst '-' WordConst '-' WordConst '-' Const48>
Label :=
AsciiCharList
//
// Data Terms
//
Integer :=
ByteConst | WordConst | Const24 | DWordConst | Const40 | Const48 | Const56 |
QWordConst | LabelReference
LabelReference :=
<'$' Label>
Flags :=
OneBit | TwoBits
ByteConstList :=
ByteConst |
<Byte Const ' ' ByteConstList>
AsciiCharList :=
Nothing |
PrintableAsciiChar |
<PrintableAsciiChar AsciiCharList>
//
// Terminals
//
ByteConst :=
0x00-0xFF
WordConst :=
0x0000 - 0xFFFF
Const24 :=
0x000000 - 0xFFFFFF
DWordConst :=
0x00000000 - 0xFFFFFFFF
Const40 :=
0x0000000000 - 0xFFFFFFFFFF
Const48 :=
0x000000000000 - 0xFFFFFFFFFFFF
Const56 :=
0x00000000000000 - 0xFFFFFFFFFFFFFF
QWordConst :-
0x0000000000000000 - 0xFFFFFFFFFFFFFFFF
OneBit :=
0 - 1
TwoBits :=
0 - 3
PrintableAsciiChar :=
0x20 - 0x7E
NewLine :=
'\n'
Examples:
[001] Revision : 04// Byte (8-bit)
[002] C2 Latency : 0000// Word (16-bit)
[004] DSDT Address : 00000001// DWord (32-bit)
[008] Address : 0000000000000001// QWord (64-bit)
() Parentheses
! Logical NOT
~ Bitwise ones compliment (NOT)
* Multiply
/ Divide
% Modulo
+ Add
- Subtract
<< Shift left
>> Shift right
< Less than
> Greater than
<= Less than or equal
>= Greater than or equal
== Equal
!= Not Equal
& Bitwise AND
^ bitwise Exclusive OR
| Bitwise OR
&& Logical AND
|| Logical OR
Examples:
[001] Revision : 04 * (4 + 7)// Byte (8-bit)
[002] C2 Latency : 0032 + 8// Word (16-bit)
21.2.3.3 Flags
Many ACPI tables contain flag fields. For these fields, only the individual flag bits need to be
specified to the compiler. The individual bits are aggregated into a single integer of the proper size
by the compiler.
Examples:
[002] Flags (decoded below) : 0005
Polarity : 1
Trigger Mode : 1
In this example, only the Polarity and Trigger Mode fields need to be specified to the compiler (as
either zero or one). The compiler then creates the final 16-bit Flags field for the ACPI table.
21.2.3.4 Strings
Strings must always be surrounded by quotes. The actual string that is generated by the compiler
may or may not be null-terminated, depending on the table definition in the ACPI specification. For
example, the OEM ID and OEM Table ID in the common ACPI table header (shown above) are
fixed at six and eight characters, respectively. They are not necessarily null terminated. Most other
strings, however, are of variable-length and are automatically null terminated by the compiler. If a
string is specified that is too long for a fixed-length string field, an error is issued. String lengths are
specified in the definition for each relevant ACPI table.
Escape sequences within a quoted string are not allowed. The backslash character '\' refers to the root
of the ACPI namespace.
Examples:
[008] Oem Table ID : "TEMPLATE" // Fixed length
[006] Processor UID String : "\CPU0"// Variable length
21.2.3.5 Buffers
A buffer is typically used whenever the required binary data is larger than a QWord, or the data does
not fit exactly into one of the standard integer widths. Examples include UUIDs and byte data
defined by the SLIT table.
Examples:
// SLIT entry
[032] Locality 0 : 0A 10 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 \
24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33
// DMAR entry
Each hexadecimal byte should be entered separately, separated by a space. The continuation
character (backslash) may be used to continue the buffer data to more than one line.
There are several types of ACPI table fields that are set automatically by the compiler. This
simplifies the process of ACPI table development by relieving the programmer from these tasks.
Checksums: All ACPI table checksums are computed and inserted
automatically. This includes the main checksum that appears in
the standard ACPI table header, as well as any additional
checksum fields such as the extended checksum that appears in
the ACPI 2.0 RSDP.
Table and Subtable Lengths: All ACPI table lengths are computed and inserted automatically.
This includes the master table length that appears in the common
Examples:
[004] Table Length : 000000F4
Reserved Fields: All fields that are declared as Reserved by the table definition
within the ACPI (or other) specification should be set to zero.
Table Revision: This field in the common ACPI table header is often very
important and defines the structure of the remaining table. The
developer should take care to ensure that this value is correct and
current. This field is not set automatically by the compiler. It is
instead used to indicate which version of the table is being
compiled.
Table Signature: There are several table signatures within ACPI that are either
different from the table name, or have unusual length:
: "ECDT"
: 00000000
: 01
: 00
: "OEM "
: "MACHINE1"
: 00000001
: ""
: 00000000
Buffer : AA 01 32 4C 77
GUID : 11223344-5566-7788-99aa-bbccddeeff00
Label : EndRecord
0000: 45 43 44 54 4E 00 00 00 01 F4 49 4E 54 45 4C 20 ECDTN.....INTEL
0010: 54 45 4D 50 4C 41 54 45 01 00 00 00 49 4E 54 4C TEMPLATE....INTL
0020: 16 03 11 20 01 08 00 00 66 00 00 00 00 00 00 00 ... ....f.......
0030: 01 08 00 00 62 00 00 00 00 00 00 00 00 00 00 00 ....b...........
0040: 09 5C 5F 53 42 2E 50 43 49 30 2E 45 43 00 .\_SB.PCI0.EC.
UID : 00000000
GPE Number : 09
Namepath : "\_SB.PCI0.EC"
: 00000000
: 09
: "\_SB.PCI0.EC"
UINT8 : 01
UINT8 : 08
UINT8 : 00
UINT8 : 00
UINT64 : 0000000000000066
UINT32 : 00000000
UINT8 : 12
String : "Hello World!"
This section defines the behavior of devices as that behavior relates to power management and,
specifically, to the four device power states defined by ACPI. The goal is enabling device vendors to
design power-manageable products that meet the basic needs of OSPM and can be utilized by any
ACPI-compatible operating system.
A.1 Overview
The power management of individual devices is the responsibility of a policy owner in the operating
system. This software element will implement a power management policy that is appropriate for the
type (or class) of device being managed. Device power management policy typically operates in
conjunction with a global system power policy implemented in the operating system.
In general, the device-class power management policy strives to reduce power consumption while
the system is working by transitioning among various available power states according to device
usage. The challenge facing policy owners is to minimize power consumption without adversely
impacting the system’s usability. This balanced approach provides the user with both power savings
and good performance.
Because the policy owner has very specific knowledge about when a device is in use or potentially in
use, there is no need for hardware timers or such to determine when to make these transitions.
Similarly, this level of understanding of device usage makes it possible to use fewer device power
states. Generally, intermediate states attempt to draw a compromise between latency and
consumption because of the uncertainty of actual device usage. With the increased knowledge in the
OS, good decisions can be made about whether the device is needed at all. With this ability to turn
devices off more frequently, the benefit of having intermediate states diminishes.
The policy owner also determines what class-specific events can cause the system to transition from
sleeping to working states, and enables this functionality based on application or user requests.
Notice that the definition of the wake events that each class supports will influence the system’s
global power policy in terms of the level of power management a system sleeping state can attain
while still meeting wake latency requirements set by applications or the user.
• D3. State in which device is off and not running. Device context is lost. Power can be removed
from the device.
Device power-state transitions are typically invoked through bus-specific mechanisms (for example,
ATA Standby, USB Suspend, and so on). In some cases, bus-specific mechanisms are not available
and device-specific mechanisms must be used. Notice that the explicit command for entering the D3
state might be the removal of power.
It is the responsibility of the policy owner (or other software) to restore any lost device context when
returning to the D0 state.
• PCI Bus Power Management State Transition Commands. PCI Bus device power states are
controlled and queried via the standard Power Management Status/Control Register (PMCSR).
• PCI Bus Wakeup Event Reporting. PCI wake events are reported on the optional PME#
signal, with setting of the Wake_Int bit in the PMCSR. Wake event reporting is controlled by the
Wake_En bit in the PMCSR register.
State Definition
D0 Device is on and running. It is receiving full power from the system, and is delivering full functionality
to the user.
D1 This state is not defined and not used by the default device class.
D2 This state is not defined and not used by the default device class.
D3 Device is off and not running. Device context is assumed lost, and there is no need for any of it to be
preserved in hardware. This state should consume the minimum power possible. Its only
requirement is to recognize a bus-specific command to re-enter D0. Power can be removed from
the device while in D3. If power is removed, the device will receive a bus-specific hardware reset
upon reapplication of power, and should initialize itself as in a normal power on.
D1 Optional Power consumption is less than D0 state. Device must be able to transition between
D0 and D1 states within 100 ms. No audio samples may be lost by entering and
leaving this state.
D2 Required Power consumption is less than D0 state. Device must be able to transition between
D0 and D2 states within 100 ms. Audio samples may be lost by entering and leaving
this state.
D3 Required The device is completely off or drawing minimal power. For example, a stereo will be
off, but a light-emitting diode (LED) may be on and the stereo may be listening to IR
commands.
If a device is in the D1 or D2 state it must resume within 100 ms. A device in the D3 state may take
as long as it needs to power up. It is the responsibility of the policy owner to advertise to the system
how long a device requires to power up.
All audio devices must be capable of D0, D2 and D3 states. It is desirable that an audio device be
capable of D1 state. The difference between D1 and D2 is that a device capable of D1 can maintain
complete state information in reduced power mode. The policy owner or other software must save
all states for D2-capable devices. Some audio samples may be lost in transitioning into and out of the
D2 state.
Notice that the D1 state was added to allow digital signal processor (DSP)-equipped audio hardware
to exploit low-power modes in the DSP. For example, a DSP may be used to implement Dolby AC-
3 Decode. When paused it stops playing audio, but the DSP may contain thousands of bytes worth of
state information. If the DSP supports a low-power state, it can shut down and later resume from
exactly the audio sample where it paused without losing state information.
When an audio device is in the D0 state it will refuse system requests to transition to D3 state unless
it is in background record mode. When an audio device is paused (D1 or D2) and it receives a
request to transition to the D3 state, it will save the state of the audio device and transition to the D3
state.
Since multimedia applications often open and close audio files in rapid succession, it is
recommended that an inactivity timer be employed by the policy owner to prevent needless
shutdowns (D3 transitions) of the audio hardware. For example, frequent power cycling may
damage audio devices powered by vacuum tubes.
class does not include video capture devices unless they are children of the graphics adapter. This
class does not include edge displays or hardware indicators for device states.
While saving power from the display and adapter are primary goals of Display Device Class power
management definitions, the definitions are also intended to ensure that the user perceives the
system as "off" during system sleeping states, as required above. When the system enters a lower
power state, the screen must go black so the user knows the system is idle. This is important because
devices that cannot actually save power (standard televisions, for example) can still support the user
notice of system idle by going black.
CRT Monitors are a special case in power management. On the one hand, they support a common
defined method (DPMS) for changing power states. On the other hand, that procedure and the CRT
support is extremely slow and out of keeping with other faster power control methods used by other
forms of display. This definition should not preclude the use of faster and more effective methods of
transitioning the CRT if they are available and known to the controller. DPMS is not recommended
as solution for new display devices in the future.
Internal flat panels (also known as local flat panels or sometimes as LCDs) do not normally support
or require DPMS signaling to change power states. Instead, controllers capable of managing such
panels tend to provide vendor-specific methods to control internal flat panels, often involving
special sequencing of power signals to the panel. Some may be managed only by the application or
removal of power.
Backlight control for power management states is likewise controller and even platform specific.
Note that on-off backlight control for power management states is often unrelated to backlight
intensity or brightness control that is used while in the D0 state.
The 500 milliseconds is only to allow some existing hardware to function . The target for new
devices should be 100 milliseconds.
Although 250 milliseconds is shown here because not all devices in this group are fast now, the
target resume for a new device should be 100 milliseconds.
D3 Required This state is not equivalent to the “Off” state defined in the VESA DPMS specification
because not power is actually saved.
Video image is blank
Latency to return to D0 is less than 100 milliseconds
power transitions and power management states, but the primary requirement for the method should
be low overhead.
State Status Definition
D0 Required This state is equivalent to the “On” state for a DPMS device, but is signaled to the
panel by the correct application of power and/or device specific signaling known to the
controller.
Display is fully on
Video image is active
D1 Optional This state is not required to be physically different than a D3 state if the device is able
to meet the resume requirement and the driver is able to restore state. It is signaled to
the panel by the correct application of power and/or device specific signaling known to
the controller.
Display retains internal state but may be conserving energy
Video image is blank
Latency to return to D0 must be less than 100 milliseconds
D2 Optional This state is not required to be physically different than a D3 state if the device is able
to meet the resume requirement and the driver is able to restore state. It is signaled to
the panel by the correct application of power and/or device specific signaling known to
the controller.
Display retains state but is conserving energy
Video image is blank
Latency to return to D0 is less than 100 milliseconds
D3 Required This state is equivalent to the “Off” state defined in the VESA DPMS specification. It is
signaled by the removal of display output and/or device specific methods known to the
controller.
Display is non-functional
Video image is blank
Latency to return to D0 is less than 250 milliseconds
Although 250 milliseconds is shown here because not all devices in this group are fast now, the
target resume for a new device should be 100 milliseconds.
These state transition definitions apply to both the full screen display and the video controller.
However, the control of the two devices is independent, except that a video controller will never be
put into a lower power state than its full screen display. Also, while full screen displays can
transition directly from D1 to D3 or from D2 to D3, the adapters require a transition to D0 from D1
or D2 before entering D3.
Transitions for the video controller are commanded via the bus-specific control mechanism for
device states. Monitor/LCD transitions are commanded by signaling from the video controller and
are only generated as a result of explicit commands from the policy-owner. Full screen display
power control is functionally independent from any other interface the monitor may provide (such as
USB). For instance, Hubs and HID devices in the monitor enclosure may be power-managed by their
driver over the USB bus, but the Monitor/LCD device itself may not; it must be power-managed
from the video controller using the methods above.
A video controller conforming to this specification must support the D0 and D3 states. Support for
the D1 and D2 states is optional. Transitional latencies for the D1 must be less than 100 milliseconds
while D2 and D3 must transition to D0 in less than 200 milliseconds.
Note: *Depends on capability of device (if it features D1 or D3 wake capability or not); device will be put
in state with the lowest possible power consumption.
The most common modem type is an ISA card with an embedded COM port. From a software
standpoint, they are logically identical to external modems, but the modems are powered by the PC
system unit. Power is drawn from the ISA bus without independent power switching.
This document does not specify maximum power and maximum latency requirements for the
sleeping states because these numbers are very different for different network technologies. The
device must meet the requirements of the bus that it attaches to.
Although the descriptions of states D1 and D2 are the same, the choice of whether to implement D1
or D2 or both may depend on bus services required, power requirements, or time required to restore
the physical layer. For example, a device designed for a particular bus might include state D1
because it needs a bus service such as a bus clock to support Magic Packet™ wake, and that service
is available in the bus device’s D1 power state but not in D2. Also, a device might include both state
D1 and state D2 to provide a choice between lower power and lower latency.
level (for example, S2 versus S3) so that wake frames can be detected. Conversely, a transition from
“link on” to “link off” may trigger the system to re-enter sleep at a deeper level (for example, S3
versus S2) since the network is not currently available. The network device should implement an
internal delay to avoid unnecessary transitions when the link status toggles on or off momentarily.
plugged into the bus (child devices). OSPM will track the state of all devices on the bus and will put
the bus into the best possible power state based on the current device requirements on that bus. For
example, if the PC Card cards are all in the D1 state, OSPM will put the PC Card controller in the D1
state.
Present Next Cause
State State
D2/D3 D0 Any card in any slot needing to transition to state D0 due to a wake event or because of
system usage.
D0 D1 No card in any slot is in state D0.
D0 D2 No card in any slot is in state D0 or D1.
D0 D3 All cards in all slots are in state D3.
Note: * If supported.
Note: For ATA, the D3-to-D0 transition requires a reset of the IDE channel. This means that both
devices on a channel must be placed into D3 at the same time.
A floppy disk and IDE channel device conforming to this specification must support the D0 and D3
states.
B.2 Definitions
• Built-in display adapter. This is a graphics chip that is built into the motherboard and cannot be
replaced. ACPI information is valid for such built-in devices.
•
• Add-in display adapter. This is a graphics chip or board that can be added to or removed from
the computer. Because the platform firmware cannot have specific knowledge of add-in boards,
ACPI information is not available for add-in devices.
•
• Boot-up display adapter. This is the display adapter programmed by the platform boot
firmware during machine power-on self-test (POST). It is the device upon which the machine
will show the initial operating system boot screen, as well as any platform boot firmware
messages.
• The system can change the boot-up display adapter, and it can switch between the built-in
adapter and the add-in adapter.
• Display device. This is a synonym for the term display adapter discussed above.
• Output device. This is a device, which is a recipient of the output of a display device. For
example, a CRT or a TV is an output device.
SB
|- PCI
|- VGA // Define the VGA controller in the namespace
|- _PS0 / PR0
|- _PS1 / PR1
|- _PS3
|- _DOS // Method to control display output switching
|- _DOD // Method to retrieve information about child output devices
|- _ROM // Method to retrieve the ROM image for this device
|- _GPD // Method for determining which VGA device will post
|- _SPD // Method for controlling which VGA device will post
|- _VPO // Method for determining the post options
|- CRT // Child device CRT
|- _ADR // Hardware ID for this device
|- _DDC // Get EDID information from the monitor device
|- _DCS // Get current hardware status
|- _DGS // Query desired hardware active \ inactive state
|- _DSS // Set hardware active \ inactive state
|- _PS0 \
|- _PS1 - Power methods
|- _PS2 - for the output device
|- _PS3 /
|- LCD // Child device LCD
|- _ADR // Hardware ID for this device
|- _DDC // Get EDID information from the monitor device
|- _DCS // Get current hardware status
|- _DGS // Query desired hardware active \ inactive state
|- _DSS // Set hardware active \ inactive state
|- _BCL // Brightness control levels
|- _BCM // Brightness control method
|- _BQC // Brightness Query Current Level
|- _PS0 \
|- _PS1 - Power methods
|- _PS2 - for the output device
|- _PS3 /
|- TV // Child Device TV
|- _ADR // Hardware ID for this device
|- _DDC // Get EDID information from the monitor device
|- _DCS // Get current hardware status
|- _DGS // Query desired hardware active \ inactive state
|- _DSS // Set hardware active \ inactive state
The LCD device represents the built-in output device. Mobile PCs will always have a built-in LCD
display, but desktop systems that have a built-in graphics adapter generally don’t have a built-in
output device.
B.4Display-specific Methods
The methods described in this section are all associated with specific display devices. This device-
specific association is represented in the namespace example in the previous section by the
positioning of these methods in a device tree.
Example:
Method (_DOD, 0) {
Return (
Package()
{
0x00000110, // Primary LCD panel, not detectable by firmware
0x80000100, // CRT type display, not detectable by firmware
0x80000220, // TV type display, not detectable by the firmware
0x80000411, // Secondary LCD panel, not detectable by firmware
}
)
}
17 Non-VGA output device whose power is related to the VGA device. This can be used when
specifying devices like TV Tuner, DVD decoder, Video Capture … etc.
20:18 For VGA multiple-head devices, this specifies head or pipe ID e.g. for Dual-Pipe*, Dual-Display*,
Duo-View*, TwinView*, Triple-View* … etc, beginning with 0 for head 0 or single-head device and
increasing for each additional head.
30:21 Reserved (must be 0)
31 Device ID Scheme
1 – Uses the bit-field definitions above (bits 15:0)
0 – Other scheme, contact the Video Chip Vendor
As mentioned in the above table, a “Pipe” or “Head” refers to a unique display content stream e.g. at
a particular color-depth, resolution, and refresh-rate. The “Port” refers to the display output device
attachment and may include a DAC, encoder or other mechanism required to support a given display
end-point. The “Display Type” describes the generalized class of display output technology, and the
means of integration. The “Display Index” is then an index that assists in creating a unique identifier
display end-points in scenarios where other attributes are the same.
Dual - Link
Port 2
=3 st
0 = 1 DVI
Secondary
Desktop Pipe 1 Dual-Port
Port 3
=2
Port 4
=1
Note: An “External Digital Monitor” is an external display device attachable via a user-accessible
connector standard (e.g. DFP* or DVI* Compatible Monitors).
Note: An “Internal Flat Panel” is a non-detachable fixed pixel display device, including a backlight, and is
internally associated, without user-accessible connectors, to the Video Chip (e.g. TFT LCD via
TMDS*, LVDS* interface).
Note: When Bit [31] is 0, no assumptions can be made on which ID will be used for any particular display
type. Contact the Video Chip vendor for details of the ID scheme employed.
Note: In certain cases multiple Displays Ports may be combined to increase bandwidth for a particular
Display in higher-resolution modes. In this situation, the Display Type and Port Number should
remain the same in order to retain a consistent ID for the same device, regardless of the selected
display mode.
Note: In certain cases, more than one type of display (and connector) may be supportable on a single
Port (e.g. DVI + TV + CRT on a single Display Encoder device), while only one display is
selectable at any time. In this case the Port Number field of the ID may be the same as other
Display ID’s however the other fields (e.g. Display Type) provide uniqueness.
the next boot, a 1 indicates a PCI VGA device will be posted, and a 2 indicates an AGP VGA device
will be posted.
Arguments:
None
Return Value:
An Integer containing encoded post information (32 bits valid)
Bits [1:0]
00 – Post the motherboard VGA device
01 – Post an add-in PCI VGA device
10 – Post an add-in AGP VGA device
11 – Post an add-in PCI-Express VGA device
Example
Method (_SPD, 1){ // Make the motherboard device the device to post }
Arguments:
None
Return Value:
An Integer containing the options that are implemented and available
Bit [0] – Posting the motherboard VGA device is an option. (Bit [0] should always be set)
Bit [1] – Posting a PCI VGA device is an option.
Bit [2] – Posting an AGP VGA device is an option.
Bit [3] – Posting a PCI-Express VGA device is an option.
Bits [31:4] – Reserved (must be zero)
Value Description
0x84 Previous Display Output Hotkey Pressed. Used to notify OSPM whenever the user has pressed
the Previous display hotkey.
Example:
Method (_ADR, 0) {
return(0x0100) // device ID for this CRT
}
Example:
Method (_BCL, 0) {
// List of supported brightness levels
Return (Package(7){
80, // level when machine has full power
50, // level when machine is on batteries
// other supported levels:
20, 40, 60, 80, 100}
}
The first number in the package is the level of the panel when full power is connected to the
machine. The second number in the package is the level of the panel when the machine is on
batteries. All other numbers are treated as a list of levels OSPM will cycle through when the user
toggles (via a keystroke) the brightness level of the display.
These levels will be set using the _BCM method described in the following section.
Example:
Method (_BCM, 1) { // Set the requested level }
The method will be called in response to a power source change or at the specific request of the end
user, for example, when the user presses a function key that represents brightness control.
Example:
Method (_DDC, 2) {
If (LEqual (Arg0, 1)) { Return (Buffer(128){ ,,,, }) }
If (LEqual (Arg0, 2)) { Return (Buffer(256){ ,,,, }) }
Return (0)
}
The buffer will later be interpreted as an EDID data block. The format of this data is defined by the
VESA EDID specification.
Example:
• If the output signal is activated by _DSS, _DCS returns 0x1F or 0x0F.
The desired state represents what the user wants to activate or deactivate, based on the special
function keys the user pressed. OSPM will query the desired state when it receives the display toggle
event (described earlier).
Bits Definition
31 0 – Don’t do actual switching, just cache the change
1 – If Bit [30] = 0, commit actual switching, including any _DSS with MSB=0 called before
If Bit [30] = 1, don’t do actual switching, change _DGS to next state
29:1 Reserved (must be zero)
Example Usage:
OS may call in such an order to turn off CRT, and turn on LCD
CRT._DSS(0);
LCD._DSS(80000001L);
or
LCD._DSS(1);
CRT._DSS(80000000L);
OS may call in such an order to force platform runtime firmware to make _DGS jump to next state
without actual CRT, LCD switching
CRT._DSS(40000000L);
LCD._DSS(C0000001L);
Value Description
0x88 Zero Brightness. Used to notify OSPM that the output device brightness should be zeroed,
effectively turning off any lighting that is associated with the device. Used to notify OSPM that the
user pressed a button or key associated with zeroing device brightness. This is not to be confused
with putting the device in a D3 state. While the brightness may be decreased to zero, the device
may still be displaying, using only ambient light.
0x89 Display Device Off. Used to notify OSPM that the device should be put in an off state, one that is
not active or visible to the user, usually D3, but possibly D1 or D2. Used to notify OSPM that the
user pressed a low power button or key associated with putting the device in an off state. There is
no need for a corresponding “device on” notification, for two reasons. First, OSPM may choose to
toggle device state when this event is pressed multiple times. Second, OSPM may (and probably
will) choose to turn the monitor on whenever the user types on the keyboard, moves the mouse, or
otherwise indicates that he or she is attempting to interact with the machine.
The user now presses the display toggle switch, which would switch the TV output to the CRT.
The platform runtime firmware first updates three temporary variables representing the desired state
of output devices:
want_crt_active – 1
want_panel_active – 1
want_tv_active – 0
Then the platform runtime firmware checks the display_switching variable. Because this variable is
set to zero, the platform runtime firmware does not do any device reprogramming, but instead
generates a Notify(VGA, 0x80/0x81) event for the display. This event will be sent to OSPM.
OSPM will call the _DGS method for each enumerated output device to determine which devices
should now be active. OSPM will determine whether this is possible, and will reconfigure the
internal data structure of the OS to represent this state change. The graphics modes will be
recomputed and reset.
Finally, OSPM will call the _DSS method for each output device it has reconfigured.
Note: OSPM may not have called the _DSS routines with the same values and the _DGS routines
returned, because the user may be overriding the default behavior of the hardware-switching
driver or operating system-provided UI. The data returned by the _DGS method (the want_XXX
values) are only a hint to the OS as to what should happen with the output devices.
If the display-switching variable is set to 1, then the platform runtime firmware would not send the
event, but instead would automatically reprogram the devices to switch outputs. Any legacy display
notification mechanism could also be performed at this time.
Symbols
_EJx 374
??????????????????????????????????? 163
????????????????????????????????????????????? 163
A
AC adapter
device ID 296
power source objects 651
AC status notification 632
access, device 725
AccessAs term 270, 737
acoustics See noise
ACPI
definition 25
device ID 295, 313
goals 9
ACPI Hardware See hardware
ACPI Machine Language See AML
ACPI mode
entering 783
exiting 787
ACPI Namespace
AML encoding 1033
control method access 260
definition 25
display adapters 1076
embedded controller device definition 726
generic hardware registers 106
Modifier Objects encoding, AML 1019
naming conventions 251
root namespaces 254
SMBus host controller objects 733
ACPI Source Language See ASL
ACPI System Description tables See tables
ACPI-compatible hardware See hardware
Acquire (Acquire a Mutex) 897
Acquire terms 958
active cooling
_ACx object 665, 678
control methods 668
definition 664
engaging 668
preferences 64, 671
interface 28
conversion, data types 876
cooling modes 63, 664
cooling preferences 64, 671
CopyObject (Copy an Object) 905
core logic, system events 57
CPU
boot configuration 782
boot-up 780
cache flushing 477
clock logic 473
definition 26
fixed hardware control 71, 118
multiple performance state control 520
non-symmetric power state support 473
passive cooling 669
performance states 41
processor power states 471
thermal management 62
throttling 473, 513
waking operations 52
crashed systems 88, 89
CreateBitField (Create 1-Bit Buffer Field) 906
CreateByteField (Create 8-Bit Buffer Field) 906
CreateDWordField (Create 32-Bit Buffer Field) 906
CreateField (Create Arbitrary Length Buffer Field) 907
CreateQWordField (Create 64-Bit Buffer Field) 907
CreateWordField (Create 16-Bit Buffer Field) 907
Critical battery state 61
Critical Temperature (_CRT) object 670, 682
critical temperature shutdowns 664, 670
Cross Device Dependency 79
CRT monitors, power management 1055
C-States (processor power) 476, 481
CT phones See modems
Current Resource Settings (_CRS) objects 338, 551
D
D0-Fully On
control method 448, 449
definition 39
In Rush Current (_IRC) object 454
power resource object 450
transitioning to 450
D1 Device State
definition 38
transitioning to 451
D1 PlaceNameDevice PlaceTypeState
control methods 448
D1 PlaceNameplaceDevice PlaceTypeState
power resource objects 450
D2 Device State
definition 38
transitioning to 451
D2 PlaceNameDevice PlaceTypeState
control methods 448
D2 PlaceNameplaceDevice PlaceTypeState
power resource objects 451
D3-Off
control methods 449
definition 38
dash character
AML notation 1016
ASL notation 838
data buffers, IPMI 264
data buffers, SMBus 271, 738
Data Objects encoding, AML 1018
data objects, ASL
Buffer 900
Package 964
data register array (SMB_DATA) 719
data types
ASL 876
concatenate 884, 885, 886, 902
data types, resource See resource data types
DataTableRegion (Create Data Table Operation Region) 907
day alarm 94
day mode 47
DAY_ALRM 95
DDB Handle data type, ASL 876, 880
DDT, Plug and Play devices 56
Debug (Debugger Output) 908
Debug Object data type, ASL 876, 880
Debug Objects encoding, AML 1027
debugging
requirements for 835
decimals, notation 837
restoration 39
DSDT
definition 27, 150
purpose 115
dual 8259 155, 156
dual-button model 88
duty cycle 473
DVD decoders 1079
DWORD 103
DWORD resource descriptor format 398
DWordIO (DWord IO Resource Descriptor Macro) 913
DWordMemory (DWord Memory Resource Descriptor Macro) 915
DWordSpace (DWord Space Resource Descriptor Macro) 917
dynamic insertion and removal 370
dynamic objects 259
dynamic Operation Regions 963
dynamic transitioning 75
E
E_TMR_VAL 103
E820 mapping 764
EC_DATA (embedded controller data register) 710
EC_SC (R) (embedded controller status register) 709
EC_SC (W) (embedded controller command register) 710
ECDT 170
ECI See embedded controller interface
EC-SMB-HC 715, 728
EDID control methods (_DDC) 1087
EFI
GetMemoryMap interface 767
RSDP location 121
EISA ID 325
EISAID (EISA ID String To Integer Conversion Macro) 918
Eject (_EJx) object 374
Eject Device List (_EDL) object 372
Ejection Dependent Device (_EJD) object 373
ejection mechanisms 370
Else (Alternate Execution) 919
ElseIf (Alternate/Conditional Execution) 919
embedded controller
boot resources table 170
burst mode 711
device ID 295
device object 565
F
FACS
definition 28
flags 147
Global Lock 147
table fields 144
FADT
alarm bits 94
cache flushing 477, 780
definition 28
flags 105, 106
optional feature bits 97
Plug and Play IDs 343
processor power states 472
reset register location 104, 105
SCI interrupt mapping 96
fans
active cooling 63
device operations 673
noise preferences 64
Plug and Play ID 112
thermal zone example 696
Fatal (Fatal Error Check) 927
fatal errors 927
features
fixed 29
generic 29
generic hardware 108
Field (Declare Field Objects) 927
fields
alarm 95
cache flushing 780
declaring objects 927
embedded controller boot resources 170
FACS 144
FADT 128, 343
I/O APIC 155
IPMI 263
MADT 152, 179, 204
NMI 157
Processor Local APIC 154, 162, 205, 207, 208, 209
reserved 117
RSDT 127
SBST 169
SMBus 267, 269, 736
Start Dependent Functions 385
FindSetLeftBit (Find First Set Left Bit) 930
FindSetRightBit (Find First Set Right Bit) 930
firmware
ACPI System 14
embedded controller requirements 712
OSPM controls 45
SMM functional fixed hardware implementation 118
Firmware ACPI Control Structure See FACS
Fixed ACPI Description Table See FADT
fixed event handling 282
fixed features
definition 29
events 29
registers 29
fixed hardware
definition 69
feature control bits 101
feature enable bits 99
feature status bits 97
features 80
functional implementation 71
interfaces 118
power button 89
programming model 70
register blocks 83
registers 82, 97
sleep button 91
fixed location I/O port descriptor resource descriptor format 387
Fixed Register Resource Provider (_FIX) 342
fixed width registers 409
FixedIO (Fixed IO Resource Descriptor) 931
FixedList 837
flags
Burst 710
DWORD 398
FACS 147
FADT 105, 106
I/O resource 406
IA-PC boot architecture 142
Input Buffer Full (IBF) 710, 715
transitioning to 46
game pads See input devices
GAS See Generic Address Structure
GBL_EN 100
GBL_RLS 102
GBL_STS 98
general event model 57
general-purpose event registers
addresses 85, 106
blocks 86, 108
definition 29
event 0 108
event 0 enable 109
event 0 status 109
event 1 109
event 1 enable 110
event 1 status 110
grouping 84
general-purpose events
_Exx, _Lxx, and _Qxx methods 284
handling 283, 287
wake 285
generic address space, SMBus 731
Generic Address Structure (GAS) 119
generic events
example 107, 469
top-level 107
generic feature, definition 29
generic hardware
definition 69
features 80, 108
power button control 89
registers 71, 82, 106
sleep button control 91
generic ISA bus device 565
generic register resource descriptor format 409
Get POST Device (_GPD) 1082
Get ROM Data (_ROM) 1082
Get Task File (_GTF) control method 566
Get Timing Mode (_GTM) control method 569
GetMemoryMap 767
Global Lock 147
Global Lock (_GLK) object 435
embedded controller 28
fixed hardware 118
hardware 14
sharing protocols 708
SMBus 34, 731
interference, device 79
Interrupt (Extended Interrupt Descriptor Macro) 940, 944
interrupt events
logic 76
SCI 96
shareable 96
SMI 96
Interrupt Source Overrides 156
interrupt sources, non-maskable (NMIs) 157
interrupt status bits 78
interrupts
Extended Interrupt resource descriptor format 407
models 152, 156, 168, 179, 210
Platform Interrupt Source structure 160
PMIs 160
invocation, control methods 260
IO (I/O Port Resource Descriptor Macro) 945
IPMI
data buffers 264
fields, declaring 263
operation regions 262
IRQ (Interrupt Resource Descriptor Macro 945
IRQNoFlags (Interrupt Resource Descriptor Macro) 946
IRQs
mapping 156, 157
PCI routing 363
resource descriptor format 383
ISA
bus device 295, 313, 565
Device Objects code 911
interrupt sources 156
old cards 386
ISDN Terminal Adapters See modems
isolation logic 54
italics, ASL notation 838
J
joysticks See input devices
K
Kelvin scale 667
kernel 13
key, logic diagrams 73
keyboard controllers 705
keyboards See input devices
L
LAnd (Logical And) 947
large resource resource descriptor format 278, 280, 389
latency
acceptable 45, 327, 328, 332, 1081
global power states 37
processor power states 471
LCD panels
brightness control 1075
power management 1055
legacy BIOS interfaces 43
legacy hardware
BIOS specification 23
boot flags 142
converting to fixed 70
definition 30
interrupt handlers 96
support 11
legacy OS, definition 31
legacy systems
definition 30
power button functions 46
power management 78
power state transitions 74
switching devices out of 431
transitioning to ACPI 96
LEqual (Logical Equal) 947
LGreater (Logical Greater) 947
LGreaterEqual (Logical Greater Than Or Equal) 948
lid device 296
lid status notification values 292, 293, 294
lid switch 110
life, battery 59
link status events 1067
LINT 157
LLess (Logical Less) 948
LLessEqual (Logical Less Than Or Equal) 948
purpose 391
Memory24 (Memory Resource Descriptor Macro) 953
Memory32 (Memory Resource Descriptor Macro) 954
Memory32Fixed (Memory Resource Descriptor Macro) 955
Message (_MSG) control method 555
Method (Declare Control Method) 955
Method data type, ASL 876, 880
methods, control See control methods
mice See input devices
Microsoft Device Class Power Management specifications 50
Mid (Extract Portion of Buffer or String) 957
mobile PCs
lid switch 110
power management 46
profile system type 141
Mod (Integer Modulo) 957
modems
configuration example 57
power management 1051, 1064
power management example 52
modifiers
ASL names 871
Module Device 296, 576
MON-ALRM 95
monitors See display devices
month alarm 95
motherboard device configurations
ACPI goals 9
controlled by OSPM 43
modems 1065
MPS INTI flags 156
Multiple APIC Description Table See MADT
Multiple APIC Table Entry (_MAT) object 352
multiple Smart Battery Subsystem 635
Multiply (Integer Multiply) 958
multiprocessor PCs
performance control 520
power management for 47
mutex
acquiring 897
Global Lock 312
release synchronization objects 988
Mutex (Declare Synchronization/Mutex Object) 958
phones, answering
modem example 53
PIC method 318
pins
general event model 58
GPE 109
PlaceNameAddress PlaceTypeRange types 763
PlaceNameDevice PlaceNameSet PlaceTypeState (_DSS) 1088
PlaceNameGraphics PlaceTypeState, Query (_DGS) 1088
PlaceNameSet PlaceNamePower PlaceTypeState 51
placeSOHO servers 142
platform
implementation 14
Platform Interrupt Source structure 160, 161, 162
Platform Management Interrupts (PMIs) 160
Plug and Play devices
ACPI control 56
IDs 295, 321
large resource items 389
resource control method 336
small resource items 383
specifications 23
PM timer
bits 102
function 78
idle time, determining 56
operations 87
register address 85
register blocks 86
PM1 Control registers
addresses 84
bits 101
blocks 86
grouping 84, 101
PM1 Enable registers 98
PM1 Event registers
addresses 84
blocks 85
grouping 84, 97
PM1 Status registers 97
PM2 Control registers
addresses 85
bits 103
blocks 86
PM2 Controller register grouping 84
PMIs 160
Pn performance state, definition 41
PNPBIOS 43
Polarity flags 157
policy owner 1049
port descriptors, I/O 386
Possible Resource Settings (_PRS) object 362
POST Device control methods 1082, 1083
power button
ASL code example 89
control methods 89, 565
definition 32
device ID 296
dual-button model 88
fixed hardware 89
functions 46
object notification values 292
override 90, 93
single-button model 88
Power Consumer List (_PCL) object 652
power consumption
device and processor performance states 41
global power states 37
power loss
Mechanical Off 74
power management
audio devices 1052
buses 1050
COM port devices 1054
cooling, relationship to 64
definition 33
desktop PCs 46
device 48, 1051
device objects 446
display devices 1055
display standards 1050
goals 10
input devices 1062
legacy 78
mobile PCs 46
modem devices 1064
modem example 52
multiprocessor PCs 47
network devices 1066
PC Card controllers 1068
PCI 1050
PCMCIA 1050
performance states 56
performance vs. energy conservation 64
preferred system types 141
servers 47
setting device power states 51
storage devices 1070
power management (PM) timer
function 78
idle time, determining 56
operations 87
register address 85
register blocks 86
Power Resource data type, ASL 876, 880
power resources
battery management 629
child objects 444
definition 33
device objects 450
isolation logic 54
objects 443
shared 55
wake system object 452
Power Source (_PSR) object 652
power sources
AC adapter 652
definition 33
object notification values 291, 294
power states
control methods 448, 449
controlled by OSPM 45
device 37
global 35
non-symmetric processor 473
objects 448, 449
processor 471
sleeping 39
transitioning 74
S5 Soft-Off
behavior during 778
definition 36, 40
properties 37
transitioning to 779
SAPIC
definition 34
I/O 30, 158
local 31
NMI 157
Processor Local 159
SATA
controller device 571
saving system context
during emergency shutdown 62
S4 Non-Volatile Sleep state 777
SBST 169
SCI
definition 35
embedded controller events 714
interrupt handlers 76, 96
SCI_EN 96, 97, 101
Scope (Open Named Scope) 989
SCSI, power management 1050
Secondary System Description Table See SSDT
Segment (_SEG) object 434
Send/Receive Byte (SMBSendReceive) protocol 274, 740
separators, ASL 837
Serialized methods 934, 956
server machines, power management 47
Set Cooling Policy (SCP) control method 685
Set POST Device (_SPD) 1083
Set Resource Settings (_SRS) object 368
Set the Brightness Level (_BCM) 1086
Set Timing Mode (_STM) control method 570
settings, user
performance vs. energy conservation 64, 671
power button 46
shareable interrupts 96
shared interface, embedded controller 706, 708
ShiftLeft (Integer Shift Left) 990
ShiftRight (Integer Shift Right) 991
Short Vendor-Defined Resource Descriptor macro 1006
functions 106
symbol 73
status codes, SMBus 733
status notification, Smart Battery 632
status register 57
status register (SMB_STS) 716
sticky status bit, definition 73
storage devices, power management 1051, 1070
Store (Store an Object) 994
storing results, ASL operators 878
Streamlined Advanced Programmable Interrupt Controller See SAPIC
String (_STR) object 335
String data type, ASL 876, 880
strings, ASL 872
Subtract (Integer Subtract) 995
supplemental documentation 23
surprise-style removal 370, 381
Switch (Select Code To Execute Based On Expression) 995
switching, output devices 1090
Sx states See Sleeping states
syntax
OperationRegion 262, 735
Power Resource statements 443
syntax, ASL 837
system context
definition 34
during emergency shutdown 62
S4 Sleeping state 777
sleep states lost in 40
System Control Interrupt See SCI
system description tables See tables
system events, general model 57
system indicators 554
System Management Bus See SMBus
System Management Interrupt See SMI
System Management Mode See SMM
System Status (_SST) control method 554
System Wake (_WAK) control method 467
T
tables
address format 118
compatibility 118
DSDT 150