]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd: acpi: check HW reduced flag in acpi list
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 16 Dec 2023 08:11:59 +0000 (09:11 +0100)
committerSimon Glass <sjg@chromium.org>
Sun, 7 Jan 2024 20:49:02 +0000 (13:49 -0700)
On non x86 platforms the hardware reduce flag must be set in the FADT
table. Write an error message if the flag is missing.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rebased on -next to use nomap, add hyphens:
Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/acpi.c

index 1eca7fe7734dcf8e3a12d48f944106857271e84a..65caaa5c98e49068499786ac805d302e3b95e2c0 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <display_options.h>
+#include <log.h>
 #include <mapmem.h>
 #include <acpi/acpi_table.h>
 #include <asm/acpi_table.h>
@@ -57,6 +58,9 @@ static void list_fadt(struct acpi_fadt *fadt)
                dump_hdr(nomap_sysmem(fadt->x_dsdt, 0));
        else if (fadt->dsdt)
                dump_hdr(nomap_sysmem(fadt->dsdt, 0));
+       if (!IS_ENABLED(CONFIG_X86) &&
+           !(fadt->flags & ACPI_FADT_HW_REDUCED_ACPI))
+               log_err("FADT not ACPI-hardware-reduced-compliant\n");
        if (fadt->header.revision >= 3 && fadt->x_firmware_ctrl)
                dump_hdr(nomap_sysmem(fadt->x_firmware_ctrl, 0));
        else if (fadt->firmware_ctrl)