On June 27, 2022 4:41 PM, Gerd Hoffmann wrote: > On Mon, Jun 27, 2022 at 08:04:06AM +0000, Min Xu wrote: > > On June 27, 2022 3:02 PM, Gerd Hoffmann wrote: > > > On Sun, Jun 26, 2022 at 11:05:50AM +0800, Min Xu wrote: > > > > From: Min M Xu <min.m...@intel.com> > > > > > > > > TdxValidateCfv validates the integrity of Configuration FV (CFV). > > > > It was implemented in PeilessStartupLib which is included in > IntelTdxX64. > > > > > > > --- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > > > > +++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > > > > > > > +/** > > > > + Check the integrity of CFV data. > > > > + > > > > + @param[in] TdxCfvBase - A pointer to CFV header @param[in] > > > > + TdxCfvSize - CFV data size > > > > + > > > > + @retval TRUE - The CFV data is valid. > > > > + @retval FALSE - The CFV data is invalid. > > > > + > > > > +**/ > > > > +BOOLEAN > > > > +EFIAPI > > > > +TdxValidateCfv ( > > > > + IN UINT8 *TdxCfvBase, > > > > + IN UINT32 TdxCfvSize > > > > + ) > > > > > > Hmm, is there anything tdx-specific in this function? > > > Looks like generic verification of varstore structure to me. > > > > > There is no tdx-specific in this function. I will rename it to something > > more > generic. > > Also move out of IntelTdx.c please. Yes, it will be in Platform.c, together with PlatformInitEmuVariableNvStore and PlatformReserveEmuVariableNvStore. > > Does it make sense to call it right before calling > PlatformInitEmuVariableNvStore()? I think it can be called in PlatformInitEmuVariableNvStore, as it is a pre-check before copy over the content to EmuVariableNvStore.
Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90829): https://edk2.groups.io/g/devel/message/90829 Mute This Topic: https://groups.io/mt/91995188/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-