[edk2] [PATCH v3 03/12] ArmVirtPkg/XenAcpiPlatformDxe: don't cast UINT64 to pointer directly

Laszlo Ersek posted 12 patches 7 years, 7 months ago
There is a newer version of this series
[edk2] [PATCH v3 03/12] ArmVirtPkg/XenAcpiPlatformDxe: don't cast UINT64 to pointer directly
Posted by Laszlo Ersek 7 years, 7 months ago
Because that breaks the (potential) 32-bit build of the driver.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---

Notes:
    v3:
    - modify commit message (s/upcoming/potential/ build) to reflect that we
      won't actually include the ACPI stuff in the 32-bit builds [Ard]
    - pick up Ard's R-b

 ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c b/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c
index 203946f97bf8..49f9b5d2822a 100644
--- a/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c
+++ b/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c
@@ -73,7 +73,8 @@ GetXenArmAcpiRsdp (
   ASSERT (RegSize == 2 * sizeof (UINT64));
 
   RegBase = SwapBytes64(Reg[0]);
-  RsdpStructurePtr = (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *)RegBase;
+  RsdpStructurePtr =
+    (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *)(UINTN)RegBase;
 
   if (RsdpStructurePtr && RsdpStructurePtr->Revision >= 2) {
     Sum = CalculateSum8 ((CONST UINT8 *)RsdpStructurePtr,
-- 
2.9.3


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel