From: Laszlo Ersek Date: Fri, 17 Mar 2017 15:07:53 +0000 (+0100) Subject: ArmVirtPkg/XenAcpiPlatformDxe: don't cast UINT64 to pointer directly X-Git-Tag: edk2-stable201903~4315 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6244c8924e72d779522beccd4086ceef98c40017;p=mirror_edk2.git ArmVirtPkg/XenAcpiPlatformDxe: don't cast UINT64 to pointer directly Because that breaks the (potential) 32-bit build of the driver. Cc: Ard Biesheuvel Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- diff --git a/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c b/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c index 203946f97b..49f9b5d282 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,