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 <ardb+tianoc...@kernel.org> > Cc: Jordan Justen <jordan.l.jus...@intel.com> > Cc: Brijesh Singh <brijesh.si...@amd.com> > Cc: Erdem Aktas <erdemak...@google.com> > Cc: James Bottomley <j...@linux.ibm.com> > Cc: Jiewen Yao <jiewen....@intel.com> > Cc: Tom Lendacky <thomas.lenda...@amd.com> > Cc: Gerd Hoffmann <kra...@redhat.com> > Signed-off-by: Min Xu <min.m...@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- 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: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-