-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for reading from Bufferfields and Concatenate.
- Loading branch information
Showing
4 changed files
with
64 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
//! (integer 0) | ||
//! (integer 0x12) | ||
//! (integer 0x3412) | ||
//! (integer 0x78563412) | ||
//! (integer 0x00EFCDAB78563412) | ||
|
||
DefinitionBlock("out.aml", "DSDT", 1, "LAI", "LAI_TEST", 1) | ||
DefinitionBlock("out.aml", "DSDT", 2, "LAI", "LAI_TEST", 1) | ||
{ | ||
Scope(_SB) | ||
{ | ||
Method(_INI, 0, Serialized) | ||
{ | ||
Name(BUF, Buffer(8){0x12, 0x34, 0x56, 0x78, 0xAB, 0xCD, 0xEF, 0x00}) | ||
Method(_INI, 0, Serialized) | ||
{ | ||
Name(BUF, Buffer(8){0x12, 0x34, 0x56, 0x78, 0xAB, 0xCD, 0xEF, 0x00}) | ||
|
||
CreateByteField(BUF, 0, B) | ||
CreateWordField(BUF, 0, W) | ||
CreateDWordField(BUF, 0, DW) | ||
CreateQWordField(BUF, 0, QW) | ||
CreateBitField(BUF, 0, BI) | ||
CreateByteField(BUF, 0, B) | ||
CreateWordField(BUF, 0, W) | ||
CreateDWordField(BUF, 0, DW) | ||
CreateQWordField(BUF, 0, QW) | ||
|
||
// TODO: Test bit fields. | ||
|
||
// TODO: Test that the fields work. | ||
Debug = BI | ||
Debug = B | ||
Debug = W | ||
Debug = DW | ||
Debug = QW | ||
} | ||
} | ||
} |
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,42 @@ | ||
|
||
//! (buffer 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0) | ||
//! (buffer 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0xAA 0xAA 0xAA 0x00 0x00 0x00 0x00) | ||
//! (buffer 5 0 0 0 0 0 0 0 0 0 0 0 170 170 170 255) | ||
//! (buffer 0xFF 0x6E 0x6F 0xF4 0xFF 0x6E 0x7F 0xF4) | ||
//! (buffer 255 110 111 244 84 69 83 84 0) | ||
//! (buffer 0xFF 0x6E 0x6F 0xF4 0x5 0 0 0 0 0 0 0) | ||
//! (string "TESTTEST") | ||
//! (string "TEST0xAA 0xFF") | ||
//! (string "TEST0000000000000005") | ||
//! (buffer 0x12 0x34 0xAA 0x56 0x00 0x00 0x00 0x00 0xA 0x00 0x00 0x00 0x00 0x00 0x00 0x00) | ||
//! (string "[Device Object]A") | ||
|
||
DefinitionBlock("out.aml", "DSDT", 2, "LAI", "LAI_TEST", 1) | ||
{ | ||
Scope(_SB) | ||
{ | ||
Device(TEST){} | ||
|
||
Method(_INI) | ||
{ | ||
Name(BUF, Buffer(8){0x12, 0x34, 0xAA, 0x56, 0x12, 0x34, 0xAA, 0x56, 0x12, 0x34, 0xAA, 0x56, 0x12, 0x34, 0xAA, 0x56}) | ||
CreateDWordField(BUF, 0, B) | ||
Name (PKGE, Package (0x01){}) | ||
|
||
Debug = Concatenate(0, 1) | ||
Debug = Concatenate(5, Buffer(4){0XFF, 0xAA, 0xAA, 0xAA}) | ||
Debug = Concatenate(5, "FFAAAAAA00000000") | ||
|
||
Debug = Concatenate(Buffer(4){0xFF, 0x6E, 0x6F, 0xF4}, Buffer(4){0xFF, 0x6E, 0x7F, 0xF4}) | ||
Debug = Concatenate(Buffer(4){0xFF, 0x6E, 0x6F, 0xF4}, "TEST") | ||
Debug = Concatenate(Buffer(4){0xFF, 0x6E, 0x6F, 0xF4}, 5) | ||
|
||
Debug = Concatenate("TEST", "TEST") | ||
Debug = Concatenate("TEST", Buffer(2){0xAA, 0xFF}) | ||
Debug = Concatenate("TEST", 5) | ||
|
||
Debug = Concatenate(B, "A") | ||
Debug = Concatenate(TEST, "A") | ||
} | ||
} | ||
} |
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
Submodule lai
updated
from 954f85 to e63413