x86: acpi: Move MADT down a bit
authorSimon Glass <sjg@chromium.org>
Tue, 7 Jul 2020 19:12:04 +0000 (13:12 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 17 Jul 2020 06:32:24 +0000 (14:32 +0800)
Put this table before MCFG so that it matches the order that coreboot uses
when passing tables to Linux. This is a cosmetic change since the order of
the tables does not otherwise matter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/acpi_table.c

index 6985ef4..e96acf0 100644 (file)
@@ -418,18 +418,18 @@ ulong write_acpi_tables(ulong start_addr)
        acpi_create_fadt(fadt, facs, dsdt);
        acpi_add_table(ctx, fadt);
 
-       debug("ACPI:    * MADT\n");
-       madt = ctx->current;
-       acpi_create_madt(madt);
-       acpi_inc_align(ctx, madt->header.length);
-       acpi_add_table(ctx, madt);
-
        debug("ACPI:    * MCFG\n");
        mcfg = ctx->current;
        acpi_create_mcfg(mcfg);
        acpi_inc_align(ctx, mcfg->header.length);
        acpi_add_table(ctx, mcfg);
 
+       debug("ACPI:    * MADT\n");
+       madt = ctx->current;
+       acpi_create_madt(madt);
+       acpi_inc_align(ctx, madt->header.length);
+       acpi_add_table(ctx, madt);
+
        debug("ACPI:    * CSRT\n");
        csrt = ctx->current;
        acpi_create_csrt(csrt);