Field in ACPI

How Field definitions map bits and bytes inside an OperationRegion to names used by AML methods.

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

OperationRegion says where an address space exists. Field says how AML names map onto bits and bytes inside that region.

Without Field, an EC region is just a byte range. With Field, AML can say LIDS, BSTA, or TMP0 and the OS interpreter knows exactly which bits to access.

OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF)
Field (ERAM, ByteAcc, NoLock, Preserve)
{
    Offset (0x10),
    BSTA, 8,
    Offset (0x20),
    LIDS, 1,
    Offset (0x30),
    TMP0, 16
}
Item Value Note
Region name ERAM The OperationRegion that backs this field.
Access type ByteAcc / WordAcc / DWordAcc How the interpreter accesses the region.
Lock rule NoLock / Lock Whether the global lock is used.
Update rule Preserve / WriteAsZeros / WriteAsOnes How untouched bits are handled during writes.
Offset Byte offset Moves the field cursor to a specific byte position.
Named field Name + bit length Maps a readable AML name to a bit range.

Real World Example: one wrong bit breaks lid wake

If LIDS is defined at the wrong offset, the OS may think the lid is always open or always closed.

Offset (0x20),
LIDS, 1

If the EC firmware moved lid state to 0x21[0] but ACPI still reads 0x20[0], the AML method is syntactically correct but semantically wrong.

Common Pitfall: Preserve is not always harmless

When writing a small bit field, the update rule matters. Preserve means the interpreter should preserve other bits in the same access unit. But if the hardware register is write-one-to-clear or has side effects, a naive field write can still be dangerous.

Field review 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.