]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Images loaded by the DXE IPL should allocate memory of type EfiBootServicesCode,...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 29 Oct 2008 03:28:03 +0000 (03:28 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 29 Oct 2008 03:28:03 +0000 (03:28 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6283 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/DxeIplPeim/DxeLoad.c

index 1b3f04e7bd2839942699b81ba9b1a44612c09505..2871d210badd8b608e7adaaa1dcd90fd9bedcb2b 100644 (file)
@@ -360,7 +360,12 @@ PeiLoadFile (
   //\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