* Re: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information [not found] <17A0B71F68A6EB8F.11381@groups.io> @ 2023-12-14 14:15 ` Wang Fan 2023-12-19 6:27 ` 回复: " gaoliming via groups.io 0 siblings, 1 reply; 5+ messages in thread From: Wang Fan @ 2023-12-14 14:15 UTC (permalink / raw) To: Gao, Liming, Kumar, Rahul R Cc: Wang, Fan, Wang, Jian J, Ni, Ray, Kinney, Michael D, Jiang, Guomin, devel@edk2.groups.io Hi Liming and Kumar Could you help review this v5 patch: MdeModulePkg: Support customized FV Migration Information: https://github.com/fanwang2intel/edk2/commit/83c55a73107bfb13df1d8b522e0ea1d18ef3d86b SecurityPkg: Support customized FV Migration Information https://github.com/fanwang2intel/edk2/commit/6f7e955f1d63a875f69ebc084885e76610acc722 v5: - Remove RemoveFvHobsInTemporaryMemory() since no consumer will call this API now. - Separate patches to different packages. Best Regards Fan -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wang Fan Sent: Thursday, December 14, 2023 9:53 PM To: devel@edk2.groups.io Cc: Wang, Fan <fan.wang@intel.com> Subject: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information There are use cases which not all FVs need be migrated from TempRam to permanent memory before TempRam tears down. This new guid is introduced to avoid unnecessary FV migration to improve boot performance. Platform can publish MigrationInfo hob with this guid to customize FV migration info, and PeiCore will only migrate FVs indicated by this Hob info. This is a backwards compatible change, PeiCore will check MigrationInfo hob before migration. If MigrationInfo hobs exists, only migrate FVs recorded by hobs. If MigrationInfo hobs not exists, migrate all FVs to permanent memory. In Tcg driver, when MigratedFvInfo hob is detected, existing code logic is assuming FV raw data is already copied, and raw data base address is also recorded. Due to the new PeiCore change, the platform can publish hob to indicate raw data need be copied or not along with FV migration. Two cases need be considered to skip copy for boot performance: The first case is FV is not expected to be measured in post-mem phase, we should use MeasurementExcludedPpiGuid to skip measurement. The second case is FV raw data has no need to do rebase operation after migration, then measurement should calculate hash directly from FV base address. Fan Wang (2): MdeModulePkg: Support customized FV Migration Information SecurityPkg: Support customized FV Migration Information MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 84 ++++++++++++++----- MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 40 --------- MdeModulePkg/Core/Pei/PeiMain.h | 11 --- MdeModulePkg/Core/Pei/PeiMain.inf | 1 + MdeModulePkg/Include/Guid/MigratedFvInfo.h | 42 +++++++++- MdeModulePkg/MdeModulePkg.dec | 3 +- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 7 +- SecurityPkg/Tcg/TcgPei/TcgPei.c | 7 +- 8 files changed, 116 insertions(+), 79 deletions(-) -- 2.29.2.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112536): https://edk2.groups.io/g/devel/message/112536 Mute This Topic: https://groups.io/mt/103169821/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information 2023-12-14 14:15 ` [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information Wang Fan @ 2023-12-19 6:27 ` gaoliming via groups.io 2023-12-20 8:16 ` Ni, Ray 0 siblings, 1 reply; 5+ messages in thread From: gaoliming via groups.io @ 2023-12-19 6:27 UTC (permalink / raw) To: 'Wang, Fan', 'Kumar, Rahul R' Cc: 'Wang, Jian J', 'Ni, Ray', 'Kinney, Michael D', 'Jiang, Guomin', devel Fan: This version patch is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> for this patch set. Thanks Liming > -----邮件原件----- > 发件人: Wang, Fan <fan.wang@intel.com> > 发送时间: 2023年12月14日 22:15 > 收件人: Gao, Liming <gaoliming@byosoft.com.cn>; Kumar, Rahul R > <rahul.r.kumar@intel.com> > 抄送: Wang, Fan <fan.wang@intel.com>; Wang, Jian J > <jian.j.wang@intel.com>; Ni, Ray <ray.ni@intel.com>; Kinney, Michael D > <michael.d.kinney@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; > devel@edk2.groups.io > 主题: RE: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration > Information > > Hi Liming and Kumar > > Could you help review this v5 patch: > > MdeModulePkg: Support customized FV Migration Information: > https://github.com/fanwang2intel/edk2/commit/83c55a73107bfb13df1d8b5 > 22e0ea1d18ef3d86b > > SecurityPkg: Support customized FV Migration Information > https://github.com/fanwang2intel/edk2/commit/6f7e955f1d63a875f69ebc08 > 4885e76610acc722 > > v5: > - Remove RemoveFvHobsInTemporaryMemory() since no consumer will call > this API now. > - Separate patches to different packages. > > Best Regards > Fan > > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wang Fan > Sent: Thursday, December 14, 2023 9:53 PM > To: devel@edk2.groups.io > Cc: Wang, Fan <fan.wang@intel.com> > Subject: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration > Information > > There are use cases which not all FVs need be migrated from TempRam to > permanent memory before TempRam tears down. This new guid is introduced > to avoid unnecessary FV migration to improve boot performance. Platform can > publish MigrationInfo hob with this guid to customize FV migration info, and > PeiCore will only migrate FVs indicated by this Hob info. > > This is a backwards compatible change, PeiCore will check MigrationInfo hob > before migration. If MigrationInfo hobs exists, only migrate FVs recorded by > hobs. If MigrationInfo hobs not exists, migrate all FVs to permanent memory. > > In Tcg driver, when MigratedFvInfo hob is detected, existing code logic is > assuming FV raw data is already copied, and raw data base address is also > recorded. Due to the new PeiCore change, the platform can publish hob to > indicate raw data need be copied or not along with FV migration. > > Two cases need be considered to skip copy for boot performance: The first > case is FV is not expected to be measured in post-mem phase, we should use > MeasurementExcludedPpiGuid to skip measurement. The second case is FV > raw data has no need to do rebase operation after migration, then > measurement should calculate hash directly from FV base address. > > Fan Wang (2): > MdeModulePkg: Support customized FV Migration Information > SecurityPkg: Support customized FV Migration Information > > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 84 > ++++++++++++++----- > MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 40 --------- > MdeModulePkg/Core/Pei/PeiMain.h | 11 --- > MdeModulePkg/Core/Pei/PeiMain.inf | 1 + > MdeModulePkg/Include/Guid/MigratedFvInfo.h | 42 +++++++++- > MdeModulePkg/MdeModulePkg.dec | 3 +- > SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 7 +- > SecurityPkg/Tcg/TcgPei/TcgPei.c | 7 +- > 8 files changed, 116 insertions(+), 79 deletions(-) > > -- > 2.29.2.windows.2 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112693): https://edk2.groups.io/g/devel/message/112693 Mute This Topic: https://groups.io/mt/103258717/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information 2023-12-19 6:27 ` 回复: " gaoliming via groups.io @ 2023-12-20 8:16 ` Ni, Ray 2023-12-21 7:37 ` Wang Fan 0 siblings, 1 reply; 5+ messages in thread From: Ni, Ray @ 2023-12-20 8:16 UTC (permalink / raw) To: Gao, Liming, Wang, Fan, Kumar, Rahul R Cc: Wang, Jian J, Kinney, Michael D, Jiang, Guomin, devel@edk2.groups.io Reviewed-by: Ray Ni <ray.ni@intel.com> Thanks, Ray > -----Original Message----- > From: gaoliming <gaoliming@byosoft.com.cn> > Sent: Tuesday, December 19, 2023 2:28 PM > To: Wang, Fan <fan.wang@intel.com>; Kumar, Rahul R > <rahul.r.kumar@intel.com> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Ni, Ray <ray.ni@intel.com>; Kinney, > Michael D <michael.d.kinney@intel.com>; Jiang, Guomin > <guomin.jiang@intel.com>; devel@edk2.groups.io > Subject: 回复: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration > Information > > Fan: > This version patch is good to me. Reviewed-by: Liming Gao > <gaoliming@byosoft.com.cn> for this patch set. > > Thanks > Liming > > -----邮件原件----- > > 发件人: Wang, Fan <fan.wang@intel.com> > > 发送时间: 2023年12月14日 22:15 > > 收件人: Gao, Liming <gaoliming@byosoft.com.cn>; Kumar, Rahul R > > <rahul.r.kumar@intel.com> > > 抄送: Wang, Fan <fan.wang@intel.com>; Wang, Jian J > > <jian.j.wang@intel.com>; Ni, Ray <ray.ni@intel.com>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; > > devel@edk2.groups.io > > 主题: RE: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration > > Information > > > > Hi Liming and Kumar > > > > Could you help review this v5 patch: > > > > MdeModulePkg: Support customized FV Migration Information: > > > https://github.com/fanwang2intel/edk2/commit/83c55a73107bfb13df1d8b5 > > 22e0ea1d18ef3d86b > > > > SecurityPkg: Support customized FV Migration Information > > > https://github.com/fanwang2intel/edk2/commit/6f7e955f1d63a875f69ebc08 > > 4885e76610acc722 > > > > v5: > > - Remove RemoveFvHobsInTemporaryMemory() since no consumer will call > > this API now. > > - Separate patches to different packages. > > > > Best Regards > > Fan > > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wang > Fan > > Sent: Thursday, December 14, 2023 9:53 PM > > To: devel@edk2.groups.io > > Cc: Wang, Fan <fan.wang@intel.com> > > Subject: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration > > Information > > > > There are use cases which not all FVs need be migrated from TempRam to > > permanent memory before TempRam tears down. This new guid is > introduced > > to avoid unnecessary FV migration to improve boot performance. Platform > can > > publish MigrationInfo hob with this guid to customize FV migration info, > and > > PeiCore will only migrate FVs indicated by this Hob info. > > > > This is a backwards compatible change, PeiCore will check MigrationInfo > hob > > before migration. If MigrationInfo hobs exists, only migrate FVs recorded > by > > hobs. If MigrationInfo hobs not exists, migrate all FVs to permanent > memory. > > > > In Tcg driver, when MigratedFvInfo hob is detected, existing code logic is > > assuming FV raw data is already copied, and raw data base address is also > > recorded. Due to the new PeiCore change, the platform can publish hob to > > indicate raw data need be copied or not along with FV migration. > > > > Two cases need be considered to skip copy for boot performance: The first > > case is FV is not expected to be measured in post-mem phase, we should > use > > MeasurementExcludedPpiGuid to skip measurement. The second case is FV > > raw data has no need to do rebase operation after migration, then > > measurement should calculate hash directly from FV base address. > > > > Fan Wang (2): > > MdeModulePkg: Support customized FV Migration Information > > SecurityPkg: Support customized FV Migration Information > > > > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 84 > > ++++++++++++++----- > > MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 40 --------- > > MdeModulePkg/Core/Pei/PeiMain.h | 11 --- > > MdeModulePkg/Core/Pei/PeiMain.inf | 1 + > > MdeModulePkg/Include/Guid/MigratedFvInfo.h | 42 +++++++++- > > MdeModulePkg/MdeModulePkg.dec | 3 +- > > SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 7 +- > > SecurityPkg/Tcg/TcgPei/TcgPei.c | 7 +- > > 8 files changed, 116 insertions(+), 79 deletions(-) > > > > -- > > 2.29.2.windows.2 > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112751): https://edk2.groups.io/g/devel/message/112751 Mute This Topic: https://groups.io/mt/103277888/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information 2023-12-20 8:16 ` Ni, Ray @ 2023-12-21 7:37 ` Wang Fan 0 siblings, 0 replies; 5+ messages in thread From: Wang Fan @ 2023-12-21 7:37 UTC (permalink / raw) To: Ni, Ray, Gao, Liming, Kumar, Rahul R Cc: Wang, Jian J, Kinney, Michael D, Jiang, Guomin, devel@edk2.groups.io Hi Liming The V5 patches have past test. Could you help merge these two patches? Or I need find Rahul to merge the one in SecurityPkg? https://github.com/tianocore/edk2/pull/5180 https://github.com/tianocore/edk2/pull/5181 They are totally independent and merge MdeModulePkg patch only will not impact any existing code. Best Regards Fan -----Original Message----- From: Ni, Ray <ray.ni@intel.com> Sent: Wednesday, December 20, 2023 4:16 PM To: Gao, Liming <gaoliming@byosoft.com.cn>; Wang, Fan <fan.wang@intel.com>; Kumar, Rahul R <rahul.r.kumar@intel.com> Cc: Wang, Jian J <jian.j.wang@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; devel@edk2.groups.io Subject: RE: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information Reviewed-by: Ray Ni <ray.ni@intel.com> Thanks, Ray > -----Original Message----- > From: gaoliming <gaoliming@byosoft.com.cn> > Sent: Tuesday, December 19, 2023 2:28 PM > To: Wang, Fan <fan.wang@intel.com>; Kumar, Rahul R > <rahul.r.kumar@intel.com> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Ni, Ray <ray.ni@intel.com>; > Kinney, Michael D <michael.d.kinney@intel.com>; Jiang, Guomin > <guomin.jiang@intel.com>; devel@edk2.groups.io > Subject: 回复: [edk2-devel] [PATCH v5 0/2] Support customized FV > Migration Information > > Fan: > This version patch is good to me. Reviewed-by: Liming Gao > <gaoliming@byosoft.com.cn> for this patch set. > > Thanks > Liming > > -----邮件原件----- > > 发件人: Wang, Fan <fan.wang@intel.com> > > 发送时间: 2023年12月14日 22:15 > > 收件人: Gao, Liming <gaoliming@byosoft.com.cn>; Kumar, Rahul R > > <rahul.r.kumar@intel.com> > > 抄送: Wang, Fan <fan.wang@intel.com>; Wang, Jian J > > <jian.j.wang@intel.com>; Ni, Ray <ray.ni@intel.com>; Kinney, Michael > > D <michael.d.kinney@intel.com>; Jiang, Guomin > > <guomin.jiang@intel.com>; devel@edk2.groups.io > > 主题: RE: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration > > Information > > > > Hi Liming and Kumar > > > > Could you help review this v5 patch: > > > > MdeModulePkg: Support customized FV Migration Information: > > > https://github.com/fanwang2intel/edk2/commit/83c55a73107bfb13df1d8b5 > > 22e0ea1d18ef3d86b > > > > SecurityPkg: Support customized FV Migration Information > > > https://github.com/fanwang2intel/edk2/commit/6f7e955f1d63a875f69ebc08 > > 4885e76610acc722 > > > > v5: > > - Remove RemoveFvHobsInTemporaryMemory() since no consumer will call > > this API now. > > - Separate patches to different packages. > > > > Best Regards > > Fan > > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wang > Fan > > Sent: Thursday, December 14, 2023 9:53 PM > > To: devel@edk2.groups.io > > Cc: Wang, Fan <fan.wang@intel.com> > > Subject: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration > > Information > > > > There are use cases which not all FVs need be migrated from TempRam > > to permanent memory before TempRam tears down. This new guid is > introduced > > to avoid unnecessary FV migration to improve boot performance. > > Platform > can > > publish MigrationInfo hob with this guid to customize FV migration > > info, > and > > PeiCore will only migrate FVs indicated by this Hob info. > > > > This is a backwards compatible change, PeiCore will check > > MigrationInfo > hob > > before migration. If MigrationInfo hobs exists, only migrate FVs > > recorded > by > > hobs. If MigrationInfo hobs not exists, migrate all FVs to permanent > memory. > > > > In Tcg driver, when MigratedFvInfo hob is detected, existing code > > logic is assuming FV raw data is already copied, and raw data base > > address is also recorded. Due to the new PeiCore change, the > > platform can publish hob to indicate raw data need be copied or not along with FV migration. > > > > Two cases need be considered to skip copy for boot performance: The > > first case is FV is not expected to be measured in post-mem phase, > > we should > use > > MeasurementExcludedPpiGuid to skip measurement. The second case is > > FV raw data has no need to do rebase operation after migration, then > > measurement should calculate hash directly from FV base address. > > > > Fan Wang (2): > > MdeModulePkg: Support customized FV Migration Information > > SecurityPkg: Support customized FV Migration Information > > > > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 84 > > ++++++++++++++----- > > MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 40 --------- > > MdeModulePkg/Core/Pei/PeiMain.h | 11 --- > > MdeModulePkg/Core/Pei/PeiMain.inf | 1 + > > MdeModulePkg/Include/Guid/MigratedFvInfo.h | 42 +++++++++- > > MdeModulePkg/MdeModulePkg.dec | 3 +- > > SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 7 +- > > SecurityPkg/Tcg/TcgPei/TcgPei.c | 7 +- > > 8 files changed, 116 insertions(+), 79 deletions(-) > > > > -- > > 2.29.2.windows.2 > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112804): https://edk2.groups.io/g/devel/message/112804 Mute This Topic: https://groups.io/mt/103277888/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 5+ messages in thread
* [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information @ 2023-12-14 13:53 Wang Fan 0 siblings, 0 replies; 5+ messages in thread From: Wang Fan @ 2023-12-14 13:53 UTC (permalink / raw) To: devel; +Cc: Fan Wang There are use cases which not all FVs need be migrated from TempRam to permanent memory before TempRam tears down. This new guid is introduced to avoid unnecessary FV migration to improve boot performance. Platform can publish MigrationInfo hob with this guid to customize FV migration info, and PeiCore will only migrate FVs indicated by this Hob info. This is a backwards compatible change, PeiCore will check MigrationInfo hob before migration. If MigrationInfo hobs exists, only migrate FVs recorded by hobs. If MigrationInfo hobs not exists, migrate all FVs to permanent memory. In Tcg driver, when MigratedFvInfo hob is detected, existing code logic is assuming FV raw data is already copied, and raw data base address is also recorded. Due to the new PeiCore change, the platform can publish hob to indicate raw data need be copied or not along with FV migration. Two cases need be considered to skip copy for boot performance: The first case is FV is not expected to be measured in post-mem phase, we should use MeasurementExcludedPpiGuid to skip measurement. The second case is FV raw data has no need to do rebase operation after migration, then measurement should calculate hash directly from FV base address. Fan Wang (2): MdeModulePkg: Support customized FV Migration Information SecurityPkg: Support customized FV Migration Information MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 84 ++++++++++++++----- MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 40 --------- MdeModulePkg/Core/Pei/PeiMain.h | 11 --- MdeModulePkg/Core/Pei/PeiMain.inf | 1 + MdeModulePkg/Include/Guid/MigratedFvInfo.h | 42 +++++++++- MdeModulePkg/MdeModulePkg.dec | 3 +- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 7 +- SecurityPkg/Tcg/TcgPei/TcgPei.c | 7 +- 8 files changed, 116 insertions(+), 79 deletions(-) -- 2.29.2.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112530): https://edk2.groups.io/g/devel/message/112530 Mute This Topic: https://groups.io/mt/103169821/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-21 7:38 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <17A0B71F68A6EB8F.11381@groups.io> 2023-12-14 14:15 ` [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information Wang Fan 2023-12-19 6:27 ` 回复: " gaoliming via groups.io 2023-12-20 8:16 ` Ni, Ray 2023-12-21 7:37 ` Wang Fan 2023-12-14 13:53 Wang Fan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox