audk/OvmfPkg/Include/Library
Min Xu 57bcfc3b06 OvmfPkg: Create initial version of PlatformInitLib
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+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
2022-04-02 08:15:12 +00:00
..
BhyveFwCtlLib.h OvmfPkg: Improve style and formatting in BhyveFwCtlLib.h 2020-11-30 17:49:39 +00:00
BlobVerifierLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LoadLinuxLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MemEncryptSevLib.h OvmfPkg/MemEncryptSevLib: add support to validate system RAM 2021-12-09 06:28:10 +00:00
NvVarsFileLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciCapLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciCapPciIoLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciCapPciSegmentLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciHostBridgeUtilityLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformBmPrintScLib.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
PlatformFvbLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformInitLib.h OvmfPkg: Create initial version of PlatformInitLib 2022-04-02 08:15:12 +00:00
QemuBootOrderLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuFwCfgLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuFwCfgS3Lib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuFwCfgSimpleParserLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuLoadImageLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SerializeVariablesLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TdxMailboxLib.h OvmfPkg: Add TdxMailboxLib 2022-04-02 08:15:12 +00:00
VirtioLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VirtioMmioDeviceLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenHypercallLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenIoMmioLib.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenPlatformLib.h OvmfPkg/Library/XenPlatformLib: New library 2019-08-21 18:03:49 +02:00