]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg: Add PeilessStartupLib
authorMin Xu <min.m.xu@intel.com>
Sun, 28 Nov 2021 11:50:51 +0000 (19:50 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 2 Apr 2022 10:09:47 +0000 (10:09 +0000)
commit4fe26784112328fb9dff6fe85f973845d5d7d49e
tree0089aafa7ecbccdd75a4eb9629ca56735d776194
parent75942a52aeff8192b2dd74f69b51391b3db29a95
OvmfPkg: Add PeilessStartupLib

RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429

PeilessStarupLib provides a function (PeilessStartup) which brings
up both Legacy and Tdx guest from SEC phase to DXE phase. PEI phase
is skipped so that the attack surfaces are reduced as much as possible.

PeilessStartup() does below tasks:
1. Contruct the FW hoblist.
   Since PEI is skipped, we must find a memory region which is the
   largest one below 4GB. Then this memory region will be used as the
   firmware hoblist.
2. Initialize the platform.
3. Build various Hobs, such as SecFv Hob, DxeFv Hob, Stack Hob, etc.
4. At last DXE Core is located / loaded and transfer control to it.

Cc: Michael D Kinney <michael.d.kinney@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>
OvmfPkg/Include/Library/PeilessStartupLib.h [new file with mode: 0644]
OvmfPkg/Library/PeilessStartupLib/DxeLoad.c [new file with mode: 0644]
OvmfPkg/Library/PeilessStartupLib/Hob.c [new file with mode: 0644]
OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c [new file with mode: 0644]
OvmfPkg/Library/PeilessStartupLib/PeilessStartupInternal.h [new file with mode: 0644]
OvmfPkg/Library/PeilessStartupLib/PeilessStartupLib.inf [new file with mode: 0644]
OvmfPkg/Library/PeilessStartupLib/X64/PageTables.h [new file with mode: 0644]
OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c [new file with mode: 0644]
OvmfPkg/OvmfPkg.dec