[edk2-devel] [PATCH V4 04/10] OvmfPkg: Add PeilessStartupLib
Gerd Hoffmann
kraxel at redhat.com
Tue Mar 1 13:31:06 UTC 2022
On Mon, Feb 28, 2022 at 04:16:25PM +0800, Min Xu wrote:
> 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 at intel.com>
> Cc: Brijesh Singh <brijesh.singh at amd.com>
> Cc: Erdem Aktas <erdemaktas at google.com>
> Cc: James Bottomley <jejb at linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Tom Lendacky <thomas.lendacky at amd.com>
> Cc: Gerd Hoffmann <kraxel at redhat.com>
> Signed-off-by: Min Xu <min.m.xu at intel.com>
> ---
> OvmfPkg/Include/Library/PeilessStartupLib.h | 34 +
> OvmfPkg/IntelTdx/PeilessStartupLib/DxeLoad.c | 218 ++++
> OvmfPkg/IntelTdx/PeilessStartupLib/Hob.c | 130 +++
> .../PeilessStartupLib/PeilessStartup.c | 241 +++++
> .../PeilessStartupInternal.h | 55 ++
> .../PeilessStartupLib/PeilessStartupLib.inf | 86 ++
> .../PeilessStartupLib/X64/PageTables.h | 206 ++++
> .../PeilessStartupLib/X64/VirtualMemory.c | 935 ++++++++++++++++++
> OvmfPkg/OvmfPkg.dec | 4 +
> 9 files changed, 1909 insertions(+)
> create mode 100644 OvmfPkg/Include/Library/PeilessStartupLib.h
> create mode 100644 OvmfPkg/IntelTdx/PeilessStartupLib/DxeLoad.c
Shouldn't this better go to OvmfPkg/Library?
Otherwise
Acked-by: Gerd Hoffmann <kraxel at redhat.com>
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#87162): https://edk2.groups.io/g/devel/message/87162
Mute This Topic: https://groups.io/mt/89446690/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list