- if (((UINTN)PpiPointer->Ppi->Guid < (UINTN)OldHandOffHob->EfiFreeMemoryBottom) && \r
- ((UINTN)PpiPointer->Ppi->Guid >= (UINTN)OldHandOffHob)) {\r
- //\r
- // Convert the pointer to the GUID in the PPI or NOTIFY descriptor\r
- // from the old HOB heap to the relocated HOB heap.\r
- //\r
- PpiPointer->Ppi->Guid = (VOID *) ((UINTN)PpiPointer->Ppi->Guid + Fixup);\r
- }\r
-\r
- //\r
- // Assume that no code is located in the temporary memory, so the pointer to\r
- // the notification function in the NOTIFY descriptor needs not be converted.\r
- //\r
- if (Index < PrivateData->PpiData.PpiListEnd &&\r
- (UINTN)PpiPointer->Ppi->Ppi < (UINTN)OldHandOffHob->EfiFreeMemoryBottom &&\r
- (UINTN)PpiPointer->Ppi->Ppi >= (UINTN)OldHandOffHob) {\r
- //\r
- // Convert the pointer to the PPI interface structure in the PPI descriptor\r
- // from the old HOB heap to the relocated HOB heap.\r
- //\r
- PpiPointer->Ppi->Ppi = (VOID *) ((UINTN)PpiPointer->Ppi->Ppi+ Fixup); \r
+ //\r
+ // Convert PPI pointer in old Stack\r
+ //\r
+ ConvertSinglePpiPointer (\r
+ &PrivateData->PpiData.PpiListPtrs[Index],\r
+ (UINTN)SecCoreData->StackBase,\r
+ (UINTN)SecCoreData->StackBase + SecCoreData->StackSize,\r
+ PrivateData->StackOffset,\r
+ PrivateData->StackOffsetPositive\r
+ );\r
+ \r
+ //\r
+ // Convert PPI pointer in old TempRam Hole\r
+ //\r
+ for (IndexHole = 0; IndexHole < HOLE_MAX_NUMBER; IndexHole ++) {\r
+ if (PrivateData->HoleData[IndexHole].Size == 0) {\r
+ continue;\r