summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-29 03:28:03 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-29 03:28:03 +0000
commit4bf952d181b1c8db4b4b021795abc1680685f7fd (patch)
tree61268e84fe5c6af5b52732cd5ec60a7e231ebe81
parentebc5f59da441a868889c9e32ef1e9229d88459ed (diff)
downloadedk2-4bf952d181b1c8db4b4b021795abc1680685f7fd.zip
edk2-4bf952d181b1c8db4b4b021795abc1680685f7fd.tar.gz
edk2-4bf952d181b1c8db4b4b021795abc1680685f7fd.tar.bz2
Images loaded by the DXE IPL should allocate memory of type EfiBootServicesCode, not EfiBootServicesData
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6283 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index 1b3f04e..2871d21 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);
//