On January 26, 2022 9:04 PM, Gerd Hoffmann wrote: > On Sun, Jan 23, 2022 at 09:36:53AM +0800, Min Xu wrote: > > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 > > > > There are multi-variants of PlatformPei in OvmfPkg, for example, > > - OvmfPkg/PlatformPei > > - OvmfPkg/Bhyve/PlatformPei > > - OvmfPkg/XenPlatformPei > > These PlatformPeis share a lot of duplicated codes. It makes > > difficulty for reviwers and maintainers. > > > > The goal of PlatformInitLib is to wrap the common functions in these > > PlatformPei. As the first stage, below functions are included: > > - Cmos functions > > - System memory related functions > > - Platform initialization functions > > - Hob functions > > > > PlatformInitLib is designed for SEC and PEIM. So global variables > > cannot be used to pass information between different functions. > > Dynamic PCDs are not available either. > > Can we please reorganize and split this and the next patch into smaller, > review-able pieces instead of two 50k monster patches? Possibly it makes > sense to split this into a separate series. > > Specifically changing code and moving code should be separate patches. > > I'd suggest to struct the patch series like this: > > (1) create an empty PlatformInitLib > (2) apply code changes needed to make the code usable in sec > phase (one patch per change). > (3) move over the code (without modifications) to PlatformInitLib. Thanks for the suggestion. I will create a separate patch series which including PlatformInitLib and the refactoring of OvmfPkg/PlatformPei.
Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86137): https://edk2.groups.io/g/devel/message/86137 Mute This Topic: https://groups.io/mt/88617547/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-