struct arch_global_data {
uint8_t *ram_buf; /* emulated RAM buffer */
void *text_base; /* pointer to base of text region */
- ulong acpi_start; /* Start address of ACPI tables */
};
#include <asm-generic/global_data.h>
struct fsp_header *fsp_s_hdr; /* Pointer to FSP-S header */
#endif
void *itss_priv; /* Private ITSS data pointer */
- ulong acpi_start; /* Start address of ACPI tables */
ulong coreboot_table; /* Address of coreboot table */
};
struct acpi_rsdt *rsdt;
int len, i, count;
- rsdp = map_sysmem(gd->arch.acpi_start, 0);
+ rsdp = map_sysmem(gd_acpi_start(), 0);
if (!rsdp)
return NULL;
rsdt = map_sysmem(rsdp->rsdt_address, 0);
{
struct acpi_rsdp *rsdp;
- rsdp = map_sysmem(gd->arch.acpi_start, 0);
+ rsdp = map_sysmem(gd_acpi_start(), 0);
if (!rsdp) {
printf("No ACPI tables present\n");
return 0;
}
- printf("ACPI tables start at %lx\n", gd->arch.acpi_start);
+ printf("ACPI tables start at %lx\n", gd_acpi_start());
list_rsdp(rsdp);
return 0;
* @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)
/**
#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)
/* Align ACPI tables to 16 byte */
acpi_align(ctx);
- gd->arch.acpi_start = map_to_sysmem(ctx->current);
+ gd_set_acpi_start(map_to_sysmem(ctx->current));
/* We need at least an RSDP and an RSDT Table */
ctx->rsdp = ctx->current;
buf = memalign(64, BUF_SIZE);
ut_assertnonnull(buf);
acpi_setup_base_tables(&ctx, buf + 4);
- ut_asserteq(map_to_sysmem(PTR_ALIGN(buf + 4, 16)), gd->arch.acpi_start);
+ ut_asserteq(map_to_sysmem(PTR_ALIGN(buf + 4, 16)), gd_acpi_start());
rsdp = buf + 16;
ut_asserteq_ptr(rsdp, ctx.rsdp);