From: Heinrich Schuchardt Date: Sat, 16 Dec 2023 08:11:58 +0000 (+0100) Subject: cmd: acpi: fix listing DSDT and FACS X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=c5924b1cd3a6eb980cea59e5f663bb614686b55d;p=u-boot.git cmd: acpi: fix listing DSDT and FACS 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 Reviewed-by: Simon Glass Rebased on -next to use nomap: Signed-off-by: Simon Glass --- diff --git a/cmd/acpi.c b/cmd/acpi.c index 79e9335b5d..1eca7fe773 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -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)); }