From af11926fa43a5adeece7b7f2bfc631a2f1662ed2 Mon Sep 17 00:00:00 2001 From: Fredrik Holmqvist Date: Tue, 23 Feb 2010 21:40:35 +0000 Subject: [PATCH] Added a temporary? warning if the ACPI_MACHINE_WIDTH == 32 and Rsdp->XsdtPhysicalAddress > ACPI_UINT32_MAX. The code is in a part of the ACPI code we import, so using its code style and is based on similar code a few lines above. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35592 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/bus_managers/acpi/tables/tbutils.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c b/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c index 0959ab25a5..03f3b11892 100644 --- a/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c +++ b/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c @@ -620,6 +620,19 @@ AcpiTbParseRootTable ( */ Address = (ACPI_PHYSICAL_ADDRESS) Rsdp->XsdtPhysicalAddress; TableEntrySize = sizeof (UINT64); + +#if ACPI_MACHINE_WIDTH == 32 + if (Rsdp->XsdtPhysicalAddress > ACPI_UINT32_MAX) + { + /* Will truncate 64-bit address to 32 bits, issue warning */ + + ACPI_WARNING ((AE_INFO, + "64-bit Physical Address in XSDT is too large (%8.8X%8.8X)," + " truncating", + ACPI_FORMAT_UINT64 (Rsdp->XsdtPhysicalAddress))); + } +#endif + } else {