summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei
diff options
context:
space:
mode:
authorjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-26 07:43:00 +0000
committerjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-26 07:43:00 +0000
commit4fb720763c32fa4a65c5ee78666553fe458ce212 (patch)
treec7da257192997b75a59aa7718e078178b5db3398 /MdeModulePkg/Core/Pei
parent79a42176c61058b010f9baa361943014fc370ced (diff)
downloadedk2-4fb720763c32fa4a65c5ee78666553fe458ce212.zip
edk2-4fb720763c32fa4a65c5ee78666553fe458ce212.tar.gz
edk2-4fb720763c32fa4a65c5ee78666553fe458ce212.tar.bz2
Fix a bug in "Load module At fixed address" to enable it on IPF platform
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10106 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 08c4500..ddd149b 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -801,6 +801,12 @@ PeiDispatcher (
// Loading Module at Fixed Address is enabled
//
PeiLoadFixAddressHook(Private);
+ //
+ // if Loading Module at Fixed Address is enabled, This is the first invoke to page
+ // allocation for Pei Code range. This memory range should be reserved for loading PEIMs
+ //
+ LoadFixPeiCodeBegin = AllocatePages((UINTN)PcdGet32(PcdLoadFixAddressPeiCodePageNumber));
+ DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PeiCodeBegin = 0x%lX, PeiCodeTop= 0x%lX\n", (UINT64)LoadFixPeiCodeBegin, (UINT64)((UINTN)LoadFixPeiCodeBegin + PcdGet32(PcdLoadFixAddressPeiCodePageNumber) * EFI_PAGE_SIZE)));
}
//
@@ -942,14 +948,8 @@ PeiDispatcher (
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
//
- // if Loading Module at Fixed Address is enabled, This is the first invoke to page
- // allocation for Pei Core segment. This memory segment should be reserved for loading PEIM
- //
- LoadFixPeiCodeBegin = AllocatePages((UINTN)PcdGet32(PcdLoadFixAddressPeiCodePageNumber));
- DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PeiCodeBegin = 0x%lx, PeiCodeTop= 0xl%x\n", (UINTN)LoadFixPeiCodeBegin, ((UINTN)LoadFixPeiCodeBegin) + PcdGet32(PcdLoadFixAddressPeiCodePageNumber) * EFI_PAGE_SIZE));
- //
// if Loading Module at Fixed Address is enabled, allocate the PEI code memory range usage bit map array.
- // Every bit in the array indicate the status of the corresponding memory page, available or not
+ // Every bit in the array indicate the status of the corresponding memory page available or not
//
PrivateInMem->PeiCodeMemoryRangeUsageBitMap = AllocateZeroPool (((PcdGet32(PcdLoadFixAddressPeiCodePageNumber)>>6) + 1)*sizeof(UINT64));
}