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