:: commit 2dbeb331025e7bac499aa8cd0072e77dc2123366

Mintsuki <mintsuki@protonmail.com> — 2026-02-08 16:09

parents: 93f1732655

lib/acpi: Fall back to RSDT when XSDT is above 4 GiB on 32-bit

diff --git a/common/lib/acpi.c b/common/lib/acpi.c
index 47fa72ef..e05f4a09 100644
--- a/common/lib/acpi.c
+++ b/common/lib/acpi.c
@@ -209,7 +209,8 @@ void *acpi_get_table(const char *signature, int index) {
         return NULL;
 
     bool use_xsdt = false;
-    if (rsdp->rev >= 2 && rsdp->xsdt_addr)
+    if (rsdp->rev >= 2 && rsdp->xsdt_addr
+     && (sizeof(uintptr_t) >= 8 || rsdp->xsdt_addr <= UINT32_MAX))
         use_xsdt = true;
 
     struct rsdt *rsdt;
tab: 248 wrap: offon