From bfd4a3f1b4d04473687e364a513d70989c8d5b69 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Fri, 15 Jan 2010 09:48:37 +0000 Subject: [PATCH] Update PeiLoadFilePpi produced by PeiCore to load only images with relocation into memory. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9775 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Pei/Image/Image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index bb2e0693da..24ecd93ad8 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -145,7 +145,7 @@ LoadAndRelocatePeCoffImage ( // // Allocate Memory for the image // - if ((Private->PeiMemoryInstalled) && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) { + if ((!ImageContext.RelocationsStripped) && (Private->PeiMemoryInstalled) && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) { ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN) AllocatePages (EFI_SIZE_TO_PAGES ((UINT32) ImageContext.ImageSize)); ASSERT (ImageContext.ImageAddress != 0);