[PATCH 3/3] acpi: Fix-up patch to correct sandbox test errors

Simon Glass sjg at chromium.org
Mon Apr 27 19:02:36 CEST 2020


Move the alignment code into acpi_setup_base_tables() so that test and
production code are in alignment.

This brings x86/master into line with patch series v8.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/x86/lib/acpi_table.c | 5 -----
 lib/acpi/acpi_table.c     | 7 ++++++-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 600bde2f5f..13f1409de8 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -375,11 +375,6 @@ ulong write_acpi_tables(ulong start_addr)
 	debug("ACPI: Writing ACPI tables at %lx\n", start_addr);
 
 	acpi_setup_base_tables(ctx, start);
-	/*
-	 * Per ACPI spec, the FACS table address must be aligned to a 64 byte
-	 * boundary (Windows checks this, but Linux does not).
-	 */
-	acpi_align64(ctx);
 
 	debug("ACPI:    * FACS\n");
 	facs = ctx->current;
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index 5abf1cad50..1c253af3bf 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -145,7 +145,7 @@ int acpi_add_table(struct acpi_ctx *ctx, void *table)
 	}
 
 	if (i >= entries_num) {
-		debug("ACPI: Error: too many tables\n");
+		log_err("ACPI: Error: too many tables\n");
 		return -E2BIG;
 	}
 
@@ -256,4 +256,9 @@ void acpi_setup_base_tables(struct acpi_ctx *ctx, void *start)
 	acpi_write_rsdp(ctx->rsdp, ctx->rsdt, ctx->xsdt);
 	acpi_write_rsdt(ctx->rsdt);
 	acpi_write_xsdt(ctx->xsdt);
+	/*
+	 * Per ACPI spec, the FACS table address must be aligned to a 64 byte
+	 * boundary (Windows checks this, but Linux does not).
+	 */
+	acpi_align64(ctx);
 }
-- 
2.26.2.303.gf8c07b1a785-goog



More information about the U-Boot mailing list