Embedded Controller OperationRegion

How AML talks to EC RAM through EmbeddedControl OperationRegion and how to debug EC timeout, SCI storm, battery, thermal, and hotkey issues.

3 min read
Đọc bằng English Tiếng Việt 日本語
ACPI Advanced cover

On a laptop, many things that feel “OS controlled” actually pass through the embedded controller:

  • battery status
  • AC adapter state
  • lid switch
  • fan and thermal state
  • hotkeys
  • keyboard backlight
  • charge thresholds
  • wake events

ACPI often exposes these through an EmbeddedControl OperationRegion.

Device (EC0)
{
    Name (_HID, EisaId ("PNP0C09"))

    OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF)
    Field (ERAM, ByteAcc, NoLock, Preserve)
    {
        Offset (0x10),
        ACST, 8,
        Offset (0x20),
        BSTA, 8,
        Offset (0x30),
        QEVT, 8
    }
}
01 OS

Battery / thermal / input driver asks ACPI

The OS evaluates methods such as `_BST`, `_TMP`, `_Qxx`, or device notifications.

02 AML

Method reads EC-backed fields

AML names such as `BSTA` or `ACST` are mapped through a Field definition.

03 EC Handler

ACPI interpreter performs EC transaction

The OS EC driver coordinates command/status protocol, locking, and timeouts.

04 EC MCU

Embedded controller returns platform state

The EC firmware owns the actual battery, thermal, hotkey, or lid state.

EC OperationRegion access path

Debug Diary: EC timeout after resume

Symptom:

After S3 resume:
- battery icon disappears
- fan state becomes wrong
- ACPI log shows EC timeout

The DSDT may not be wrong at a syntax level. The failure may be ordering:

OS resumes

ACPI evaluates battery method

AML reads EC field

EC is not ready yet

Method fails with timeout
Item Value Note
Battery missing _BST / _BIF / _BIX failure Often EC field access or package format issue.
Fan stuck Thermal method or EC state stale Check `_TMP`, `_PSV`, `_ACx`, fan control fields.
Hotkey not working EC query / Notify path broken Check `_Qxx` methods and SCI events.
SCI storm Event not cleared EC keeps signaling because AML/EC handshake does not clear status.
Resume failure EC not ready when AML accesses fields Check S3/S0ix ordering and EC initialization.

EC ACPI debug checklist

Found this useful?

Save it or share it with someone learning firmware, BIOS/UEFI, and embedded systems.

Nội dung liên quan

Một số bài viết, ghi chú hoặc project có liên quan đến nội dung bạn vừa đọc.

Biến note thành bài viết hoàn chỉnh

Notes là nơi ghi nhanh khái niệm.