On Tue, Mar 08, 2022 at 10:36:01AM +0800, Min Xu wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3863 > > There are 3 variants of PlatformPei in OvmfPkg: > - OvmfPkg/PlatformPei > - OvmfPkg/Bhyve/PlatformPei > - OvmfPkg/XenPlatformPei > > A lot of common code can be shared in above PlatformPeis. Further more, > with the upstreaming of TDVF (Pei-less boot mode), a library which > wraps the common functions is needed. PlatformInitLib is designed > to meet this requirement. > > PlatformInitLib is designed to run in both PEI and SEC. So global > variables and dynamic PCDs are avoided. > > As the first stage, OvmfPkg/PlatformPei will be refactored with > PlatformInitLib. In the future we will refactor other PlatformPeis > with this lib as well. > > Patch 1 - 2: > Create initial version of PlatformInitLib and move Cmos / Hob functions > to the lib. > > Patch 3: > Move global variables in PlatformPei to PlatformInfoHob. Changes are > all in OvmfPkg/PlatformPei. > > Patch 4 - 12: > These patches restruct the functions which set PCDs into two, one for > PlatformInitLib, one for PlatformPei. > > Patch 13 - 14: > Pure move from PlatformPei to PlatformInitLib. > > Code at: https://github.com/mxu9/edk2/tree/platform-init-lib-v1
Looks all sane to me, also survived a smoke test with pc + q35 + microvm. Acked-by: Gerd Hoffmann <kra...@redhat.com> take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87390): https://edk2.groups.io/g/devel/message/87390 Mute This Topic: https://groups.io/mt/89629671/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-