diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-29 03:28:03 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-29 03:28:03 +0000 |
commit | 4bf952d181b1c8db4b4b021795abc1680685f7fd (patch) | |
tree | 61268e84fe5c6af5b52732cd5ec60a7e231ebe81 | |
parent | ebc5f59da441a868889c9e32ef1e9229d88459ed (diff) | |
download | edk2-platforms-4bf952d181b1c8db4b4b021795abc1680685f7fd.tar.xz |
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.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);
//
|