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
This commit is contained in:
mdkinney 2008-10-29 03:28:03 +00:00
parent ebc5f59da4
commit 4bf952d181
1 changed files with 6 additions and 1 deletions

View File

@ -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);
//