On Sat, Mar 12, 2022 at 09:53:41AM +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/XenPlatformPei > - OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf > These PlatformPeis can share many common codes, such as > Cmos / Hob / Memory / Platform related functions. This commit > (and its following several patches) are to create a PlatformInitLib > which wraps the common code called in above PlatformPeis. > > In this initial version of PlatformInitLib, below Cmos related functions > are introduced: > - PlatformCmosRead8 > - PlatformCmosWrite8 > - PlatformDebugDumpCmos > > They correspond to the functions in OvmfPkg/PlatformPei: > - CmosRead8 > - CmosWrite8 > - DebugDumpCmos > > Considering this PlatformInitLib will be used in SEC phase, global > variables and dynamic PCDs are avoided. We use PlatformInfoHob > to exchange information between functions. > > EFI_HOB_PLATFORM_INFO is the data struct which contains the platform > information, such as HostBridgeDevId, BootMode, S3Supported, > SmmSmramRequire, etc. > > After PlatformInitLib is created, OvmfPkg/PlatformPei is refactored > with this library. > > Cc: Ard Biesheuvel <[email protected]> > Cc: Jordan Justen <[email protected]> > Cc: Brijesh Singh <[email protected]> > Cc: Erdem Aktas <[email protected]> > Cc: James Bottomley <[email protected]> > Cc: Jiewen Yao <[email protected]> > Cc: Tom Lendacky <[email protected]> > Cc: Gerd Hoffmann <[email protected]> > Signed-off-by: Min Xu <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87568): https://edk2.groups.io/g/devel/message/87568 Mute This Topic: https://groups.io/mt/89725408/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
