]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PeilessStartupLib/PeilessStartupInternal.h
OvmfPkg/IntelTdx: Measure Td HobList and Configuration FV
[mirror_edk2.git] / OvmfPkg / Library / PeilessStartupLib / PeilessStartupInternal.h
1 /** @file
2
3 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef PEILESS_STARTUP_INTERNAL_LIB_H_
10 #define PEILESS_STARTUP_INTERNAL_LIB_H_
11
12 #include <PiPei.h>
13 #include <Library/BaseLib.h>
14 #include <Uefi/UefiSpec.h>
15 #include <Uefi/UefiBaseType.h>
16 #include <IndustryStandard/IntelTdx.h>
17
18 EFI_STATUS
19 EFIAPI
20 DxeLoadCore (
21 IN INTN FvInstance
22 );
23
24 VOID
25 EFIAPI
26 TransferHobList (
27 IN CONST VOID *HobStart
28 );
29
30 /**
31 * This function is to find a memory region which is the largest one below 4GB.
32 * It will be used as the firmware hoblist.
33 *
34 * @param VmmHobList Vmm passed hoblist which constains the memory information.
35 * @return EFI_SUCCESS Successfully construct the firmware hoblist.
36 * @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.
37 */
38 EFI_STATUS
39 EFIAPI
40 ConstructFwHobList (
41 IN CONST VOID *VmmHobList
42 );
43
44 /**
45 * Construct the HobList in SEC phase.
46 *
47 * @return EFI_SUCCESS Successfully construct the firmware hoblist.
48 * @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.
49 */
50 EFI_STATUS
51 EFIAPI
52 ConstructSecHobList (
53 );
54
55 /**
56 Check the integrity of CFV data.
57
58 @param[in] TdxCfvBase - A pointer to CFV header
59 @param[in] TdxCfvSize - CFV data size
60
61 @retval TRUE - The CFV data is valid.
62 @retval FALSE - The CFV data is invalid.
63
64 **/
65 BOOLEAN
66 EFIAPI
67 TdxValidateCfv (
68 IN UINT8 *TdxCfvBase,
69 IN UINT32 TdxCfvSize
70 );
71
72 #endif