git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6283
6f19259b-4bc3-4df7-8a09-
765794883524
//\r
// Allocate Memory for the image\r
//\r
- ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN) AllocatePages (EFI_SIZE_TO_PAGES ((UINT32) ImageContext.ImageSize));\r
+ Status = PeiServicesAllocatePages (\r
+ EfiBootServicesCode, \r
+ EFI_SIZE_TO_PAGES ((UINT32) ImageContext.ImageSize), \r
+ &ImageContext.ImageAddress\r
+ );\r
+ ASSERT_EFI_ERROR (Status);\r
ASSERT (ImageContext.ImageAddress != 0);\r
\r
//\r