1) If PeiLoadImage fails, the section extraction PPI or Decompress PPI may not be ready, we flag that more Peims need to be dispatched.
2) Set the stack to be cacheable before the stack switch occurs so that IPF recovery path will be run from cacheble memory for code, data and stack. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4288 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -114,6 +114,8 @@ Returns:
|
||||
UINT64 PeiStackSize;
|
||||
UINT64 EfiFreeMemorySize;
|
||||
EFI_PHYSICAL_ADDRESS PhysicalAddressOfOldHob;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "PeiInstallPeiMemory MemoryBegin 0x%LX, MemoryLength 0x%LX\n", MemoryBegin, MemoryLength));
|
||||
|
||||
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
|
||||
|
||||
@@ -137,8 +139,8 @@ Returns:
|
||||
|
||||
EfiFreeMemorySize = OldHandOffHob->EfiFreeMemoryBottom - PhysicalAddressOfOldHob;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "HOBLIST address before memory init = 0x%08x\n", OldHandOffHob));
|
||||
DEBUG ((EFI_D_INFO, "HOBLIST address after memory init = 0x%08x\n", NewHandOffHob));
|
||||
DEBUG ((EFI_D_INFO, "HOBLIST address before memory init = 0x%p\n", OldHandOffHob));
|
||||
DEBUG ((EFI_D_INFO, "HOBLIST address after memory init = 0x%p\n", NewHandOffHob));
|
||||
|
||||
CopyMem (
|
||||
NewHandOffHob,
|
||||
@@ -155,7 +157,13 @@ Returns:
|
||||
NewHandOffHob->EfiEndOfHobList = (UINTN)NewHandOffHob +
|
||||
(OldHandOffHob->EfiEndOfHobList -
|
||||
PhysicalAddressOfOldHob);
|
||||
|
||||
|
||||
//
|
||||
// For IPF in CAR mode the real memory access is uncached,in InstallPeiMemory()
|
||||
// the 63-bit of address is set to 1.
|
||||
//
|
||||
SWITCH_TO_CACHE_MODE (PrivateData);
|
||||
|
||||
ConvertPpiPointers (PeiServices, OldHandOffHob, NewHandOffHob);
|
||||
|
||||
BuildStackHob (PrivateData->StackBase, PrivateData->StackSize);
|
||||
@@ -223,6 +231,7 @@ Returns:
|
||||
Hob.HandoffInformationTable->EfiFreeMemoryTop -= Offset;
|
||||
}
|
||||
|
||||
ASSERT (Hob.HandoffInformationTable->EfiFreeMemoryTop >= Hob.HandoffInformationTable->EfiFreeMemoryBottom);
|
||||
//
|
||||
// Verify that there is sufficient memory to satisfy the allocation
|
||||
//
|
||||
|
Reference in New Issue
Block a user