Display error message when HOB creation fails due to lack of memory.
[people/mcb30/edk2.git] / edk2 / EdkModulePkg / Core / Pei / Hob / Hob.c
index 259d44b..9ac672b 100644 (file)
@@ -117,6 +117,9 @@ Returns:
                HandOffHob->EfiFreeMemoryBottom;\r
 \r
   if (FreeMemory < Length) {\r
+    DEBUG ((EFI_D_ERROR, "PeiCreateHob fail: Length - 0x%08x\n", (UINTN)Length));\r
+    DEBUG ((EFI_D_ERROR, "  FreeMemoryTop    - 0x%08x\n", (UINTN)HandOffHob->EfiFreeMemoryTop));\r
+    DEBUG ((EFI_D_ERROR, "  FreeMemoryBottom - 0x%08x\n", (UINTN)HandOffHob->EfiFreeMemoryBottom));\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   \r