diff --git a/OvmfPkg/AcpiPlatformDxe/Qemu.c b/OvmfPkg/AcpiPlatformDxe/Qemu.c index 051449d72a..4c88c32ec8 100644 --- a/OvmfPkg/AcpiPlatformDxe/Qemu.c +++ b/OvmfPkg/AcpiPlatformDxe/Qemu.c @@ -268,8 +268,8 @@ QemuInstallAcpiSsdtTable ( *(UINT32*) SsdtPtr = sizeof (*FwData); SsdtPtr += 4; - ASSERT(SsdtPtr - Ssdt == SsdtSize); - ((EFI_ACPI_DESCRIPTION_HEADER *) Ssdt)->Length = SsdtSize; + ASSERT((UINTN) (SsdtPtr - Ssdt) == SsdtSize); + ((EFI_ACPI_DESCRIPTION_HEADER *) Ssdt)->Length = (UINT32) SsdtSize; Status = InstallAcpiTable (AcpiProtocol, Ssdt, SsdtSize, TableKey); } diff --git a/OvmfPkg/AcpiPlatformDxe/Xen.c b/OvmfPkg/AcpiPlatformDxe/Xen.c index 02ab8402eb..618ac58b42 100644 --- a/OvmfPkg/AcpiPlatformDxe/Xen.c +++ b/OvmfPkg/AcpiPlatformDxe/Xen.c @@ -188,7 +188,7 @@ InstallXenTables ( CurrentTableEntry = (VOID *) ((UINT8 *) Xsdt + sizeof (EFI_ACPI_DESCRIPTION_HEADER) + Index * sizeof (UINT64)); - CurrentTablePointer = *(UINT64 *)CurrentTableEntry; + CurrentTablePointer = (UINTN) *(UINT64 *)CurrentTableEntry; CurrentTable = (EFI_ACPI_DESCRIPTION_HEADER *) CurrentTablePointer; //