]>
Commit | Line | Data |
---|---|---|
d92db8a0 MX |
1 | /** @file\r |
2 | TdxHelper Functions which are used in PEI 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 <Base.h>\r | |
11 | #include <PiPei.h>\r | |
12 | \r | |
13 | /**\r | |
14 | Build the GuidHob for tdx measurements which were done in SEC phase.\r | |
15 | The measurement values are stored in WorkArea.\r | |
16 | \r | |
17 | @retval EFI_SUCCESS The GuidHob is built successfully\r | |
18 | @retval Others Other errors as indicated\r | |
19 | **/\r | |
20 | EFI_STATUS\r | |
21 | InternalBuildGuidHobForTdxMeasurement (\r | |
22 | VOID\r | |
23 | );\r | |
24 | \r | |
25 | /**\r | |
26 | In Tdx guest, some information need to be passed from host VMM to guest\r | |
27 | firmware. For example, the memory resource, etc. These information are\r | |
28 | prepared by host VMM and put in TdHob which is described in TdxMetadata.\r | |
29 | TDVF processes the TdHob to accept memories.\r | |
30 | \r | |
31 | @retval EFI_SUCCESS Successfully process the TdHob\r | |
32 | @retval Others Other error as indicated\r | |
33 | **/\r | |
34 | EFI_STATUS\r | |
35 | EFIAPI\r | |
36 | TdxHelperProcessTdHob (\r | |
37 | VOID\r | |
38 | )\r | |
39 | {\r | |
40 | return EFI_UNSUPPORTED;\r | |
41 | }\r | |
42 | \r | |
43 | /**\r | |
44 | In Tdx guest, TdHob is passed from host VMM to guest firmware and it contains\r | |
45 | the information of the memory resource. From the security perspective before\r | |
46 | it is consumed, it should be measured and extended.\r | |
47 | *\r | |
48 | * @retval EFI_SUCCESS Successfully measure the TdHob\r | |
49 | * @retval Others Other error as indicated\r | |
50 | */\r | |
51 | EFI_STATUS\r | |
52 | EFIAPI\r | |
53 | TdxHelperMeasureTdHob (\r | |
54 | VOID\r | |
55 | )\r | |
56 | {\r | |
57 | return EFI_UNSUPPORTED;\r | |
58 | }\r | |
59 | \r | |
60 | /**\r | |
61 | * In Tdx guest, Configuration FV (CFV) is treated as external input because it\r | |
62 | * may contain the data provided by VMM. From the sucurity perspective Cfv image\r | |
63 | * should be measured before it is consumed.\r | |
64 | *\r | |
65 | * @retval EFI_SUCCESS Successfully measure the CFV image\r | |
66 | * @retval Others Other error as indicated\r | |
67 | */\r | |
68 | EFI_STATUS\r | |
69 | EFIAPI\r | |
70 | TdxHelperMeasureCfvImage (\r | |
71 | VOID\r | |
72 | )\r | |
73 | {\r | |
74 | return EFI_UNSUPPORTED;\r | |
75 | }\r | |
76 | \r | |
77 | /**\r | |
78 | Build the GuidHob for tdx measurements which were done in SEC phase.\r | |
79 | The measurement values are stored in WorkArea.\r | |
80 | \r | |
81 | @retval EFI_SUCCESS The GuidHob is built successfully\r | |
82 | @retval Others Other errors as indicated\r | |
83 | **/\r | |
84 | EFI_STATUS\r | |
85 | EFIAPI\r | |
86 | TdxHelperBuildGuidHobForTdxMeasurement (\r | |
87 | VOID\r | |
88 | )\r | |
89 | {\r | |
90 | return InternalBuildGuidHobForTdxMeasurement ();\r | |
91 | }\r |