summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-15 09:48:37 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-15 09:48:37 +0000
commitbfd4a3f1b4d04473687e364a513d70989c8d5b69 (patch)
tree90bff8cd00489144ec174202b2c1b54b6f7d98f0 /MdeModulePkg
parentaa75dfeccdd9c88bd64431b1290faf7574854337 (diff)
downloadedk2-platforms-bfd4a3f1b4d04473687e364a513d70989c8d5b69.tar.xz
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Pei/Image/Image.c2
1 files changed, 1 insertions, 1 deletions
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);