aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-01 09:02:48 -0700
committerSimon Glass <sjg@chromium.org>2022-01-25 11:44:36 -0700
commitcc1f8c39882c5100ec07dfa46e32ff395d792b94 (patch)
tree2f5a32f096aec41a5082f8727269fae8688eaaa0 /include
parent6afa63a5a63662fa7e517b29da613f51e9e68429 (diff)
downloadu-boot-cc1f8c39882c5100ec07dfa46e32ff395d792b94.zip
u-boot-cc1f8c39882c5100ec07dfa46e32ff395d792b94.tar.gz
u-boot-cc1f8c39882c5100ec07dfa46e32ff395d792b94.tar.bz2
x86: acpi: Split out context creation from base tables
At present acpi_setup_base_tables() both sets up the ACPI context and writes out the base tables. We want to use an ACPI writer to write the base tables, so split this function into two, with acpi_setup_ctx() doing the context set, and acpi_setup_base_tables() just doing the base tables. Disable the writer's write_acpi_tables() function for now, to avoid build errors. It is enabled in a following patch. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_table.h10
-rw-r--r--include/dm/acpi.h12
2 files changed, 17 insertions, 5 deletions
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index d3fbdc1..f34bd63 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -679,14 +679,14 @@ void acpi_inc_align(struct acpi_ctx *ctx, uint amount);
int acpi_add_table(struct acpi_ctx *ctx, void *table);
/**
- * acpi_setup_base_tables() - Set up context along with RSDP, RSDT and XSDT
+ * acpi_setup_base_tables() - Set up base tables - RSDP, RSDT and XSDT
*
- * Set up the context with the given start position. Some basic tables are
- * always needed, so set them up as well.
+ * Writes the basic tables to the given context, which must first be set up with
+ * acpi_setup_ctx().
*
- * @ctx: Context to set up
+ * @ctx: Context to write base tables to
*/
-void acpi_setup_base_tables(struct acpi_ctx *ctx, void *start);
+void acpi_setup_base_tables(struct acpi_ctx *ctx);
/**
* acpi_write_rsdp() - Write out an RSDP indicating where the ACPI tables are
diff --git a/include/dm/acpi.h b/include/dm/acpi.h
index 2f52950..f6e5479 100644
--- a/include/dm/acpi.h
+++ b/include/dm/acpi.h
@@ -297,6 +297,18 @@ void acpi_reset_items(void);
*/
int acpi_write_one(struct acpi_ctx *ctx, const struct acpi_writer *entry);
+/**
+ * acpi_setup_ctx() - Set up a new ACPI context
+ *
+ * This zeros the context and sets up the base and current pointers, ensuring
+ * that they are aligned. Then it writes the acpi_start and acpi_ctx values in
+ * global_data
+ *
+ * @ctx: ACPI context to set up
+ * @start: Start address for ACPI table
+ */
+void acpi_setup_ctx(struct acpi_ctx *ctx, ulong start);
+
#endif /* __ACPI__ */
#endif