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>
This commit is contained in:
34
OvmfPkg/Include/Library/PeilessStartupLib.h
Normal file
34
OvmfPkg/Include/Library/PeilessStartupLib.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#ifndef PEILESS_STARTUP_LIB_H_
|
||||
#define PEILESS_STARTUP_LIB_H_
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Uefi/UefiBaseType.h>
|
||||
#include <Uefi/UefiSpec.h>
|
||||
#include <Pi/PiPeiCis.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Protocol/DebugSupport.h>
|
||||
|
||||
/**
|
||||
* This function brings up the Tdx guest from SEC phase to DXE phase.
|
||||
* PEI phase is skipped because most of the components in PEI phase
|
||||
* is not needed for Tdx guest, for example, MP Services, TPM etc.
|
||||
* In this way, the attack surfaces are reduced as much as possible.
|
||||
*
|
||||
* @param Context The pointer to the SecCoreData
|
||||
* @return VOID This function never returns
|
||||
*/
|
||||
VOID
|
||||
EFIAPI
|
||||
PeilessStartup (
|
||||
IN VOID *Context
|
||||
);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user