]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/Pei/Memory/MemoryServices.c
Add debug info when decompress failed in DxeIpl and allocate pages failed in PeiMain.
[mirror_edk2.git] / EdkModulePkg / Core / Pei / Memory / MemoryServices.c
index d49b7427b4817cd50c0ffbabd0588f10985f4189..277f60b26d2927fa587087800fa0f5081de88120 100644 (file)
@@ -243,6 +243,9 @@ Returns:
   //\r
   if (Hob.HandoffInformationTable->EfiFreeMemoryTop - ((Pages * EFI_PAGE_SIZE) + sizeof (EFI_HOB_MEMORY_ALLOCATION)) < \r
       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
     return  EFI_OUT_OF_RESOURCES;\r
   } else {\r
     //\r
@@ -302,7 +305,7 @@ Returns:
   EFI_HOB_MEMORY_POOL      *Hob;\r
 \r
  //\r
- // If some ¡°post-memory¡± PEIM wishes to allocate larger pool,\r
+ // If some "post-memory" PEIM wishes to allocate larger pool,\r
  // it should use AllocatePages service instead.\r
  //\r
  ASSERT (Size < 0x10000 - sizeof (EFI_HOB_MEMORY_POOL));\r