|
iPXE
|
ACPI tests. More...
#include <string.h>#include <ipxe/acpi.h>#include <ipxe/acpimac.h>#include <ipxe/if_ether.h>#include <ipxe/test.h>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(...) |
| Define inline data. | |
| #define | ACPI_TABLE(name, SIGNATURE, DATA) |
| Define an ACPI test table. | |
| #define | ACPI_TABLES(name, ...) |
| Define an ACPI test table set. | |
| #define | ACPI_MAC(name, TABLES, EXPECTED) |
| Define an ACPI MAC extraction test. | |
| #define | acpi_mac_ok(test) |
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 | |
| 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 | |
| static const struct acpi_header * | acpi_test_find (uint32_t signature, unsigned int index) |
| Locate ACPI test table. | |
| typeof (acpi_find) | |
| Override ACPI table finder. | |
| static void | acpi_test_exec (void) |
| Perform ACPI self-test. | |
Variables | |
| static struct acpi_test_tables * | acpi_test_tables |
| Current ACPI test table set. | |
| struct self_test acpi_test | __self_test |
| ACPI self-test. | |
ACPI tests.
Definition in file acpi_test.c.
| #define DATA | ( | ... | ) |
Define inline data.
Definition at line 74 of file acpi_test.c.
Referenced by ACPI_MAC(), ACPI_MAC(), ACPI_MAC(), ACPI_TABLE(), ACPI_TABLE(), ACPI_TABLE(), ACPI_TABLE(), ASN1(), ASN1(), ASN1(), AUTHENTICATE_TEST(), BASE16(), BASE16(), BASE64(), BASE64(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CERTIFICATE(), CRC32_TEST(), CRC32_TEST(), CRC32_TEST(), CRC32_TEST(), DEFLATE(), DEFLATE(), DEFLATE(), DEFLATE(), DEFLATE(), DEFLATE(), DEFLATE(), DEFLATE(), DNS_COMPARE(), DNS_COMPARE(), DNS_COMPARE(), DNS_COMPARE(), DNS_COMPARE(), DNS_COPY(), DNS_COPY(), DNS_COPY(), DNS_COPY(), DNS_DECODE(), DNS_DECODE(), DNS_DECODE(), DNS_DECODE(), DNS_DECODE(), DNS_DECODE(), DNS_DECODE(), DNS_DECODE(), DNS_DECODE(), DNS_ENCODE(), DNS_ENCODE(), DNS_ENCODE(), DNS_ENCODE(), DNS_ENCODE(), DNS_LIST(), GZIP(), GZIP(), GZIP(), HMAC_TEST(), HMAC_TEST(), HMAC_TEST(), HMAC_TEST(), HMAC_TEST(), IMAGE(), IMAGE(), IMAGE(), IMAGE_RW(), IMAGE_RW(), KEY_TEST(), KEYPAIR(), MESSAGE(), MESSAGE(), MESSAGE(), MESSAGE(), MESSAGE(), MESSAGE(), MSCHAPV2_TEST(), OCSP(), OCSP(), OCSP(), OCSP(), OCSP(), PEERDIST_INFO_BLOCK_TEST(), PEERDIST_INFO_BLOCK_TEST(), PEERDIST_INFO_BLOCK_TEST(), PEERDIST_INFO_BLOCK_TEST(), PEERDIST_INFO_SEGMENT_TEST(), PEERDIST_INFO_SEGMENT_TEST(), PEERDIST_INFO_SEGMENT_TEST(), PEERDIST_INFO_TEST(), PEERDIST_INFO_TEST(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PIX(), PROFILE_TEST(), PROFILE_TEST(), PROFILE_TEST(), PROFILE_TEST(), PROFILE_TEST(), PROFILE_TEST(), SERVER_PASSPHRASE(), TCPIP_TEST(), TCPIP_TEST(), TCPIP_TEST(), TCPIP_TEST(), TCPIP_TEST(), TCPIP_TEST(), TCPIP_TEST(), UTF8_ACCUMULATE(), UTF8_ACCUMULATE(), UTF8_ACCUMULATE(), UTF8_ACCUMULATE(), UTF8_ACCUMULATE(), UTF8_ACCUMULATE(), UTF8_ACCUMULATE(), UTF8_ACCUMULATE(), and ZLIB().
Define an ACPI test table.
Definition at line 77 of file acpi_test.c.
| #define ACPI_TABLES | ( | name, | |
| ... ) |
Define an ACPI test table set.
Definition at line 87 of file acpi_test.c.
Define an ACPI MAC extraction test.
Definition at line 97 of file acpi_test.c.
| #define acpi_mac_ok | ( | test | ) |
Definition at line 240 of file acpi_test.c.
Referenced by acpi_test_exec().
| 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) } } }
References DATA.
| ACPI_TABLES | ( | amac_tables | , |
| & | amac_ssdt ) |
"AMAC" test tables
| ACPI_MAC | ( | amac | , |
| & | amac_tables, | ||
| DATA(0x52, 0x54, 0x00, 0xaa, 0xbb, 0xcc) | ) |
"AMAC" test
References DATA.
| 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)
References DATA.
| 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)
References DATA.
| 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
References DATA.
| 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
References DATA.
| ACPI_TABLES | ( | rtma_tables | , |
| & | rtma_ssdt ) |
"RTMA" test tables
| ACPI_MAC | ( | rtma | , |
| & | rtma_tables, | ||
| DATA(0x52, 0x54, 0x30, 0x30, 0x30, 0x31) | ) |
"RTMA" test
References DATA.
|
static |
Locate ACPI test table.
| signature | Requested table signature |
| index | Requested index of table with this signature |
| table | Table, or NULL if not found |
Definition at line 191 of file acpi_test.c.
References acpi_test_tables::count, acpi_test_table::data, index, le32_to_cpu, NULL, acpi_test_signature::raw, acpi_test_table::signature, signature, and acpi_test_tables::table.
Referenced by typeof().
| typeof | ( | acpi_find | ) |
Override ACPI table finder.
Definition at line 213 of file acpi_test.c.
References acpi_find(), acpi_finder, acpi_mac(), acpi_test_find(), ETH_ALEN, mac, memcmp(), NULL, okx, rc, and test.
|
static |
Perform ACPI self-test.
Definition at line 247 of file acpi_test.c.
References acpi_mac_ok.
|
static |
Current ACPI test table set.
Definition at line 182 of file acpi_test.c.
| struct self_test acpi_test __self_test |
ACPI self-test.
Definition at line 256 of file acpi_test.c.