aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/cpu/tangier/acpi.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-12-16 09:11:57 +0100
committerSimon Glass <sjg@chromium.org>2024-01-07 13:45:07 -0700
commita083ae71e085535e2caa0fd5de991bddced6dc94 (patch)
treea82ce59f3b27e550e1342d4eae7f461fd16e0351 /arch/x86/cpu/tangier/acpi.c
parent70fe23859437ffe4efe0793423937d8b78ebf9d6 (diff)
downloadu-boot-a083ae71e085535e2caa0fd5de991bddced6dc94.zip
u-boot-a083ae71e085535e2caa0fd5de991bddced6dc94.tar.gz
u-boot-a083ae71e085535e2caa0fd5de991bddced6dc94.tar.bz2
acpi: use 64-bit addresses in FADT table
Fields X_FIRMWAE_CTRL and X_DSDT must be 64bit wide. Convert pointers to to uintptr_t to fill these. If field X_FIRMWARE_CTRL is filled, field FIRMWARE must be ignored. If field X_DSDT is filled, field DSDT must be ignored. We should not fill unused fields. See the field definitions in chapter "5.2.9 Fixed ACPI Description Table (FADT)" of the ACPI Specification 6.5. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/tangier/acpi.c')
-rw-r--r--arch/x86/cpu/tangier/acpi.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/cpu/tangier/acpi.c b/arch/x86/cpu/tangier/acpi.c
index 1c667c7..1d37cc9 100644
--- a/arch/x86/cpu/tangier/acpi.c
+++ b/arch/x86/cpu/tangier/acpi.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu.h>
#include <dm.h>
+#include <mapmem.h>
#include <acpi/acpi_table.h>
#include <asm/ioapic.h>
#include <asm/mpspec.h>
@@ -31,8 +32,6 @@ static int tangier_write_fadt(struct acpi_ctx *ctx,
header->length = sizeof(struct acpi_fadt);
header->revision = 6;
- fadt->firmware_ctrl = (u32)ctx->facs;
- fadt->dsdt = (u32)ctx->dsdt;
fadt->preferred_pm_profile = ACPI_PM_UNSPECIFIED;
fadt->iapc_boot_arch = ACPI_FADT_VGA_NOT_PRESENT |
@@ -45,10 +44,8 @@ static int tangier_write_fadt(struct acpi_ctx *ctx,
fadt->minor_revision = 2;
- fadt->x_firmware_ctl_l = (u32)ctx->facs;
- fadt->x_firmware_ctl_h = 0;
- fadt->x_dsdt_l = (u32)ctx->dsdt;
- fadt->x_dsdt_h = 0;
+ fadt->x_firmware_ctrl = map_to_sysmem(ctx->facs);
+ fadt->x_dsdt = map_to_sysmem(ctx->dsdt);
header->checksum = table_compute_checksum(fadt, header->length);