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