]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Image/Image.c
MdeModulePkg/Core/Pei: fix REGISITER -> REGISTER typo
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Image / Image.c
index 198541128512318af8a8c6fa0c53ae0718c9847b..f07f48823117aa0373f7f6fb9f8abdac7819340e 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
@@ -387,7 +387,7 @@ LoadAndRelocatePeCoffImage (
   }\r
   IsRegisterForShadow = FALSE;\r
   if ((Private->CurrentFileHandle == FileHandle) \r
-    && (Private->Fv[Private->CurrentPeimFvCount].PeimState[Private->CurrentPeimCount] == PEIM_STATE_REGISITER_FOR_SHADOW)) {\r
+    && (Private->Fv[Private->CurrentPeimFvCount].PeimState[Private->CurrentPeimCount] == PEIM_STATE_REGISTER_FOR_SHADOW)) {\r
     IsRegisterForShadow = TRUE;\r
   }\r
 \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
@@ -871,7 +876,7 @@ PeiLoadImage (
         //\r
         // The shadowed PEIM must be relocatable.\r
         //\r
-        if (PeimState == PEIM_STATE_REGISITER_FOR_SHADOW) {\r
+        if (PeimState == PEIM_STATE_REGISTER_FOR_SHADOW) {\r
           IsStrip = RelocationIsStrip ((VOID *) (UINTN) ImageAddress);\r
           ASSERT (!IsStrip);\r
           if (IsStrip) {\r