[PATCH 2/3] efi_selftest: add ACPI configuration table test
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Fri May 22 11:02:22 CEST 2026
On 5/22/26 09:10, Ilias Apalodimas wrote:
> Hi Heinrich,
>
> [....]
>
>> --- /dev/null
>> +++ b/lib/efi_selftest/efi_selftest_acpi.c
>> @@ -0,0 +1,75 @@
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +/*
>> + * efi_selftest_acpi
>> + *
>> + * Copyright 2026, Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>> + *
>> + * Check ACPI configuration table availability and root table presence.
>> + */
>> +
>> +#include <efi_selftest.h>
>> +#include <acpi/acpi_table.h>
>> +
>> +static const efi_guid_t acpi2_guid = EFI_ACPI_TABLE_GUID;
>> +static const efi_guid_t acpi1_guid = EFI_GUID_EFI_ACPI1;
>> +
>> +/**
>> + * efi_st_acpi_execute() - execute ACPI selftest
>> + *
>> + * Return: status code
>> + */
>> +static int efi_st_acpi_execute(void)
>> +{
>> + struct acpi_rsdp *rsdp;
>> + struct acpi_table_header *table;
>> + u32 rsdt_addr32;
>> + u64 xsdt_addr64;
>> + uintptr_t rsdt_addr;
>> + uintptr_t xsdt_addr;
>> +
>> + rsdp = efi_st_get_config_table(&acpi2_guid);
>> + if (!rsdp)
>> + rsdp = efi_st_get_config_table(&acpi1_guid);
>
> Isn't having both RSDT and XSDT a valid case?
> IOW the test looks fine, but wouldn't it be better to check for both
> unconditionally?
Yes, if pointers to both tables exist, we probably should check both
signatures.
Best regards
Heinrich
More information about the U-Boot
mailing list