On Fri, Jan 27, 2023 at 11:30:46AM +0000, Xu, Min M wrote: > On January 27, 2023 3:54 PM, Gerd Hoffmann wrote: > > On Fri, Jan 27, 2023 at 08:11:00AM +0800, Min Xu wrote: > > > From: Min M Xu <min.m...@intel.com> > > > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > > > > What is the reason to create a new TdxHelperLib btw.? > > Are there any problems with the code being in PlatformInitLib? > > > When tdx-measurement is being enabled in OvmfPkgX64, we find below functions > are needed. > - ProcessTdHob > - MeasureTdHob > - MeasureCfvImage > - BuildGuidHobForTdxMeasurement > > The first one was implemented in PlatformInitLib. The others were implemented > in PeilessStartupLib. These 4 functions should be implemented in one lib so > that they could be called in both OvmfPkgX64 and IntelTdxX64. > So there are below 2 options > 1) Implement all these 4 functions in PlatformInitLib > 2) Implement all these 4 functions in a new TdxHelperLib > > We choose option-2 (a new TdxHelperLib). > 1. TdxHelperLib contains all the tdx specific helper functions as the lib > name indicates. > 2. We can avoid PlatformInitLib getting bigger and bigger by adding more and > more functions. (these functions can be implemented in a separate lib) > 3. Furthermore, PlatformTdxPublishRamRegions in PlatformInitLib can be moved > to TdxHelperLib as well (we will submit a separate patch-set later). So that > we can have a general-purpose PlatformInitLib. > > Based on above consideration, we create a new TdxHelperLib.
Ok, makes sense to me. thanks, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#99154): https://edk2.groups.io/g/devel/message/99154 Mute This Topic: https://groups.io/mt/96556337/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-