Advanced Configuration and Power Interface Specification Hewlett-Packard Corporation


ACPI Source Language (ASL) Reference 531



Download 7.02 Mb.
Page3/86
Date31.01.2017
Size7.02 Mb.
#13953
1   2   3   4   5   6   7   8   9   ...   86

20 ACPI Source Language (ASL) Reference 531

20.1    ASL Language Grammar 531

20.1.1    ASL Grammar Notation 532

20.1.2    ASL Name and Pathname Terms 534

20.1.3    ASL Root and Secondary Terms 534

20.1.4    ASL Data and Constant Terms 535

20.1.5    ASL Opcode Terms 537

20.1.6    ASL Primary (Terminal) Terms 538

20.1.7    ASL Parameter Keyword Terms 547

20.1.8    ASL Resource Template Terms 548

20.2    ASL Concepts 554

20.2.1    ASL Names 554

20.2.2    ASL Literal Constants 554

20.2.3    ASL Resource Templates 556

20.2.4    ASL Macros 557

20.2.5    ASL Data Types 559



20.3    ASL Operator Summary 571

20.4    ASL Operator Summary By Type 573

20.5    ASL Operator Reference 576

20.5.1 Acquire (Acquire a Mutex) 576

20.5.2 Add (Integer Add) 576

20.5.3 Alias (Declare Name Alias) 577

20.5.4 And (Integer Bitwise And) 577

20.5.5    Argx (Method Argument Data Objects) 577

20.5.6 BankField (Declare Bank/Data Field) 577

20.5.7 Break (Break from While) 578

20.5.8 BreakPoint (Execution Break Point) 579

20.5.9    Buffer (Declare Buffer Object) 579

20.5.10 Case (Expression for Conditional Execution) 579

20.5.11 Concatenate (Concatenate Data) 580

20.5.12 ConcatenateResTemplate (Concatenate Resource Templates) 580

20.5.13 CondRefOf (Create Object Reference Conditionally) 580

20.5.14 Continue (Continue Innermost Enclosing While) 581

20.5.15 CopyObject (Copy and Store Object) 581

20.5.16 CreateBitField (Create 1-Bit Buffer Field) 581

20.5.17 CreateByteField (Create 8-Bit Buffer Field) 582

20.5.18 CreateDWordField (Create 32-Bit Buffer Field) 582

20.5.19 CreateField (Create Arbitrary Length Buffer Field) 582

20.5.20 CreateQWordField (Create 64-Bit Buffer Field) 582

20.5.21 CreateWordField (Create 16-Bit Buffer Field) 583

20.5.22 DataTableRegion (Create Data Table Operation Region) 583

20.5.23    Debug (Debugger Output) 584

20.5.24 Decrement (Integer Decrement) 584

20.5.25 Default (Default Execution Path in Switch) 584

20.5.26   DefinitionBlock (Declare Definition Block) 585

20.5.27 DerefOf (Dereference an Object Reference) 585

20.5.28 Device (Declare Bus/Device Package) 585

20.5.29 Divide (Integer Divide) 587

20.5.30  DMA (DMA Resource Descriptor Macro) 587

20.5.31 DWordIO (DWord IO Resource Descriptor Macro) 588

20.5.32 DWordMemory (DWord Memory Resource Descriptor Macro) 589

20.5.33 DWordSpace (DWord Space Resource Descriptor Macro) 591

20.5.34 EISAID (EISA ID String To Integer Conversion Macro) 592

20.5.35 Else (Alternate Execution) 592

20.5.36 ElseIf (Alternate/Conditional Execution) 593

20.5.37   EndDependentFn (End Dependent Function Resource Descriptor Macro) 594

20.5.38 Event (Declare Event Synchronization Object) 594

20.5.39    ExtendedIO (Extended IO Resource Descriptor Macro) 594

20.5.40 ExtendedMemory (Extended Memory Resource Descriptor Macro) 596

20.5.41 ExtendedSpace (Extended Address Space Resource Descriptor Macro) 597

20.5.42   External (Declare External Objects) 598

20.5.43 Fatal (Fatal Error Check) 599

20.5.44 Field (Declare Field Objects) 599

20.5.45 FindSetLeftBit (Find First Set Left Bit) 602

20.5.46 FindSetRightBit (Find First Set Right Bit) 602

20.5.47   FixedIO (Fixed IO Resource Descriptor Macro) 602

20.5.48 FromBCD (Convert BCD To Integer) 603

20.5.49 Function (Declare Control Method) 603

20.5.50 If (Conditional Execution) 604

20.5.51   Include (Include Additional ASL File) 604

20.5.52 Increment (Integer Increment) 605

20.5.53 Index (Indexed Reference To Member Object) 605

20.5.54 IndexField (Declare Index/Data Fields) 607

20.5.55 Interrupt (Interrupt Resource Descriptor Macro) 608

20.5.56 IO (IO Resource Descriptor Macro) 609

20.5.57   IRQ (Interrupt Resource Descriptor Macro) 610

20.5.58 IRQNoFlags (Interrupt Resource Descriptor Macro) 610

20.5.59 LAnd (Logical And) 611

20.5.60 LEqual (Logical Equal) 611

20.5.61 LGreater (Logical Greater) 611

20.5.62 LGreaterEqual (Logical Greater Than Or Equal) 612

20.5.63 LLess (Logical Less) 612

20.5.64 LLessEqual (Logical Less Than Or Equal) 612

20.5.65 LNot (Logical Not) 613

20.5.66 LNotEqual (Logical Not Equal) ) 613

20.5.67 Load (Load Definition Block) 613

20.5.68 LoadTable (Load Definition Block From XSDT) 614

20.5.69   Localx (Method Local Data Objects) 615

20.5.70 LOr (Logical Or) 615

20.5.71 Match (Find Object Match) 615

20.5.72    Memory24 (Memory Resource Descriptor Macro) 616

20.5.73    Memory32 (Memory Resource Descriptor Macro) 617

20.5.74 Memory32Fixed (Memory Resource Descriptor Macro) 618

20.5.75 Method (Declare Control Method) 618

20.5.76 Mid (Extract Portion of Buffer or String) 620

20.5.77 Mod (Integer Modulo) 620

20.5.78 Multiply (Integer Multiply) 620

20.5.79 Mutex (Declare Synchronization/Mutex Object) 621

20.5.80 Name (Declare Named Object) 621

20.5.81 NAnd (Integer Bitwise Nand) 622

20.5.82 NoOp Code (No Operation) 622

20.5.83 NOr (Integer Bitwise Nor) 622

20.5.84 Not (Integer Bitwise Not) 622

20.5.85 Notify (Notify Object of Event) 623

20.5.86 ObjectType (Get Object Type) 623

20.5.87 One (Constant One Object) 624

20.5.88 Ones (Constant Ones Object) 624

20.5.89 OperationRegion (Declare Operation Region) 624

20.5.90 Or (Integer Bitwise Or) 626

20.5.91    Package (Declare Package Object) 626

20.5.92 PowerResource (Declare Power Resource) 627

20.5.93 Processor (Declare Processor) 627

20.5.94    QWordIO (QWord IO Resource Descriptor Macro) 628

20.5.95 QWordMemory (QWord Memory Resource Descriptor Macro) 629

20.5.96 QWordSpace (QWord Space Resource Descriptor Macro) 631

20.5.97 RefOf (Create Object Reference) 632

20.5.98 Register (Generic Register Resource Descriptor Macro) 632

20.5.99 Release (Release a Mutex Synchronization Object) 633

20.5.100 Reset (Reset an Event Synchronization Object) 633

20.5.101 ResourceTemplate (Resource To Buffer Conversion Macro) 634

20.5.102 Return (Return from Method Execution) 634

20.5.103 Revision (Constant Revision Object) 634

20.5.104 Scope (Open Named Scope) 634

20.5.105 ShiftLeft (Integer Shift Left) 635

20.5.106 ShiftRight (Integer Shift Right) 636

20.5.107 Signal (Signal a Synchronization Event) 636

20.5.108 SizeOf (Get Data Object Size) 636

20.5.109 Sleep (Milliseconds Sleep) 636

20.5.110 Stall (Stall for a Short Time) 637

20.5.111    StartDependentFn (Start Dependent Function Resource Descriptor Macro) 637

20.5.112 StartDependentFnNoPri (Start Dependent Function Resource Descriptor Macro) 638

20.5.113 Store (Store an Object) 638

20.5.114 Subtract (Integer Subtract) 639

20.5.115 Switch (Select Code To Execute Based On Expression) 639

20.5.116 ThermalZone (Declare Thermal Zone) 641

20.5.117 Timer (Get 64-Bit Timer Value) 641

20.5.118 ToBCD (Convert Integer to BCD) 642

20.5.119 ToBuffer (Convert Data to Buffer) 642

20.5.120 ToDecimalString (Convert Data to Decimal String) 642

20.5.121 ToHexString (Convert Data to Hexadecimal String) 643

20.5.122 ToInteger (Convert Data to Integer) 643

20.5.123 ToString (Convert Buffer To String) 643

20.5.124 ToUUID (Convert String to UUID Macro) 644

20.5.125 Unicode (String To Unicode Conversion Macro) 645

20.5.126 Unload (Unload Definition Block) 645

20.5.127    VendorLong (Long Vendor Resource Descriptor) 645

20.5.128    VendorShort (Short Vendor Resource Descriptor) 646

20.5.129 Wait (Wait for a Synchronization Event) 646

20.5.130 While (Conditional Loop) 646

20.5.131 WordBusNumber (Word Bus Number Resource Descriptor Macro) 647

20.5.132    WordIO (Word IO Resource Descriptor Macro) 648

20.5.133 WordSpace (Word Space Resource Descriptor Macro) ) 649

20.5.134 XOr (Integer Bitwise Xor) 651

20.5.135 Zero (Constant Zero Object) 651



21    ACPI Machine Language (AML) Specification 652

21.1    Notation Conventions 652

21.2    AML Grammar Definition 653

21.2.1    Table and Table Header Encoding 653

21.2.2    Name Objects Encoding 653

21.2.3    Data Objects Encoding 654

21.2.4    Package Length Encoding 655

21.2.5    Term Objects Encoding 655

21.2.6    Miscellaneous Objects Encoding 661

21.3    AML Byte Stream Byte Values 663

21.4    AML Encoding of Names in the Namespace 668

A   Device Class PM Specifications 670

A.1   Overview 670

A.2   Device Power States 670

A.2.1   Bus Power Management 671

A.2.2   Display Power Management 671

A.2.3   PCMCIA/PCCARD/CardBus Power Management 671

A.2.4   PCI Power Management  671

A.2.5   USB Power Management 671

A.2.6   Device Classes 672

A.3   Default Device Class 672

A.3.1   Default Power State Definitions 672

A.3.2   Default Power Management Policy 672

A.3.3   Default Wake Events 673

A.3.4   Minimum Power Capabilities 673

A.4   Audio Device Class 673

A.4.1   Power State Definitions 673

A.4.2   Power Management Policy 673

A.4.3   Wake Events 674

A.4.4   Minimum Power Capabilities 674

A.5   COM Port Device Class 674

A.5.1   Power State Definitions 675

A.5.2   Power Management Policy 675

A.5.3   Wake Events 675

A.5.4   Minimum Power Capabilities 675

A.6   Display Device Class 676

A.6.1   Power State Definitions 676

A.6.2   Power Management Policy for the Display Class 681

A.6.3   Wake Events 682

A.6.4   Minimum Power Capabilities 682

A.6.5 Performance States for Display Class Devices 682

A.7   Input Device Class 684

A.7.1   Power State Definitions 684

A.7.2   Power Management Policy 684

A.7.3   Wake Events 685

A.7.4   Minimum Power Capabilities 685

A.8   Modem Device Class 685

A.8.1   Technology Overview 685

A.8.2   Power State Definitions 686

A.8.3   Power Management Policy 687

A.8.4   Wake Events 687

A.8.5   Minimum Power Capabilities 687

A.9   Network Device Class 688

A.9.1   Power State Definitions 688

A.9.2   Power Management Policy 689

A.9.3   Wake Events 689

A.9.4   Minimum Power Capabilities 689

A.10   PC Card Controller Device Class 689

A.10.1   Power State Definitions 690

A.10.2   Power Management Policy 691

A.10.3   Wake Events 691

A.10.4   Minimum Power Capabilities 691

A.11   Storage Device Class 692

A.11.1   Power State Definitions 692

A.11.2   Power Management Policy 693

A.11.3   Wake Events 693

A.11.4   Minimum Power Capabilities 693

B   ACPI Extensions for Display Adapters 694

B.1   Introduction 694

B.2   Definitions 694

B.3   ACPI Namespace 695

B.4   Display-specific Methods 696

B.4.1   _DOS (Enable/Disable Output Switching) 696

B.4.2   _DOD (Enumerate All Devices Attached to the Display Adapter) 697

B.4.3   _ROM (Get ROM Data) 700

B.4.4   _GPD (Get POST Device) 701

B.4.5   _SPD (Set POST Device) 701

B.4.6   _VPO (Video POST Options) 702

B.5 Notifications for Display Devices 702

B.6   Output Device-specific Methods 702

B.6.1   _ADR (Return the Unique ID for this Device) 703

B.6.2   _BCL (Query List of Brightness Control Levels Supported) 703

B.6.3   _BCM (Set the Brightness Level) 703

B.6.4 _BQC (Brightness Query Current level) 704

B.6.5   _DDC (Return the EDID for this Device) 704

B.6.6   _DCS (Return the Status of Output Device) 704

B.6.7   _DGS (Query Graphics State) 705

B.6.8   _DSS (Device Set State) 705

B.7 Notifications Specific to Output Devices 706

B.8   Notes on State Changes 707

Index 709



  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).




    1.    Principal Goals

ACPI is the key element in implementing OSPM. ACPI-defined interfaces are intended for wide adoption to encourage hardware and software vendors to build ACPI-compatible (and, thus, OSPM-compatible) implementations.

The principal goals of ACPI and OSPM are to:



  1. Enable all computer systems to implement motherboard configuration and power management functions, using appropriate cost/function tradeoffs.

  • Computer systems include (but are not limited to) desktop, mobile, workstation, and server machines.

  • Machine implementers have the freedom to implement a wide range of solutions, from the very simple to the very aggressive, while still maintaining full OS support.

  • Wide implementation of power management will make it practical and compelling for applications to support and exploit it. It will make new uses of PCs practical and existing uses of PCs more economical.

  1. Enhance power management functionality and robustness.

  • Power management policies too complicated to implement in a ROM BIOS can be implemented and supported in the OS, allowing inexpensive power managed hardware to support very elaborate power management policies.

  • Gathering power management information from users, applications, and the hardware together into the OS will enable better power management decisions and execution.

  • Unification of power management algorithms in the OS will reduce conflicts between the firmware and OS and will enhance reliability.


  1. Facilitate and accelerate industry-wide implementation of power management.

  • OSPM and ACPI reduces the amount of redundant investment in power management throughout the industry, as this investment and function will be gathered into the OS. This will allow industry participants to focus their efforts and investments on innovation rather than simple parity.

  • The OS can evolve independently of the hardware, allowing all ACPI-compatible machines to gain the benefits of OS improvements and innovations.

  1. Create a robust interface for configuring motherboard devices.

  • Enable new advanced designs not possible with existing interfaces.

    1.    Power Management Rationale

It is necessary to move power management into the OS and to use an abstract interface (ACPI) between the OS and the hardware to achieve the principal goals set forth above.

  • Minimal support for power management inhibits application vendors from supporting or exploiting it.

    • Moving power management functionality into the OS makes it available on every machine on which the OS is installed. The level of functionality (power savings, and so on) varies from machine to machine, but users and applications will see the same power interfaces and semantics on all OSPM machines.

    • This will enable application vendors to invest in adding power management functionality to their products.

  • Legacy power management algorithms were restricted by the information available to the BIOS that implemented them. This limited the functionality that could be implemented.

    • Centralizing power management information and directives from the user, applications, and hardware in the OS allows the implementation of more powerful functionality. For example, an OS can have a policy of dividing I/O operations into normal and lazy. Lazy I/O operations (such as a word processor saving files in the background) would be gathered up into clumps and done only when the required I/O device is powered up for some other reason. A non-lazy I/O request made when the required device was powered down would cause the device to be powered up immediately, the non-lazy I/O request to be carried out, and any pending lazy I/O operations to be done. Such a policy requires knowing when I/O devices are powered up, knowing which application I/O requests are lazy, and being able to assure that such lazy I/O operations do not starve.

    • Appliance functions, such as answering machines, require globally coherent power decisions. For example, a telephone-answering application could call the OS and assert, “I am waiting for incoming phone calls; any sleep state the system enters must allow me to 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.

  • BIOS code 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 BIOS 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 BIOS 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.

    1.    Legacy Support

ACPI provides support for an orderly transition from legacy hardware to ACPI hardware, and allows for both mechanisms to exist in a single machine and be used as needed.

Table 1 1    Hardware Type vs. OS Type Interaction

Hardware\OS

Legacy OS

ACPI OS with OSPM

Legacy hardware

A legacy OS on legacy hardware does what it always did.

If the OS lacks legacy support, legacy support is completely contained within the hardware functions.

Legacy and ACPI hardware support in machine

It works just like a legacy OS on legacy hardware.

During boot, the OS tells the hardware to switch from legacy to OSPM/ACPI mode and from then on, the system has full OSPM/ACPI support.

ACPI-only hardware

There is no power management.

There is full OSPM/ACPI support.

    1.    OEM Implementation Strategy

Any OEM is, as always, free to build hardware as they see fit. Given the existence of the ACPI specification, two general implementation strategies are possible:

  • An original equipment manufacturer (OEM) can adopt the OS vendor-provided ACPI OSPM software and implement the hardware part of the ACPI specification (for a given platform) in one of many possible ways.

  • 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.

    1.    Power and Sleep Buttons

OSPM provides a new appliance interface to consumers. In particular, it provides for a sleep button that is a “soft” button that does not turn the machine physically off but signals the OS to put the machine in a soft off or sleeping state. ACPI defines two types of these “soft” buttons: one for putting the machine to sleep and one for putting the machine in soft off.

This gives the OEM two different ways to implement machines: A one-button model or a two-button model. The one-button model has a single button that can be used as a power button or a sleep button as determined by user settings. The two-button model has an easily accessible sleep button and a separate power button. In either model, an override feature that forces the machine to the soft-off state without OSPM interaction is also needed to deal with various rare, but problematic, situations.


    1.    ACPI Specification and the Structure Of ACPI



This specification defines ACPI hardware interfaces, ACPI software interfaces and ACPI data structures. This specification also defines the semantics of these interfaces.

Figure 1-1 lays out the software and hardware components relevant to OSPM/ACPI and how they relate to each other. This specification describes the interfaces between components, the contents of the ACPI System Description Tables, and the related semantics of the other ACPI components. Notice that the ACPI System Description Tables, which describe a particular platform’s hardware, are at heart of the ACPI implementation and the role of the ACPI System Firmware is primarily to supply the ACPI Tables (rather than a native instruction API).

ACPI is not a software specification; it is not a hardware specification, although it addresses both software and hardware and how they must behave. ACPI is, instead, an interface specification comprised of both software and hardware elements.




Download 7.02 Mb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   86




The database is protected by copyright ©ininet.org 2024
send message

    Main page