X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FDxeServicesLib%2FX64%2FAllocate.c;fp=MdePkg%2FLibrary%2FDxeServicesLib%2FX64%2FAllocate.c;h=cb08e6b24715a049e0e8a2a6a7670db68d7fca11;hp=41c4cea391a93e319dec63cc195144d0c72f8c5d;hb=2f88bd3a1296c522317f1c21377876de63de5be7;hpb=1436aea4d5707e672672a11bda72be2c63c936c3 diff --git a/MdePkg/Library/DxeServicesLib/X64/Allocate.c b/MdePkg/Library/DxeServicesLib/X64/Allocate.c index 41c4cea391..cb08e6b247 100644 --- a/MdePkg/Library/DxeServicesLib/X64/Allocate.c +++ b/MdePkg/Library/DxeServicesLib/X64/Allocate.c @@ -52,12 +52,13 @@ AllocatePeiAccessiblePages ( PhitHob = (EFI_HOB_HANDOFF_INFO_TABLE *)GetHobList (); if (PhitHob->EfiFreeMemoryTop <= MAX_UINT32) { AllocType = AllocateMaxAddress; - Memory = MAX_UINT32; + Memory = MAX_UINT32; } Status = gBS->AllocatePages (AllocType, MemoryType, Pages, &Memory); if (EFI_ERROR (Status)) { return NULL; } + return (VOID *)(UINTN)Memory; }