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

@@ -47,7 +47,7 @@ struct acpi_table_header *find_table(const char *sig)
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);
@@ -143,12 +143,12 @@ static int do_acpi_list(struct cmd_tbl *cmdtp, int flag, int argc,
{
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;