RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3853 TdHobList and Configuration FV are external data provided by Host VMM. These are not trusted in Td guest. So they should be validated , measured and extended to Td RTMR registers. In the meantime 2 EFI_CC_EVENT_HOB are created. These 2 GUIDed HOBs carry the hash value of TdHobList and Configuration FV. In DXE phase EFI_CC_EVENT can be created based on these 2 GUIDed HOBs. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> 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> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
73 lines
1.5 KiB
C
73 lines
1.5 KiB
C
/** @file
|
|
|
|
Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef PEILESS_STARTUP_INTERNAL_LIB_H_
|
|
#define PEILESS_STARTUP_INTERNAL_LIB_H_
|
|
|
|
#include <PiPei.h>
|
|
#include <Library/BaseLib.h>
|
|
#include <Uefi/UefiSpec.h>
|
|
#include <Uefi/UefiBaseType.h>
|
|
#include <IndustryStandard/IntelTdx.h>
|
|
|
|
EFI_STATUS
|
|
EFIAPI
|
|
DxeLoadCore (
|
|
IN INTN FvInstance
|
|
);
|
|
|
|
VOID
|
|
EFIAPI
|
|
TransferHobList (
|
|
IN CONST VOID *HobStart
|
|
);
|
|
|
|
/**
|
|
* This function is to find a memory region which is the largest one below 4GB.
|
|
* It will be used as the firmware hoblist.
|
|
*
|
|
* @param VmmHobList Vmm passed hoblist which constains the memory information.
|
|
* @return EFI_SUCCESS Successfully construct the firmware hoblist.
|
|
* @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.
|
|
*/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
ConstructFwHobList (
|
|
IN CONST VOID *VmmHobList
|
|
);
|
|
|
|
/**
|
|
* Construct the HobList in SEC phase.
|
|
*
|
|
* @return EFI_SUCCESS Successfully construct the firmware hoblist.
|
|
* @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.
|
|
*/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
ConstructSecHobList (
|
|
);
|
|
|
|
/**
|
|
Check the integrity of CFV data.
|
|
|
|
@param[in] TdxCfvBase - A pointer to CFV header
|
|
@param[in] TdxCfvSize - CFV data size
|
|
|
|
@retval TRUE - The CFV data is valid.
|
|
@retval FALSE - The CFV data is invalid.
|
|
|
|
**/
|
|
BOOLEAN
|
|
EFIAPI
|
|
TdxValidateCfv (
|
|
IN UINT8 *TdxCfvBase,
|
|
IN UINT32 TdxCfvSize
|
|
);
|
|
|
|
#endif
|