\r
/**\r
\r
- Migrate PPI Pointers from the temporary memory stack to PEI installed memory.\r
+ Migrate PPI Pointers from the temporary memory to PEI installed memory.\r
\r
@param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size \r
and location of temporary RAM, the stack location and the BFV location.\r
\r
for (Index = 0; Index < PcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {\r
if (Index < PrivateData->PpiData.PpiListEnd || Index > PrivateData->PpiData.NotifyListEnd) {\r
+ if (PrivateData->MemoryPages.Size != 0) {\r
+ //\r
+ // Convert PPI pointer in old memory pages\r
+ // It needs to be done before Convert PPI pointer in old Heap\r
+ //\r
+ ConvertSinglePpiPointer (\r
+ &PrivateData->PpiData.PpiListPtrs[Index],\r
+ (UINTN)PrivateData->MemoryPages.Base,\r
+ (UINTN)PrivateData->MemoryPages.Base + PrivateData->MemoryPages.Size,\r
+ PrivateData->MemoryPages.Offset,\r
+ PrivateData->MemoryPages.OffsetPositive\r
+ );\r
+ }\r
+\r
//\r
// Convert PPI pointer in old Heap\r
//\r