Author: tqh Date: 2010-02-23 22:40:35 +0100 (Tue, 23 Feb 2010) New Revision: 35592 Changeset: http://dev.haiku-os.org/changeset/35592/haiku Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c Log: 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. Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c 2010-02-23 20:37:36 UTC (rev 35591) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/tables/tbutils.c 2010-02-23 21:40:35 UTC (rev 35592) @@ -620,6 +620,19 @@ */ 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 {