diff options
author | Simon Glass <sjg@chromium.org> | 2021-12-01 09:02:48 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-01-25 11:44:36 -0700 |
commit | cc1f8c39882c5100ec07dfa46e32ff395d792b94 (patch) | |
tree | 2f5a32f096aec41a5082f8727269fae8688eaaa0 /arch/x86 | |
parent | 6afa63a5a63662fa7e517b29da613f51e9e68429 (diff) | |
download | u-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 'arch/x86')
-rw-r--r-- | arch/x86/lib/acpi_table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 3f84771..f57323b 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -522,17 +522,17 @@ ulong write_acpi_tables(ulong start_addr) int ret; int i; - ctx = calloc(1, sizeof(*ctx)); + ctx = malloc(sizeof(*ctx)); if (!ctx) return log_msg_ret("mem", -ENOMEM); - gd->acpi_ctx = ctx; start = map_sysmem(start_addr, 0); debug("ACPI: Writing ACPI tables at %lx\n", start_addr); acpi_reset_items(); - acpi_setup_base_tables(ctx, start); + acpi_setup_ctx(ctx, start); + acpi_setup_base_tables(ctx); debug("ACPI: * FACS\n"); facs = ctx->current; |