Hi Heinrich,

On 2026-06-21T08:19:04, Heinrich Schuchardt
<[email protected]> wrote:
> efi_selftest: add ACPI configuration table test
>
> The new unit test checks if ACPI tables are available.
>
> If yes, it checks if the RSDP correctly points to the RSDT or XSDT.
>
> Signed-off-by: Heinrich Schuchardt <[email protected]>
>
> lib/efi_selftest/Makefile            |   1 +
>  lib/efi_selftest/efi_selftest_acpi.c | 138 
> +++++++++++++++++++++++++++++++++++
>  2 files changed, 139 insertions(+)

Reviewed-by: Simon Glass <[email protected]>

> diff --git a/lib/efi_selftest/efi_selftest_acpi.c 
> b/lib/efi_selftest/efi_selftest_acpi.c
> @@ -0,0 +1,138 @@
> +     if (!checksum_ok(rsdp, 20)) {
> +             efi_st_error("Invalid RSDP checksum\n");
> +             return EFI_ST_FAILURE;
> +     }

Please avoid the magic 20 - how about offsetof(struct acpi_rsdp,
length) or a named constant?

Regards,
Simon

Reply via email to