);\r
PERF_END (0, "PEIM", NULL, 0);\r
\r
+ } else {\r
+ //\r
+ // If PeiLoadImage fails, the section extraction PPI or Decompress PPI may not be ready,\r
+ // we flag that more Peims need to be dispatched.\r
+ //\r
+ PeimNeedingDispatch = TRUE;\r
}\r
\r
//\r
{\r
EFI_HOB_HANDOFF_INFO_TABLE *Phit;\r
\r
- if (CoreData == NULL) {\r
- //\r
- // the first call with CoreData as NULL.\r
- //\r
- return;\r
- }\r
- \r
if ((GetHandOffStatus().r10 & 0xFF) == RecoveryFn) {\r
CoreData->StackBase = CoreData->StackBase & CACHE_MODE_ADDRESS_MASK;\r
CoreData->HobList.Raw = (UINT8 *)((UINTN)CoreData->HobList.Raw & CACHE_MODE_ADDRESS_MASK);\r
UINT64 PeiStackSize;\r
UINT64 EfiFreeMemorySize;\r
EFI_PHYSICAL_ADDRESS PhysicalAddressOfOldHob;\r
+\r
+ DEBUG ((EFI_D_INFO, "PeiInstallPeiMemory MemoryBegin 0x%LX, MemoryLength 0x%LX\n", MemoryBegin, MemoryLength));\r
\r
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
\r
\r
EfiFreeMemorySize = OldHandOffHob->EfiFreeMemoryBottom - PhysicalAddressOfOldHob;\r
\r
- DEBUG ((EFI_D_INFO, "HOBLIST address before memory init = 0x%08x\n", OldHandOffHob));\r
- DEBUG ((EFI_D_INFO, "HOBLIST address after memory init = 0x%08x\n", NewHandOffHob));\r
+ DEBUG ((EFI_D_INFO, "HOBLIST address before memory init = 0x%p\n", OldHandOffHob));\r
+ DEBUG ((EFI_D_INFO, "HOBLIST address after memory init = 0x%p\n", NewHandOffHob));\r
\r
CopyMem (\r
NewHandOffHob,\r
NewHandOffHob->EfiEndOfHobList = (UINTN)NewHandOffHob +\r
(OldHandOffHob->EfiEndOfHobList -\r
PhysicalAddressOfOldHob);\r
-\r
+ \r
+ //\r
+ // For IPF in CAR mode the real memory access is uncached,in InstallPeiMemory()\r
+ // the 63-bit of address is set to 1.\r
+ //\r
+ SWITCH_TO_CACHE_MODE (PrivateData);\r
+ \r
ConvertPpiPointers (PeiServices, OldHandOffHob, NewHandOffHob);\r
\r
BuildStackHob (PrivateData->StackBase, PrivateData->StackSize);\r
Hob.HandoffInformationTable->EfiFreeMemoryTop -= Offset;\r
}\r
\r
+ ASSERT (Hob.HandoffInformationTable->EfiFreeMemoryTop >= Hob.HandoffInformationTable->EfiFreeMemoryBottom);\r
//\r
// Verify that there is sufficient memory to satisfy the allocation\r
//\r
}\r
}\r
\r
- //\r
- // For IPF in CAR mode the real memory access is uncached,in InstallPeiMemory()\r
- // the 63-bit of address is set to 1.\r
- //\r
- SWITCH_TO_CACHE_MODE (OldCoreData);\r
-\r
if (OldCoreData != NULL) {\r
CopyMem (&PrivateData, OldCoreData, sizeof (PEI_CORE_INSTANCE));\r
\r
return EFI_NOT_FOUND;\r
}\r
\r
+\r