Attention is currently required from: Lance Zhao, Tim Wawrzynczak.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/76179?usp=email )
Change subject: acpi.c: Fill in >4G FADT entries correctly ......................................................................
acpi.c: Fill in >4G FADT entries correctly
Signed-off-by: Arthur Heymans arthur@aheymans.xyz Change-Id: I84ab0068e8409a5e525ddc781347087680d80640 --- M src/acpi/acpi.c 1 file changed, 8 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/76179/1
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c index fac8cf5..98ed61f 100644 --- a/src/acpi/acpi.c +++ b/src/acpi/acpi.c @@ -1727,13 +1727,15 @@ header->asl_compiler_revision = asl_revision;
fadt->FADT_MinorVersion = get_acpi_fadt_minor_version(); - fadt->firmware_ctrl = (unsigned long)facs; - fadt->x_firmware_ctl_l = (unsigned long)facs; - fadt->x_firmware_ctl_h = 0; + if ((uintptr_t)facs < UINT32_MAX)) + fadt->firmware_ctrl = (unsigned long)facs; + fadt->x_firmware_ctl_l = (uint32_t)(uintptr_t)facs; + fadt->x_firmware_ctl_h =; (uint32_t)((uintptr_t)facs >> 32);
- fadt->dsdt = (unsigned long)dsdt; - fadt->x_dsdt_l = (unsigned long)dsdt; - fadt->x_dsdt_h = 0; + if ((uintptr_t)dsdt < UINT32_MAX) + fadt->dsdt = (unsigned long)dsdt; + fadt->x_dsdt_l = (uint32_t)(uintptr_t)dsdt; + fadt->x_dsdt_h = (uint32_t)((uintptr_t)dsdt >> 32);
/* should be 0 ACPI 3.0 */ fadt->reserved = 0;