ACPI Component Architecture Programmer Reference
Total Page:16
File Type:pdf, Size:1020Kb
ACPI Component Architecture User Guide and Programmer Reference OS-Independent Kernel Subsystem, Debugger, and Utilities Revision 6.2 July 17, 2015 ACPI Component Architecture User Guide and Programmer Reference Information in this document is provided in connection with Intel® products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel’s Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked “reserved” or “undefined.” Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The ACPI Component Architecture may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Copyright © 2000 – 2015 Intel Corporation *Other brands and names are the property of their respective owners. 2 ACPI Component Architecture User Guide and Programmer Reference Contents 1 Introduction ------------------------------------------------------------------------------------------------ 15 1.1 Document Structure .............................................................................................15 1.2 Rationale and Justification ...................................................................................15 1.3 Reference Documents .........................................................................................16 1.4 Document History.................................................................................................16 1.5 Overview of the ACPI Component Architecture...................................................18 2 Architecture Overview ---------------------------------------------------------------------------------- 20 2.1 Overview of the ACPICA Subsystem...................................................................20 2.1.1 OS-independent ACPICA Subsystem .................................................... 20 2.1.2 Operating System Services Layer .......................................................... 21 2.1.3 Relationships Between Host OS, ACPICA, and Host OSL .................... 22 2.1.3.1 General Architectural Model.................................................... 22 2.1.3.2 Host Operating System Interaction ......................................... 22 2.1.3.3 OS Services Layer Interaction ................................................ 22 2.1.3.4 ACPICA Subsystem Interaction .............................................. 22 2.2 Architecture of the ACPICA Subsystem ..............................................................23 2.2.1 ACPI Table Management........................................................................ 24 2.2.2 Early ACPI Table Access........................................................................ 24 2.2.3 AML Interpreter ....................................................................................... 24 2.2.4 Namespace Management....................................................................... 25 2.2.5 Resource Management........................................................................... 25 2.2.6 ACPI Hardware Management................................................................. 25 2.2.7 Event Handling........................................................................................ 25 2.2.8 Requests from Host OS to ACPICA Subsystem..................................... 26 2.3 Architecture of the OS Services Layer (OSL) ......................................................26 2.3.1 Types of OSL Services ........................................................................... 27 2.3.2 Requests from ACPICA Subsystem to OS ............................................. 27 3 Design Details --------------------------------------------------------------------------------------------- 29 3.1 ACPI Namespace Fundamentals.........................................................................29 3.1.1 Named Objects ....................................................................................... 29 3.1.2 Scopes .................................................................................................... 29 3.1.2.1 Example Namespace Scopes, Names, and Objects .............. 29 3.1.3 Predefined Objects ................................................................................. 30 3.1.4 Logical Namespace Layout..................................................................... 30 3.2 Execution Model...................................................................................................31 3.2.1 Initialization ............................................................................................. 31 3.2.2 Memory Allocation .................................................................................. 32 3.2.2.1 Caller Allocates All Buffers...................................................... 32 3.2.2.2 ACPI Allocates Return Buffers ................................................ 32 3.2.3 Parameter Validation .............................................................................. 33 3.2.4 Exception Handling ................................................................................. 33 3.2.5 Multitasking and Reentrancy................................................................... 33 3.2.6 Event Handling........................................................................................ 33 3.2.6.1 Fixed Events............................................................................ 34 3.2.6.2 General Purpose Events ......................................................... 34 3.2.6.3 Notify Events ........................................................................... 34 3.2.7 Address Spaces and Operation Regions................................................ 34 3 ACPI Component Architecture User Guide and Programmer Reference 3.2.7.1 Installation of Address Space Handlers .................................. 35 3.2.7.2 ACPI-Defined Address Spaces ............................................... 35 3.2.7.3 Sharing Resources between Device Drivers and AML ........... 36 3.3 Policies and Philosophies ....................................................................................38 3.3.1 External Interfaces .................................................................................. 38 3.3.1.1 Exception Codes ..................................................................... 38 3.3.1.2 Memory Buffers ....................................................................... 38 3.3.2 Subsystem Initialization .......................................................................... 39 3.3.2.1 ACPI Table Validation ............................................................. 39 3.3.2.2 Required ACPI Tables............................................................. 39 3.3.3 Major Design Decisions .......................................................................... 39 3.3.3.1 Performance versus Code/Data Size...................................... 39 3.3.3.2 Object Management – No Garbage Collection ....................... 40 4 Implementation Details --------------------------------------------------------------------------------- 41 4.1 Required Host OS Initialization Sequence...........................................................41 4.1.1 Bootload and Low Level Kernel Initialization .......................................... 41 4.1.2 ACPICA Subsystem Initialization............................................................ 41 4.1.3 Other OS Initialization ............................................................................. 41 4.1.4 Device Enumeration, Configuration, and Initialization ............................ 42 4.1.5 Final OS Initialization .............................................................................. 42 4.2 Required ACPICA Initialization Sequence...........................................................42 4.2.1 Global Initialization – AcpiInitializeSubsystem........................................ 42 4.2.2 ACPI Table and Namespace Initialization .............................................. 42 4.2.2.1 AcpiInitializeTables.................................................................. 42 4.2.2.2 AcpiGetTable, AcpiGetTableHeader, AcpiGetTableByIndex.. 42 4.2.2.3 AcpiLoadTables....................................................................... 43 4.2.2.4 Internal ACPI Namespace Initialization................................... 43 4.2.3 Hardware Initialization – AcpiEnableSubsystem .................................... 43 4.2.3.1 ACPI Hardware and Event Initialization .................................. 43 4.2.4 Handler Installation ................................................................................. 44 4.2.4.1 Handler Types ......................................................................... 44 4.2.5