acpi: Fix table length for QEMU
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Thu, 3 Apr 2025 05:34:44 +0000 (08:34 +0300)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 3 Apr 2025 06:58:27 +0000 (08:58 +0200)
The end of the ACPI table is set to 'addr' instead of 'end'. The ACPI
code for QEMU relies on those values to mark memory as 'ACPI Reclaim'
and as a result the ACPI RSDP ends up in Boot services Data.

Reported-by: Björn Töpel <bjorn@kernel.org>
Fixes: commit 638cc363484b ("acpi: enable writing ACPI tables on QEMU")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/misc/qfw_acpi.c

index 0d0cf76..77cebae 100644 (file)
@@ -305,7 +305,7 @@ static int evt_write_acpi_tables(void)
        /* Generate ACPI tables */
        end = write_acpi_tables(addr);
        gd->arch.table_start = addr;
-       gd->arch.table_end = addr;
+       gd->arch.table_end = end;
 
        return 0;
 }