From 9d2adca8c3e8d195fa4be5acc8c6dfe14933e826 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 1 Dec 2021 09:03:03 -0700 Subject: x86: Move acpi_get_rsdp_addr() ACPI tables to the writer Move this over to use a writer file, moving the code from the x86 implementation. There is no need to store a separate variable since we can simply access the ACPI context. With this, the original monolithic x86 function for writing ACPI tables is gone. Note that QEMU has its own implementation. Signed-off-by: Simon Glass --- lib/acpi/acpi_writer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/acpi/acpi_writer.c b/lib/acpi/acpi_writer.c index 59f951cba4..9b0aa23fd7 100644 --- a/lib/acpi/acpi_writer.c +++ b/lib/acpi/acpi_writer.c @@ -102,6 +102,14 @@ int write_dev_tables(struct acpi_ctx *ctx, const struct acpi_writer *entry) return 0; } ACPI_WRITER(8dev, NULL, write_dev_tables, 0); + +ulong acpi_get_rsdp_addr(void) +{ + if (!gd->acpi_ctx) + return 0; + + return map_to_sysmem(gd->acpi_ctx->rsdp); +} #endif /* QEMU */ void acpi_setup_ctx(struct acpi_ctx *ctx, ulong start) -- cgit v1.2.3