On 07/08/20 10:10, Guomin Jiang wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614 > > When we allocate pool to save the rebased PEIMs, the address will change > randomly, therefore the hash will change and result PCR0 change as well. > To avoid this, we save the raw PEIMs and use it to calculate hash. > > The MigratedFvInfo HOB will never produce when > PcdMigrateTemporaryRamFirmwareVolumes is FALSE, because the PCD control > the total feature.
[...] > @@ -1278,7 +1294,19 @@ EvacuateTempRam ( > (UINTN) MigratedFvHeader > )); > > + // > + // Copy the context to the rebased pages and raw pages, and create hob > to save the > + // information. the MigratedFvInfo HOB will never produce when > + // PcdMigrateTemporaryRamFirmwareVolumes is FALSE, because the PCD > control the > + // feature. > + // > CopyMem (MigratedFvHeader, FvHeader, (UINTN) FvHeader->FvLength); > + CopyMem (RawDataFvHeader, MigratedFvHeader, (UINTN) > FvHeader->FvLength); > + MigratedFvInfo.FvOrgBase = (UINT32) (UINTN) FvHeader; > + MigratedFvInfo.FvNewBase = (UINT32) (UINTN) MigratedFvHeader; > + MigratedFvInfo.FvDataBase = (UINT32) (UINTN) RawDataFvHeader; > + MigratedFvInfo.FvLength = (UINT32) (UINTN) FvHeader->FvLength; > + BuildGuidDataHob (&gEdkiiMigratedFvInfoGuid, &MigratedFvInfo, sizeof > (MigratedFvInfo)); > > // > // Migrate any children for this FV now > Thank you for addressing my requests! This patch should definitely be reviewed by PeiCore experts, but from my perspective, I'm happy with the updates. Acked-by: Laszlo Ersek <[email protected]> Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#62254): https://edk2.groups.io/g/devel/message/62254 Mute This Topic: https://groups.io/mt/75372253/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
