iPXE
|
ACPI tests. More...
Go to the source code of this file.
Data Structures | |
union | acpi_test_signature |
An ACPI test table signature. More... | |
struct | acpi_test_table |
An ACPI test table. More... | |
struct | acpi_test_tables |
An ACPI test table set. More... | |
struct | acpi_mac_test |
An ACPI MAC extraction test. More... | |
Macros | |
#define | DATA(...) { __VA_ARGS__ } |
Define inline data. More... | |
#define | ACPI_TABLE(name, SIGNATURE, DATA) |
Define an ACPI test table. More... | |
#define | ACPI_TABLES(name, ...) |
Define an ACPI test table set. More... | |
#define | ACPI_MAC(name, TABLES, EXPECTED) |
Define an ACPI MAC extraction test. More... | |
#define | acpi_mac_ok(test) acpi_mac_okx ( test, __FILE__, __LINE__ ) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
ACPI_TABLE (amac_ssdt, "SSDT", DATA(0x53, 0x53, 0x44, 0x54, 0x5d, 0x00, 0x00, 0x00, 0x02, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x38, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x08, 0x48, 0x57, 0x30, 0x30, 0x08, 0xa4, 0x00, 0x14, 0x1e, 0x41, 0x4d, 0x41, 0x43, 0x08, 0x0d, 0x5f, 0x41, 0x55, 0x58, 0x4d, 0x41, 0x43, 0x5f, 0x23, 0x35, 0x32, 0x35, 0x34, 0x30, 0x30, 0x61, 0x61, 0x62, 0x62, 0x63, 0x63, 0x23, 0x00, 0x14, 0x09, 0x48, 0x57, 0x34, 0x32, 0x08, 0xa4, 0x0a, 0x2a)) | |
"AMAC" SSDT More... | |
ACPI_TABLES (amac_tables, &amac_ssdt) | |
"AMAC" test tables More... | |
ACPI_MAC (amac, &amac_tables, DATA(0x52, 0x54, 0x00, 0xaa, 0xbb, 0xcc)) | |
"AMAC" test More... | |
ACPI_TABLE (maca_ssdt1, "SSDT", DATA(0x53, 0x53, 0x44, 0x54, 0x3e, 0x00, 0x00, 0x00, 0x02, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x19, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x08, 0x48, 0x57, 0x30, 0x30, 0x08, 0xa4, 0x00, 0x14, 0x09, 0x48, 0x57, 0x34, 0x32, 0x08, 0xa4, 0x0a, 0x2a)) | |
"MACA" SSDT1 (does not contain AUXMAC) More... | |
ACPI_TABLE (maca_ssdt2, "SSDT", DATA(0x53, 0x53, 0x44, 0x54, 0x54, 0x00, 0x00, 0x00, 0x02, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x2f, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x1e, 0x4d, 0x41, 0x43, 0x41, 0x08, 0x0d, 0x5f, 0x41, 0x55, 0x58, 0x4d, 0x41, 0x43, 0x5f, 0x23, 0x35, 0x32, 0x35, 0x34, 0x30, 0x30, 0x31, 0x31, 0x32, 0x32, 0x33, 0x33, 0x23, 0x00, 0x14, 0x09, 0x48, 0x57, 0x39, 0x39, 0x08, 0xa4, 0x0a, 0x63)) | |
"MACA" SSDT2 (contains AUXMAC) More... | |
ACPI_TABLES (maca_tables, &maca_ssdt1, &maca_ssdt2) | |
"MACA" test tables More... | |
ACPI_MAC (maca, &maca_tables, DATA(0x52, 0x54, 0x00, 0x11, 0x22, 0x33)) | |
"MACA" test More... | |
ACPI_TABLE (rtma_ssdt, "SSDT", DATA(0x53, 0x53, 0x44, 0x54, 0x44, 0x00, 0x00, 0x00, 0x02, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x1f, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x18, 0x52, 0x54, 0x4d, 0x41, 0x08, 0x0d, 0x5f, 0x52, 0x54, 0x58, 0x4d, 0x41, 0x43, 0x5f, 0x23, 0x52, 0x54, 0x30, 0x30, 0x30, 0x31, 0x23, 0x00)) | |
"RTMA" SSDT More... | |
ACPI_TABLES (rtma_tables, &rtma_ssdt) | |
"RTMA" test tables More... | |
ACPI_MAC (rtma, &rtma_tables, DATA(0x52, 0x54, 0x30, 0x30, 0x30, 0x31)) | |
"RTMA" test More... | |
static userptr_t | acpi_test_find (uint32_t signature, unsigned int index) |
Locate ACPI test table. More... | |
typeof (acpi_find) | |
Override ACPI table finder. More... | |
static void | acpi_test_exec (void) |
Perform ACPI self-test. More... | |
Variables | |
static struct acpi_test_tables * | acpi_test_tables |
Current ACPI test table set. More... | |
struct self_test acpi_test | __self_test |
ACPI self-test. More... | |
ACPI tests.
Definition in file acpi_test.c.
#define DATA | ( | ... | ) | { __VA_ARGS__ } |
Define inline data.
Definition at line 73 of file acpi_test.c.
Define an ACPI test table.
Definition at line 76 of file acpi_test.c.
#define ACPI_TABLES | ( | name, | |
... | |||
) |
Define an ACPI test table set.
Definition at line 86 of file acpi_test.c.
Define an ACPI MAC extraction test.
Definition at line 96 of file acpi_test.c.
Definition at line 238 of file acpi_test.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
ACPI_TABLE | ( | amac_ssdt | , |
"SSDT" | , | ||
DATA(0x53, 0x53, 0x44, 0x54, 0x5d, 0x00, 0x00, 0x00, 0x02, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x38, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x08, 0x48, 0x57, 0x30, 0x30, 0x08, 0xa4, 0x00, 0x14, 0x1e, 0x41, 0x4d, 0x41, 0x43, 0x08, 0x0d, 0x5f, 0x41, 0x55, 0x58, 0x4d, 0x41, 0x43, 0x5f, 0x23, 0x35, 0x32, 0x35, 0x34, 0x30, 0x30, 0x61, 0x61, 0x62, 0x62, 0x63, 0x63, 0x23, 0x00, 0x14, 0x09, 0x48, 0x57, 0x34, 0x32, 0x08, 0xa4, 0x0a, 0x2a) | |||
) |
"AMAC" SSDT
DefinitionBlock ("", "SSDT", 2, "", "", 0x0) { Scope (_SB) { Method (HW00, 0, Serialized) { Return(0) } Method (AMAC, 0, Serialized) { ToString("_AUXMAC_#525400aabbcc#") } Method (HW42, 0, Serialized) { Return(42) } } }
ACPI_TABLES | ( | amac_tables | , |
& | amac_ssdt | ||
) |
"AMAC" test tables
ACPI_MAC | ( | amac | , |
& | amac_tables, | ||
DATA(0x52, 0x54, 0x00, 0xaa, 0xbb, 0xcc) | |||
) |
"AMAC" test
ACPI_TABLE | ( | maca_ssdt1 | , |
"SSDT" | , | ||
DATA(0x53, 0x53, 0x44, 0x54, 0x3e, 0x00, 0x00, 0x00, 0x02, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x19, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x08, 0x48, 0x57, 0x30, 0x30, 0x08, 0xa4, 0x00, 0x14, 0x09, 0x48, 0x57, 0x34, 0x32, 0x08, 0xa4, 0x0a, 0x2a) | |||
) |
"MACA" SSDT1 (does not contain AUXMAC)
ACPI_TABLE | ( | maca_ssdt2 | , |
"SSDT" | , | ||
DATA(0x53, 0x53, 0x44, 0x54, 0x54, 0x00, 0x00, 0x00, 0x02, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x2f, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x1e, 0x4d, 0x41, 0x43, 0x41, 0x08, 0x0d, 0x5f, 0x41, 0x55, 0x58, 0x4d, 0x41, 0x43, 0x5f, 0x23, 0x35, 0x32, 0x35, 0x34, 0x30, 0x30, 0x31, 0x31, 0x32, 0x32, 0x33, 0x33, 0x23, 0x00, 0x14, 0x09, 0x48, 0x57, 0x39, 0x39, 0x08, 0xa4, 0x0a, 0x63) | |||
) |
"MACA" SSDT2 (contains AUXMAC)
ACPI_TABLES | ( | maca_tables | , |
& | maca_ssdt1, | ||
& | maca_ssdt2 | ||
) |
"MACA" test tables
ACPI_MAC | ( | maca | , |
& | maca_tables, | ||
DATA(0x52, 0x54, 0x00, 0x11, 0x22, 0x33) | |||
) |
"MACA" test
ACPI_TABLE | ( | rtma_ssdt | , |
"SSDT" | , | ||
DATA(0x53, 0x53, 0x44, 0x54, 0x44, 0x00, 0x00, 0x00, 0x02, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x04, 0x06, 0x21, 0x20, 0x10, 0x1f, 0x5c, 0x5f, 0x53, 0x42, 0x5f, 0x14, 0x18, 0x52, 0x54, 0x4d, 0x41, 0x08, 0x0d, 0x5f, 0x52, 0x54, 0x58, 0x4d, 0x41, 0x43, 0x5f, 0x23, 0x52, 0x54, 0x30, 0x30, 0x30, 0x31, 0x23, 0x00) | |||
) |
"RTMA" SSDT
ACPI_TABLES | ( | rtma_tables | , |
& | rtma_ssdt | ||
) |
"RTMA" test tables
ACPI_MAC | ( | rtma | , |
& | rtma_tables, | ||
DATA(0x52, 0x54, 0x30, 0x30, 0x30, 0x31) | |||
) |
"RTMA" test
Locate ACPI test table.
signature | Requested table signature |
index | Requested index of table with this signature |
table | Table, or UNULL if not found |
Definition at line 190 of file acpi_test.c.
References acpi_test_tables::count, acpi_test_table::data, index, le32_to_cpu, acpi_test_signature::raw, signature, acpi_test_table::signature, acpi_test_tables::table, UNULL, and virt_to_user().
typeof | ( | acpi_find | ) |
Override ACPI table finder.
Definition at line 211 of file acpi_test.c.
References acpi_mac(), ETH_ALEN, mac, memcmp(), NULL, okx, rc, and test.
|
static |
|
static |
Current ACPI test table set.
Definition at line 181 of file acpi_test.c.
struct self_test acpi_test __self_test |
ACPI self-test.
Definition at line 254 of file acpi_test.c.