]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/IntelTdx/TdxHelperLib/PeiTdxHelper.c
2 TdxHelper Functions which are used in PEI phase
4 Copyright (c) 2022 - 2023, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
14 Build the GuidHob for tdx measurements which were done in SEC phase.
15 The measurement values are stored in WorkArea.
17 @retval EFI_SUCCESS The GuidHob is built successfully
18 @retval Others Other errors as indicated
21 InternalBuildGuidHobForTdxMeasurement (
26 In Tdx guest, some information need to be passed from host VMM to guest
27 firmware. For example, the memory resource, etc. These information are
28 prepared by host VMM and put in TdHob which is described in TdxMetadata.
29 TDVF processes the TdHob to accept memories.
31 @retval EFI_SUCCESS Successfully process the TdHob
32 @retval Others Other error as indicated
36 TdxHelperProcessTdHob (
40 return EFI_UNSUPPORTED
;
44 In Tdx guest, TdHob is passed from host VMM to guest firmware and it contains
45 the information of the memory resource. From the security perspective before
46 it is consumed, it should be measured and extended.
48 * @retval EFI_SUCCESS Successfully measure the TdHob
49 * @retval Others Other error as indicated
53 TdxHelperMeasureTdHob (
57 return EFI_UNSUPPORTED
;
61 * In Tdx guest, Configuration FV (CFV) is treated as external input because it
62 * may contain the data provided by VMM. From the sucurity perspective Cfv image
63 * should be measured before it is consumed.
65 * @retval EFI_SUCCESS Successfully measure the CFV image
66 * @retval Others Other error as indicated
70 TdxHelperMeasureCfvImage (
74 return EFI_UNSUPPORTED
;
78 Build the GuidHob for tdx measurements which were done in SEC phase.
79 The measurement values are stored in WorkArea.
81 @retval EFI_SUCCESS The GuidHob is built successfully
82 @retval Others Other errors as indicated
86 TdxHelperBuildGuidHobForTdxMeasurement (
90 return InternalBuildGuidHobForTdxMeasurement ();