]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Include/Library/TdxHelperLib.h
OvmfPkg/IntelTdx: Add TdxHelperLibNull
[mirror_edk2.git] / OvmfPkg / Include / Library / TdxHelperLib.h
CommitLineData
d3109e5f
MX
1/** @file\r
2 TdxHelperLib header file\r
3\r
4 Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#ifndef TDX_HELPER_LIB_H\r
10#define TDX_HELPER_LIB_H\r
11\r
12#include <PiPei.h>\r
13\r
14/**\r
15 In Tdx guest, some information need to be passed from host VMM to guest\r
16 firmware. For example, the memory resource, etc. These information are\r
17 prepared by host VMM and put in TdHob which is described in TdxMetadata.\r
18 TDVF processes the TdHob to accept memories.\r
19\r
20 @retval EFI_SUCCESS Successfully process the TdHob\r
21 @retval Others Other error as indicated\r
22**/\r
23EFI_STATUS\r
24EFIAPI\r
25TdxHelperProcessTdHob (\r
26 VOID\r
27 );\r
28\r
29/**\r
30 In Tdx guest, TdHob is passed from host VMM to guest firmware and it contains\r
31 the information of the memory resource. From the security perspective before\r
32 it is consumed, it should be measured and extended.\r
33 *\r
34 * @retval EFI_SUCCESS Successfully measure the TdHob\r
35 * @retval Others Other error as indicated\r
36 */\r
37EFI_STATUS\r
38EFIAPI\r
39TdxHelperMeasureTdHob (\r
40 VOID\r
41 );\r
42\r
43/**\r
44 * In Tdx guest, Configuration FV (CFV) is treated as external input because it\r
45 * may contain the data provided by VMM. From the sucurity perspective Cfv image\r
46 * should be measured before it is consumed.\r
47 *\r
48 * @retval EFI_SUCCESS Successfully measure the CFV image\r
49 * @retval Others Other error as indicated\r
50 */\r
51EFI_STATUS\r
52EFIAPI\r
53TdxHelperMeasureCfvImage (\r
54 VOID\r
55 );\r
56\r
57/**\r
58 Build the GuidHob for tdx measurements which were done in SEC phase.\r
59 The measurement values are stored in WorkArea.\r
60\r
61 @retval EFI_SUCCESS The GuidHob is built successfully\r
62 @retval Others Other errors as indicated\r
63**/\r
64EFI_STATUS\r
65EFIAPI\r
66TdxHelperBuildGuidHobForTdxMeasurement (\r
67 VOID\r
68 );\r
69\r
70#endif\r