]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/Pei/Memory/MemoryServices.c
Add debug info when allocate pages failed in PeiMain.
[mirror_edk2.git] / EdkModulePkg / Core / Pei / Memory / MemoryServices.c
index 277f60b26d2927fa587087800fa0f5081de88120..88046c7a7bc46593357c9ea2f74d1a891931f779 100644 (file)
@@ -245,7 +245,7 @@ Returns:
       Hob.HandoffInformationTable->EfiFreeMemoryBottom) {\r
     DEBUG ((EFI_D_ERROR, "AllocatePages failed: No 0x%x Pages is available.\n", Pages));\r
     DEBUG ((EFI_D_ERROR, "There is only left 0x%x pages memory resource to be allocated.\n", \\r
-    (Hob.HandoffInformationTable->EfiFreeMemoryTop - Hob.HandoffInformationTable->EfiFreeMemoryBottom)/EFI_PAGE_SIZE));\r
+    EFI_SIZE_TO_PAGES ((UINTN) (Hob.HandoffInformationTable->EfiFreeMemoryTop - Hob.HandoffInformationTable->EfiFreeMemoryBottom))));\r
     return  EFI_OUT_OF_RESOURCES;\r
   } else {\r
     //\r