[PATCH 2/3] efi_selftest: add ACPI configuration table test
Simon Glass
sjg at chromium.org
Sat May 23 11:47:14 CEST 2026
Hi Heinrich,
On 2026-05-21T18:50:22, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
> efi_selftest: add ACPI configuration table test
>
> The new unit tests checks if ACPI tables are available.
>
> If yes, it checks if the RSDT correctly points to the RSDT or XSDT.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>
> lib/efi_selftest/Makefile | 1 +
> lib/efi_selftest/efi_selftest_acpi.c | 75 ++++++++++++++++++++++++++++++++++++
> 2 files changed, 76 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
> efi_selftest: add ACPI configuration table test
>
> The new unit tests checks if ACPI tables are available.
>
> If yes, it checks if the RSDT correctly points to the RSDT or XSDT.
the first 'RSDT' should be 'RSDP', since it's the pointer. Also 'unit
tests checks' should be 'unit test checks'.
> diff --git a/lib/efi_selftest/efi_selftest_acpi.c b/lib/efi_selftest/efi_selftest_acpi.c
> @@ -0,0 +1,75 @@
> + if (memcmp(rsdp->signature, RSDP_SIG, sizeof(rsdp->signature))) {
> + efi_st_error("Wrong RSDP signature\n");
> + return EFI_ST_FAILURE;
> + }
I think Ilias says the same thing, but please also verify the RSDP
checksum (first 20 bytes for revision 0, full struct for revision 2).
> diff --git a/lib/efi_selftest/efi_selftest_acpi.c b/lib/efi_selftest/efi_selftest_acpi.c
> @@ -0,0 +1,75 @@
> + rsdp = efi_st_get_config_table(&acpi2_guid);
> + if (!rsdp)
> + rsdp = efi_st_get_config_table(&acpi1_guid);
> + if (!rsdp)
> + return EFI_ST_SUCCESS;
Silently returning success when no ACPI table is installed makes this
a no-op on every non-ACPI build, with no log indication. The fdt
selftest uses setup() returning EFI_ST_FAILURE for the unexpected
combination. Could you at least emit an efi_st_printf() saying the
test was skipped?
Regards,
Simon
More information about the U-Boot
mailing list