From 356f6c1b64d7a97746d1816cef8ca22bdd8d0b5d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 23 May 2017 15:44:22 +0100 Subject: [acpi] Expose ACPI tables via settings mechanism Allow values to be read from ACPI tables using the syntax ${acpi/..0..} where is the ACPI table signature as a 32-bit hexadecimal number (e.g. 0x41504093 for the 'APIC' signature on the MADT), is the index into the array of tables matching this signature, is the byte offset within the table, and is the field length in bytes. Numeric values are returned in reverse byte order, since ACPI numeric values are usually little-endian. For example: ${acpi/0x41504943.0.0.0.0} - entire MADT table in raw hex ${acpi/0x41504943.0.0.0x0a.6:string} - MADT table OEM ID ${acpi/0x41504943.0.0.0x24.4:uint32} - local APIC address Signed-off-by: Michael Brown --- src/config/config.c | 3 +++ src/config/settings.h | 1 + 2 files changed, 4 insertions(+) (limited to 'src/config') diff --git a/src/config/config.c b/src/config/config.c index faf9aefa..8adb1ed3 100644 --- a/src/config/config.c +++ b/src/config/config.c @@ -337,6 +337,9 @@ REQUIRE_OBJECT ( memmap_settings ); #ifdef VRAM_SETTINGS REQUIRE_OBJECT ( vram_settings ); #endif +#ifdef ACPI_SETTINGS +REQUIRE_OBJECT ( acpi_settings ); +#endif /* * Drag in selected keyboard map diff --git a/src/config/settings.h b/src/config/settings.h index 01feaaa8..d9c86a38 100644 --- a/src/config/settings.h +++ b/src/config/settings.h @@ -14,6 +14,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); //#define MEMMAP_SETTINGS /* Memory map settings */ //#define VMWARE_SETTINGS /* VMware GuestInfo settings */ //#define VRAM_SETTINGS /* Video RAM dump settings */ +//#define ACPI_SETTINGS /* ACPI settings */ #include #include NAMED_CONFIG(settings.h) -- cgit v1.2.3-55-g7522