if (OldCoreData->CurrentFvFileHandles != NULL) {\r
OldCoreData->CurrentFvFileHandles = (EFI_PEI_FILE_HANDLE *) ((UINT8 *) OldCoreData->CurrentFvFileHandles + OldCoreData->HeapOffset);\r
}\r
- OldCoreData->PpiData.PpiListPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.PpiListPtrs + OldCoreData->HeapOffset);\r
+ if (OldCoreData->PpiData.PpiList.PpiPtrs != NULL) {\r
+ OldCoreData->PpiData.PpiList.PpiPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.PpiList.PpiPtrs + OldCoreData->HeapOffset);\r
+ }\r
+ if (OldCoreData->PpiData.CallbackNotifyList.NotifyPtrs != NULL) {\r
+ OldCoreData->PpiData.CallbackNotifyList.NotifyPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.CallbackNotifyList.NotifyPtrs + OldCoreData->HeapOffset);\r
+ }\r
+ if (OldCoreData->PpiData.DispatchNotifyList.NotifyPtrs != NULL) {\r
+ OldCoreData->PpiData.DispatchNotifyList.NotifyPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.DispatchNotifyList.NotifyPtrs + OldCoreData->HeapOffset);\r
+ }\r
OldCoreData->Fv = (PEI_CORE_FV_HANDLE *) ((UINT8 *) OldCoreData->Fv + OldCoreData->HeapOffset);\r
for (Index = 0; Index < OldCoreData->FvCount; Index ++) {\r
if (OldCoreData->Fv[Index].PeimState != NULL) {\r
if (OldCoreData->CurrentFvFileHandles != NULL) {\r
OldCoreData->CurrentFvFileHandles = (EFI_PEI_FILE_HANDLE *) ((UINT8 *) OldCoreData->CurrentFvFileHandles - OldCoreData->HeapOffset);\r
}\r
- OldCoreData->PpiData.PpiListPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.PpiListPtrs - OldCoreData->HeapOffset);\r
+ if (OldCoreData->PpiData.PpiList.PpiPtrs != NULL) {\r
+ OldCoreData->PpiData.PpiList.PpiPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.PpiList.PpiPtrs - OldCoreData->HeapOffset);\r
+ }\r
+ if (OldCoreData->PpiData.CallbackNotifyList.NotifyPtrs != NULL) {\r
+ OldCoreData->PpiData.CallbackNotifyList.NotifyPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.CallbackNotifyList.NotifyPtrs - OldCoreData->HeapOffset);\r
+ }\r
+ if (OldCoreData->PpiData.DispatchNotifyList.NotifyPtrs != NULL) {\r
+ OldCoreData->PpiData.DispatchNotifyList.NotifyPtrs = (PEI_PPI_LIST_POINTERS *) ((UINT8 *) OldCoreData->PpiData.DispatchNotifyList.NotifyPtrs - OldCoreData->HeapOffset);\r
+ }\r
OldCoreData->Fv = (PEI_CORE_FV_HANDLE *) ((UINT8 *) OldCoreData->Fv - OldCoreData->HeapOffset);\r
for (Index = 0; Index < OldCoreData->FvCount; Index ++) {\r
if (OldCoreData->Fv[Index].PeimState != NULL) {\r
// Initialize PEI Core Services\r
//\r
InitializeMemoryServices (&PrivateData, SecCoreData, OldCoreData);\r
- if (OldCoreData == NULL) {\r
- //\r
- // Initialize PEI Core Private Data Buffer\r
- //\r
- PrivateData.PpiData.PpiListPtrs = AllocateZeroPool (sizeof (PEI_PPI_LIST_POINTERS) * PcdGet32 (PcdPeiCoreMaxPpiSupported));\r
- ASSERT (PrivateData.PpiData.PpiListPtrs != NULL);\r
- }\r
- InitializePpiServices (&PrivateData, OldCoreData);\r
\r
//\r
// Update performance measurements\r
//\r
// Process the Notify list and dispatch any notifies for the Memory Discovered PPI\r
//\r
- ProcessNotifyList (&PrivateData);\r
+ ProcessDispatchNotifyList (&PrivateData);\r
\r
PERF_INMODULE_END ("DisMem");\r
}\r