x86: Move the acpi table to generic global_data

Allow this to be used on any arch. Also convert to using macros so that
we can check the CONFIG option in C code.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-12-01 09:02:37 -07:00
parent e1722fcb7d
commit 233f0e35a3
6 changed files with 13 additions and 7 deletions

View File

@@ -456,6 +456,10 @@ struct global_data {
* @acpi_ctx: ACPI context pointer
*/
struct acpi_ctx *acpi_ctx;
/**
* @acpi_start: Start address of ACPI tables
*/
ulong acpi_start;
#endif
#if CONFIG_IS_ENABLED(GENERATE_SMBIOS_TABLE)
/**
@@ -512,8 +516,12 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#ifdef CONFIG_GENERATE_ACPI_TABLE
#define gd_acpi_ctx() gd->acpi_ctx
#define gd_acpi_start() gd->acpi_start
#define gd_set_acpi_start(addr) gd->acpi_start = addr
#else
#define gd_acpi_ctx() NULL
#define gd_acpi_start() 0UL
#define gd_set_acpi_start(addr)
#endif
#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)