audk/OvmfPkg/Include/Library
Min Xu e23f8f52fd OvmfPkg: Update PlatformInitLib for Tdx guest
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429

There are below changes in PlatformInitLib for Tdx guest:

1. Publish ram regions
In Tdx guest, the system memory is passed in TdHob by host VMM. So
the major task of PlatformTdxPublishRamRegions is to walk thru the
TdHob list and transfer the ResourceDescriptorHob and MemoryAllocationHob
to the hobs in DXE phase.

2. Build MemoryAllocationHob for Tdx Mailbox and Ovmf work area.

3. Update of PlatformAddressWidthInitialization. The physical
address width that Tdx guest supports is either 48 or 52.

4. Update of PlatformMemMapInitialization.
0xA0000 - 0xFFFFF is VGA bios region.  Platform initialization marks the
region as MMIO region. Dxe code maps MMIO region as IO region.
As TDX guest, MMIO region is maps as shared.  However VGA BIOS doesn't need
to be shared.  Guest TDX Linux maps VGA BIOS as private and accesses for
BIOS and stuck on repeating EPT violation.  VGA BIOS (more generally ROM
region) should be private.  Skip marking VGA BIOA region [0xa000, 0xfffff]
as MMIO in HOB.

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: Update PlatformInitLib for Tdx guest 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