]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Image/Image.c
MdeModulePkg PeiCore: Add error message to describe PEIM load failure
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Image / Image.c
index 198541128512318af8a8c6fa0c53ae0718c9847b..f41d3acac77e41a853111148f11813812bf5321b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Pei Core Load Image Support\r
 \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -506,6 +506,9 @@ LoadAndRelocatePeCoffImage (
   //\r
   Status = PeCoffLoaderLoadImage (&ImageContext);\r
   if (EFI_ERROR (Status)) {\r
+    if (ImageContext.ImageError == IMAGE_ERROR_INVALID_SECTION_ALIGNMENT) {\r
+      DEBUG ((DEBUG_ERROR, "PEIM Image Address 0x%11p doesn't meet with section alignment 0x%x.\n", (VOID*)(UINTN)ImageContext.ImageAddress, ImageContext.SectionAlignment));\r
+    }\r
     return Status;\r
   }\r
   //\r
@@ -612,6 +615,8 @@ PeiLoadImageLoadImage (
     }\r
   }\r
 \r
+  DEBUG ((DEBUG_INFO, "Loading PEIM %g\n", FileHandle));\r
+\r
   //\r
   // If memory is installed, perform the shadow operations\r
   //\r