From c5924b1cd3a6eb980cea59e5f663bb614686b55d Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 16 Dec 2023 09:11:58 +0100 Subject: [PATCH] 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 --- cmd/acpi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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)); } -- 2.39.5