mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
79a42176c6
commit
4fb720763c
|
@ -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)));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -941,15 +947,9 @@ PeiDispatcher (
|
|||
PrivateInMem->PeimDispatcherReenter = TRUE;
|
||||
|
||||
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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue