-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aml: handle IndexField fields crossing index boundary
- Loading branch information
Showing
2 changed files
with
85 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
DefinitionBlock("index_fields.aml", "DSDT", 1, "RSACPI", "IDXFLD", 1) { | ||
OperationRegion (GIO0, SystemIO, 0x125, 0x100) | ||
|
||
Field (GIO0, ByteAcc, NoLock, WriteAsZeros) { | ||
IDX0, 8, | ||
DAT0, 8, | ||
IDX1, 8, | ||
DAT1, 16 | ||
} | ||
|
||
IndexField (IDX0, DAT0, ByteAcc, NoLock, Preserve) { | ||
Offset(0x10), | ||
, 7, // Skip to offset 0x10 bit 7 | ||
REG0, 2, // Covers bit 7 in 0x10 and bit 0 in 0x11 | ||
} | ||
|
||
IndexField (IDX1, DAT1, WordAcc, NoLock, Preserve) { | ||
Offset(0x07), // Offset 0x06, bits 8.. | ||
, 7, // Skip to offset 0x06, bit 15 | ||
REG1, 2, // Covers bit 15 in 0x06 and bit 0 in 0x08 | ||
} | ||
|
||
// Store 0b11 to REG0 (index 0x10, bit 0 + index 0x11, bit 1) | ||
Store (3, REG0) | ||
|
||
// Store 0b11 to REG1 (index 0x06, bit 15 + index 0x08, bit 0) | ||
Store (3, REG1) | ||
} |