ACPI 5.0 in Linux
Len Brown
Linux Plumbers Conference
August 2012, San Diego
Linux Plumbers Conference, August 2012, San Diego2 Linux Plumbers Conference, San Diego August 30, 20122
Agenda● ACPI Architecture
● ACPICA Architecture
● Large Changes● Small Changes● Smaller Changes● If you can read this, you are sitting to close
Advanced Configuration and Power Interface (ACPI) - Overview
3
Linux Plumbers Conference, August 2012, San Diego4 Linux Plumbers Conference, San Diego August 30, 20124
ACPI Architecture
Operating System
Hardware
BIOSACPI
INTEL CONFIDENTIAL
5
ACPI Component Architecture (ACPICA)
5
Linux Plumbers Conference, August 2012, San Diego6 Linux Plumbers Conference, San Diego August 30, 20126
ACPICA (ACPI Component Architecture)
● OS-independent reference implementation● Open Source at www.acpica.org● All non-MS ACPI OS's today use ACPICA● Intel OTC keeps Linux kernel in sync
● drivers/acpi/acpica/
● ASL/AML compiler dis-assembler etc.
Large Features and Changes
7
Linux Plumbers Conference, August 2012, San Diego8 Linux Plumbers Conference, San Diego August 30, 20128
Memory Power Management (INTC-003)
● MPST – Memory Power State Table● PMTT – Platform Memory Topology Table● Comprehends HW autonomous states● Implications on:
● Physical Memory Allocation● Hot Plug● NUMA
● ACPICA: shipping; Linux: Not yet supported
Linux Plumbers Conference, August 2012, San Diego9 Linux Plumbers Conference, San Diego August 30, 20129
HW-reduced ACPI Mode 1/3 (MSFT-001)
● FADT.HW_REDUCED_ACPI bit● “ACPI HW Specification” (ch4) optional● UEFI FW for boot (no legacy BIOS)● Boot into ACPI mode (no legacy mode)● No OS sharing w/ SMM or EC (no global lock)● No need for OS sleep state coherency mgmt.● No SCI, SMI_CMD, no GPEs, no fixed events
Linux Plumbers Conference, August 2012, San Diego10 Linux Plumbers Conference, San Diego August 30, 201210
HW-reduced ACPI Mode 2/3 (MSFT-001)
● SW-based alternatives added/used:● GPIO replaces GPE● SLEEP_CONTROL replaces SLP_TYP● FADT.LOW_POWER_S0_CAPABLE bit
– If platform offers STR when idle is better, this bit suggests that OS avoid STR.
● Preferred_PM_Profile.Tablet added
Linux Plumbers Conference, August 2012, San Diego11 Linux Plumbers Conference, San Diego August 30, 201211
HW-reduced ACPI Mode 3/3(MSFT-001)
● FADT.CMOS_RTC_Not_Present– Use Control Method Time & Alarm device instead
● IRQ descriptors get wake property– Replacing wake GPEs
● EC: GpioInt() replaces _GPE
● ACPICA: shipping● Linux: in development
Linux Plumbers Conference, August 2012, San Diego12 Linux Plumbers Conference, San Diego August 30, 201212
Generic Interrupt Controller (MSFT-002)
● MADT “APIC” table retained● Function unchanged, language now generic
● MADT grows a GIC structure
● Linux: not yet implemented
Linux Plumbers Conference, August 2012, San Diego13 Linux Plumbers Conference, San Diego August 30, 201213
Generic Interrupt Controller (MSFT-002)
● MADT “APIC” table retained● Function unchanged, language now generic
● MADT grows a GIC structure
● Linux: not yet implemented
Linux Plumbers Conference, August 2012, San Diego14 Linux Plumbers Conference, San Diego August 30, 201214
Add Fixed DMA Descriptor (MSFT-004)
● Support large number of request lines● Support large number of DMA channels● Support flexible (static) mapping● ASL macro: Fdma()
● ACPICA: Supported since 12/2011● Linux: not yet supported
Linux Plumbers Conference, August 2012, San Diego15 Linux Plumbers Conference, San Diego August 30, 201215
GPIO Abstraction 1/2 (MSFT-005)
● General Purpose input/output pin support● HW_REDUCED requires GPIO (no GPE)● But GPIO does not require HW_REDUCED
Linux Plumbers Conference, August 2012, San Diego16 Linux Plumbers Conference, San Diego August 30, 201216
GPIO Abstraction 2/2 (MSFT-005)
● ASL: GpioIo, GpioInt resource macros● ASL: GPIO OpRegions● ASL: _AEI – ACPI Event Information to map
● ACPICA: supported● Linux: prototyped, not yet upstream
Linux Plumbers Conference, August 2012, San Diego17 Linux Plumbers Conference, San Diego August 30, 201217
SPB: Simple Peripheral Bus (MSFT-006)
● Controllers enumerated in ACPI Namespace● Resource type: I2C, SPI, UART
● Peripherals list _*RS as resources● Easily describe non parent-child connections
● ASL can use OperationRegions for access● ACPICA: supports● Linux: prototyped, not yet upstream
Linux Plumbers Conference, August 2012, San Diego18 Linux Plumbers Conference, San Diego August 30, 201218
Platform Communication Channel (MSFT-007)
● Allows AML communication with BMC (Baseboard Management Controller)
● Referenced by MPST, CPPC, RASF● PCCT – Platform Com Channel Table● Sub-space for different channels● SCI doorbell (HW-REDUCED, not)● Linux: not yet implemented
Linux Plumbers Conference, August 2012, San Diego19 Linux Plumbers Conference, San Diego August 30, 201219
CPPC (MSFT-008)
● Collaborative Processor Performance Cntrl● Replaces MHz based P-states, T-states
● Platform has percentage performance metric
● ASL: _CPC controls: mmio, MSR, or PCC
● Linux: not implemented
Linux Plumbers Conference, August 2012, San Diego20 Linux Plumbers Conference, San Diego August 30, 201220
Time & Alarm Device (MSFT-009)
● RTC/CMOS declared burdensome● New Time & Alarm device abstraction
● FADT.No_legacy_CMOS_RTC● Device: ACPI000E● ASL access
– GCP/GRT/SRT/GWS/CWS/STP/STV/TIP/TIV
● Linux: not yet supported
Small Features and Changes
21
Linux Plumbers Conference, August 2012, San Diego22 Linux Plumbers Conference, San Diego August 30, 201222
Fine Grain Device Id (MSFT-003)
● To ease porting PCI drivers to ACPI● _CLS returns PCI class code● Expand vendor string format
– eg. MSFT1234, 80860003
● Reserved vendor strings● _HRV returns HW revision● _SUB returns subsystem-vendor/device-id
● ACPICA: shipping; Linux: prototyped
Linux Plumbers Conference, August 2012, San Diego23 Linux Plumbers Conference, San Diego August 30, 201223
BMC Requested Shutdown (HP-001)
● Previously required OS specific driver, or resort to hard shutdown
● _OST (OS Status indication)● Additional Notification value● Additional source event code
● Linux: not yet implemented
Linux Plumbers Conference, August 2012, San Diego24 Linux Plumbers Conference, San Diego August 30, 201224
Firmware Performance Data Table (INTC-001)
● Creates “FPDT”● Expose pre-OS BIOS boot time metric
● Measures reset vector to OS hand-off● Resume time from suspend-to-ram included
● Linux: no support yet
Linux Plumbers Conference, August 2012, San Diego25 Linux Plumbers Conference, San Diego August 30, 201225
Error Injection (EINJ) (INTC-002)
● Add Error Location● Allow Vendor Specific Errors
● Linux: supported
Linux Plumbers Conference, August 2012, San Diego26 Linux Plumbers Conference, San Diego August 30, 201226
HW Error Notification Types (HP-002)
● Support “firmware-first” notifications
● Linux: not yet supported.
Linux Plumbers Conference, August 2012, San Diego27 Linux Plumbers Conference, San Diego August 30, 201227
RASF – RAS Feature Table (INTC-009)
● Allow OS to discover RAS features● References PCC● Currently only HW patrol scrub described
● Linux: waiting for RASF to be useful
Linux Plumbers Conference, August 2012, San Diego28 Linux Plumbers Conference, San Diego August 30, 201228
Table Definition Language (INTC-004)
● ASL -> AML compiler already specified● For DSDT and SSDT
● ACPI “Data Table” compiler now too● All non-ASL tables
● ACPICA supports as of release 20100702
Linux Plumbers Conference, August 2012, San Diego29 Linux Plumbers Conference, San Diego August 30, 201229
New Reserved Table Signatures(MSFT-009)
● BGRT – Boot Graphics Resource Table● CSRT – Core System Resource Table● MSDM – MS Data Mgmt. Table● SLIC – MS SW Licensing Table● WPBT – Windows Platform Binary Table● DBG2 – Debug Port Table 2● TPM2 – Trusted Platform Module 2 Table
Linux Plumbers Conference, August 2012, San Diego30 Linux Plumbers Conference, San Diego August 30, 201230
Enhance _ADR for SDIO (MSFT-0013)
● For SDIO Bus Devices:● _ADR: Slot number; Function number
● Linux: prototyped
Linux Plumbers Conference, August 2012, San Diego31 Linux Plumbers Conference, San Diego August 30, 201231
Boot Graphics Resource Table (MSFT-0014)
● For boot splash management● Previously a Windows-specific table.
● Linux: not implemented
Linux Plumbers Conference, August 2012, San Diego32 Linux Plumbers Conference, San Diego August 30, 201232
Extended GPIO Event Numbers (MSFT-0016)
● ASL: _EVT support 65,536 events● (GPE limited to 128/block)
● ACPICA: supported● Linux: prototyped
Linux Plumbers Conference, August 2012, San Diego33 Linux Plumbers Conference, San Diego August 30, 201233
Locking Targets from AML (MSFT-0018)
● AML access to SPB targets via OpRegion● Simultaneous AML vs. OS/driver access● Requires locked read-modify-write● _DLM – Device Lock Mutex
● ACPICA: supported● Linux: not yet prototyped
Linux Plumbers Conference, August 2012, San Diego34 Linux Plumbers Conference, San Diego August 30, 201234
Generic Timer Description Table (MSFT-0019)
● GTDT describes ARM GIT (Generic Timer)
● Linux: not implemented
Linux Plumbers Conference, August 2012, San Diego35 Linux Plumbers Conference, San Diego August 30, 201235
Enumeration Power Controls(MSFT-0020)
● D3Cold can break enumeration● eg. SATA ports = Devices
● _PRE – Power Resource for Enumeration● _PR0, but just for enumeration
● _PSE – Power State for Enumeration● _PS0, but just for enumeration
Linux Plumbers Conference, August 2012, San Diego36 Linux Plumbers Conference, San Diego August 30, 201236
TCG D-RTM Resource Table (PTEC-002)
● D-RTM – Dynamic Root of Trust for Measurement
● “DRTM” table signature reserved
Clarifications and Errata fixes.
37
Linux Plumbers Conference, August 2012, San Diego38 Linux Plumbers Conference, San Diego August 30, 201238
D3 Cold Errata fix (MSFT-0015)
● Clarify _DSW – Device Sleep Wake● Target system state is 0 - 4
● Clarify _SxW – Sx Device Wake State● If no _PR3, then 3 == D3● If _PR3, then 3 == D3Hot, 4 == D3Cold
● Linux: supported
Linux Plumbers Conference, August 2012, San Diego39 Linux Plumbers Conference, San Diego August 30, 201239
PLD Clarification (MSFT-0017)
● Physical Location Description updated for handhelds● “front” holds the display● Origin is lower left of portrait view
Linux Plumbers Conference, August 2012, San Diego40 Linux Plumbers Conference, San Diego August 30, 201240
_ROM Clarification (AMD-002)
● _ROM (Get Display ROM Data)● If _ROM is present, it is preferred over PCI
● Linux: TBD
Linux Plumbers Conference, August 2012, San Diego41 Linux Plumbers Conference, San Diego August 30, 201241
ASL Package Description (INTC-005)
● Updates spec to reflect reality since v2.0● Interpreter & Compiler handle two types of
ASL “packages”, fixed and variable length.
● ACPICA & Linux: supported since v2.0.
Linux Plumbers Conference, August 2012, San Diego42 Linux Plumbers Conference, San Diego August 30, 201242
Fixed _OSC Example (INTC-006)
● ASL example would not compile
● Documentation clarification only
Linux Plumbers Conference, August 2012, San Diego43 Linux Plumbers Conference, San Diego August 30, 201243
ASL Constant Descriptions (INTC-010)
● Documentation clarification for ASL writers
● Linux: Reflects what ACPICA already does
Linux Plumbers Conference, August 2012, San Diego44 Linux Plumbers Conference, San Diego August 30, 201244
Clarify ERST, EINJ (INTC-011)
● Updates ERST, EINJ Documentation● Offsets are decimal, not hex● Specifies reserved fields must be zero
Linux Plumbers Conference, August 2012, San Diego45 Linux Plumbers Conference, San Diego August 30, 201245
Update AML Opcode Table (INTC-012)
● Add some missing entires to AML byte stream documentation.
● ACPICA compiler/interpreter already supports.
Linux Plumbers Conference, August 2012, San Diego46 Linux Plumbers Conference, San Diego August 30, 201246
Document Missing ASL Operators (INTC-013)
● ASL reference AccessAs and Offset● They are both Operators, not macros
● Update document to reflect reality
Linux Plumbers Conference, August 2012, San Diego47 Linux Plumbers Conference, San Diego August 30, 201247
Fix PCMCIA reference (INTC-0014)
● PCMCIA URL was stale.
Linux Plumbers Conference, August 2012, San Diego48 Linux Plumbers Conference, San Diego August 30, 201248
ACPI0009 Errata Fix (MSFT-0012)
● ACPI0009 was doubly defined● ACPI0009 remains I/OxAPIC● ACPI0010 is User Presence Detect Device
Done.
49