Add debug info when decompress failed in DxeIpl and allocate pages failed in PeiMain.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Dec 2006 10:00:18 +0000 (10:00 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Dec 2006 10:00:18 +0000 (10:00 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2140 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
EdkModulePkg/Core/Pei/Memory/MemoryServices.c

index 53be7d9..b157b93 100644 (file)
@@ -848,6 +848,7 @@ Returns:
             //\r
             // GetInfo failed\r
             //\r
+            DEBUG ((EFI_D_ERROR, "Decompress GetInfo Failed - %r\n", Status));\r
             return EFI_NOT_FOUND;\r
           }\r
   \r
@@ -875,6 +876,13 @@ Returns:
                       DstBuffer,\r
                       ScratchBuffer\r
                       );\r
+          if (EFI_ERROR (Status)) {\r
+            //\r
+            // Decompress failed\r
+            //\r
+            DEBUG ((EFI_D_ERROR, "Decompress Failed - %r\n", Status));\r
+            return EFI_NOT_FOUND;\r
+          }\r
         }\r
         \r
         CmpSection = (EFI_COMMON_SECTION_HEADER *) DstBuffer;\r
index 62cd59e..277f60b 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