diff options
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 1b3f04e7bd..2871d210ba 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -360,7 +360,12 @@ PeiLoadFile ( //
// Allocate Memory for the image
//
- ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN) AllocatePages (EFI_SIZE_TO_PAGES ((UINT32) ImageContext.ImageSize));
+ Status = PeiServicesAllocatePages (
+ EfiBootServicesCode,
+ EFI_SIZE_TO_PAGES ((UINT32) ImageContext.ImageSize),
+ &ImageContext.ImageAddress
+ );
+ ASSERT_EFI_ERROR (Status);
ASSERT (ImageContext.ImageAddress != 0);
//
|