aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-03-23 15:02:17 +0000
committerMichael Brown <mcb30@ipxe.org>2022-03-25 16:47:06 +0000
commitf58b5109f46088bdbb5345a9d94b636c54345bdf (patch)
tree0421c3bf5b6fe7d201d6ebc0770108cec0f2b3f7 /src/tests
parent614c3f43a12cd6be6d79d7a8a63cfa603ff9d49f (diff)
downloadipxe-f58b5109f46088bdbb5345a9d94b636c54345bdf.zip
ipxe-f58b5109f46088bdbb5345a9d94b636c54345bdf.tar.gz
ipxe-f58b5109f46088bdbb5345a9d94b636c54345bdf.tar.bz2
[acpi] Support the "_RTXMAC_" format for ACPI-based MAC addresses
Some newer HP products expose the host-based MAC (HBMAC) address using an ACPI method named "RTMA" returning a part-binary string of the form "_RTXMAC_#<mac>#", where "<mac>" comprises the raw MAC address bytes. Extend the existing support to handle this format alongside the older "_AUXMAC_" format (which uses a base16-encoded MAC address). Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com> Tested-by: Andreas Hammarskjöld <junior@2PintSoftware.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/acpi_test.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tests/acpi_test.c b/src/tests/acpi_test.c
index 972067e..1ca5bef 100644
--- a/src/tests/acpi_test.c
+++ b/src/tests/acpi_test.c
@@ -159,6 +159,24 @@ ACPI_TABLES ( maca_tables, &maca_ssdt1, &maca_ssdt2 );
ACPI_MAC ( maca, &maca_tables,
DATA ( 0x52, 0x54, 0x00, 0x11, 0x22, 0x33 ) );
+/** "RTMA" SSDT */
+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" test tables */
+ACPI_TABLES ( rtma_tables, &rtma_ssdt );
+
+/** "RTMA" test */
+ACPI_MAC ( rtma, &rtma_tables,
+ DATA ( 0x52, 0x54, 0x30, 0x30, 0x30, 0x31 ) );
+
/** Current ACPI test table set */
static struct acpi_test_tables *acpi_test_tables;
@@ -229,6 +247,7 @@ static void acpi_test_exec ( void ) {
/* MAC extraction tests */
acpi_mac_ok ( &amac );
acpi_mac_ok ( &maca );
+ acpi_mac_ok ( &rtma );
}
/** ACPI self-test */