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.
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
}
}
Battery / thermal / input driver asks ACPI
The OS evaluates methods such as `_BST`, `_TMP`, `_Qxx`, or device notifications.
Method reads EC-backed fields
AML names such as `BSTA` or `ACST` are mapped through a Field definition.
ACPI interpreter performs EC transaction
The OS EC driver coordinates command/status protocol, locking, and timeouts.
Embedded controller returns platform state
The EC firmware owns the actual battery, thermal, hotkey, or lid state.
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
Common EC-related symptoms
| 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
Related notes
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.
OperationRegion Deep Dive
How ACPI OperationRegion connects AML methods to EC RAM, system memory, I/O ports, PCI config, GPIO, and other hardware-backed address spaces.
What is EC & BIOS Handshake?
Quick note explaining EC & BIOS Handshake for BIOS/UEFI and embedded firmware readers.
Field in ACPI
How Field definitions map bits and bytes inside an OperationRegion to names used by AML methods.
Biến note thành bài viết hoàn chỉnh
Notes là nơi ghi nhanh khái niệm.