]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: acpi: fix listing DSDT and FACS
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 16 Dec 2023 08:11:58 +0000 (09:11 +0100)
committerSimon Glass <sjg@chromium.org>
Sun, 7 Jan 2024 20:48:30 +0000 (13:48 -0700)
If field X_FIRMWARE_CTRL is filled, field FIRMWARE must be ignored. If
field X_DSDT is filled, field DSDT must be ignored.

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

index 79e9335b5db8eadb041670902d8f0c69c7891de5..1eca7fe7734dcf8e3a12d48f944106857271e84a 100644 (file)
@@ -53,9 +53,13 @@ static int dump_table_name(const char *sig)
 
 static void list_fadt(struct acpi_fadt *fadt)
 {
-       if (fadt->dsdt)
+       if (fadt->header.revision >= 3 && fadt->x_dsdt)
+               dump_hdr(nomap_sysmem(fadt->x_dsdt, 0));
+       else if (fadt->dsdt)
                dump_hdr(nomap_sysmem(fadt->dsdt, 0));
-       if (fadt->firmware_ctrl)
+       if (fadt->header.revision >= 3 && fadt->x_firmware_ctrl)
+               dump_hdr(nomap_sysmem(fadt->x_firmware_ctrl, 0));
+       else if (fadt->firmware_ctrl)
                dump_hdr(nomap_sysmem(fadt->firmware_ctrl, 0));
 }