TianoCore EDK2 master
|
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <IndustryStandard/Tpm20.h>
#include <IndustryStandard/UefiTcgPlatform.h>
#include <Library/HobLib.h>
#include <Library/PrintLib.h>
#include <Library/TcgEventLogRecordLib.h>
#include <WorkArea.h>
Go to the source code of this file.
Data Structures | |
struct | TDX_HANDOFF_TABLE_POINTERS2 |
Macros | |
#define | HANDOFF_TABLE_DESC "TdxTable" |
#define | FV_HANDOFF_TABLE_DESC "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)" |
#define | TDX_DIGEST_VALUE_LEN (sizeof (UINT32) + sizeof (TPMI_ALG_HASH) + SHA384_DIGEST_SIZE) |
Typedefs | |
typedef PLATFORM_FIRMWARE_BLOB2_STRUCT | CFV_HANDOFF_TABLE_POINTERS2 |
Functions | |
STATIC EFI_STATUS | BuildTdxMeasurementGuidHob (UINT32 RtmrIndex, UINT32 EventType, UINT8 *EventData, UINT32 EventSize, UINT8 *HashValue, UINT32 HashSize) |
VOID * | GetFvName (IN EFI_PHYSICAL_ADDRESS FvBase, IN UINT64 FvLength) |
EFI_STATUS | InternalBuildGuidHobForTdxMeasurement (VOID) |
Build GuidHob for tdx measurement.
Copyright (c) 2022 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TdxMeasurementHob.c.
#define FV_HANDOFF_TABLE_DESC "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)" |
Definition at line 33 of file TdxMeasurementHob.c.
#define HANDOFF_TABLE_DESC "TdxTable" |
Definition at line 23 of file TdxMeasurementHob.c.
Definition at line 34 of file TdxMeasurementHob.c.
STATIC EFI_STATUS BuildTdxMeasurementGuidHob | ( | UINT32 | RtmrIndex, |
UINT32 | EventType, | ||
UINT8 * | EventData, | ||
UINT32 | EventSize, | ||
UINT8 * | HashValue, | ||
UINT32 | HashSize | ||
) |
Build GuidHob for Tdx measurement.
Tdx measurement includes the measurement of TdHob and CFV. They're measured and extended to RTMR registers in SEC phase. Because at that moment the Hob service are not available. So the values of the measurement are saved in workarea and will be built into GuidHob after the Hob service is ready.
RtmrIndex | RTMR index |
EventType | Event type |
EventData | Event data |
EventSize | Size of event data |
HashValue | Hash value |
HashSize | Size of hash |
EFI_SUCCESS | Successfully build the GuidHobs |
Others | Other error as indicated |
Definition at line 56 of file TdxMeasurementHob.c.
VOID * GetFvName | ( | IN EFI_PHYSICAL_ADDRESS | FvBase, |
IN UINT64 | FvLength | ||
) |
Get the FvName from the FV header.
Causion: The FV is untrusted input.
[in] | FvBase | Base address of FV image. |
[in] | FvLength | Length of FV image. |
NULL | FvName is NOT found |
Definition at line 131 of file TdxMeasurementHob.c.
EFI_STATUS InternalBuildGuidHobForTdxMeasurement | ( | VOID | ) |
Build the GuidHob for tdx measurements which were done in SEC phase. The measurement values are stored in WorkArea.
EFI_SUCCESS | The GuidHob is built successfully |
Others | Other errors as indicated |
Definition at line 173 of file TdxMeasurementHob.c.