]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Memory/MemoryServices.c
1) If PeiLoadImage fails, the section extraction PPI or Decompress PPI may not be...
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Memory / MemoryServices.c
index 728b963afafd2e9bbd6fa4ff1bdb3edf720069f7..e2b2ccc30f273a2a997705cb3c7862a476380643 100644 (file)
@@ -114,6 +114,8 @@ Returns:
   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
@@ -137,8 +139,8 @@ Returns:
 \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
@@ -155,7 +157,13 @@ Returns:
   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
@@ -223,6 +231,7 @@ Returns:
     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