X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPei%2FPpi%2FPpi.c;h=082c37945802f405422d10f0cccd3d3aca87809c;hp=36b8c235b2358bc28fb450cb877c668048c48d55;hb=b2374cecb0767f687ec01220fc1fc7ffb5bc59c7;hpb=9f43484ce98308a9818073114d34deb29751045d diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Ppi.c index 36b8c235b2..082c379458 100644 --- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c +++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c @@ -103,7 +103,7 @@ ConvertSinglePpiPointer ( /** - Migrate PPI Pointers from the temporary memory stack to PEI installed memory. + Migrate PPI Pointers from the temporary memory to PEI installed memory. @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @@ -121,6 +121,20 @@ ConvertPpiPointers ( for (Index = 0; Index < PcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) { if (Index < PrivateData->PpiData.PpiListEnd || Index > PrivateData->PpiData.NotifyListEnd) { + if (PrivateData->MemoryPages.Size != 0) { + // + // Convert PPI pointer in old memory pages + // It needs to be done before Convert PPI pointer in old Heap + // + ConvertSinglePpiPointer ( + &PrivateData->PpiData.PpiListPtrs[Index], + (UINTN)PrivateData->MemoryPages.Base, + (UINTN)PrivateData->MemoryPages.Base + PrivateData->MemoryPages.Size, + PrivateData->MemoryPages.Offset, + PrivateData->MemoryPages.OffsetPositive + ); + } + // // Convert PPI pointer in old Heap //