]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PeilessStartupLib/PeilessStartupInternal.h
OvmfPkg/PeilessStartupLib: Find NCCFV in non-td guest
[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 EFI_STATUS
25 EFIAPI
26 FindDxeNonCc (
27 IN INTN FvInstance
28 );
29
30 VOID
31 EFIAPI
32 TransferHobList (
33 IN CONST VOID *HobStart
34 );
35
36 /**
37 * This function is to find a memory region which is the largest one below 4GB.
38 * It will be used as the firmware hoblist.
39 *
40 * @param VmmHobList Vmm passed hoblist which constains the memory information.
41 * @return EFI_SUCCESS Successfully construct the firmware hoblist.
42 * @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.
43 */
44 EFI_STATUS
45 EFIAPI
46 ConstructFwHobList (
47 IN CONST VOID *VmmHobList
48 );
49
50 /**
51 * Construct the HobList in SEC phase.
52 *
53 * @return EFI_SUCCESS Successfully construct the firmware hoblist.
54 * @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.
55 */
56 EFI_STATUS
57 EFIAPI
58 ConstructSecHobList (
59 );
60
61 /**
62 Measure the Hoblist passed from the VMM.
63
64 @param[in] VmmHobList The Hoblist pass the firmware
65
66 @retval EFI_SUCCESS Fv image is measured successfully
67 or it has been already measured.
68 @retval Others Other errors as indicated
69 **/
70 EFI_STATUS
71 EFIAPI
72 MeasureHobList (
73 IN CONST VOID *VmmHobList
74 );
75
76 /**
77 Measure FV image.
78
79 @param[in] FvBase Base address of FV image.
80 @param[in] FvLength Length of FV image.
81 @param[in] PcrIndex Index of PCR
82
83 @retval EFI_SUCCESS Fv image is measured successfully
84 or it has been already measured.
85 @retval EFI_OUT_OF_RESOURCES No enough memory to log the new event.
86 @retval EFI_DEVICE_ERROR The command was unsuccessful.
87
88 **/
89 EFI_STATUS
90 EFIAPI
91 MeasureFvImage (
92 IN EFI_PHYSICAL_ADDRESS FvBase,
93 IN UINT64 FvLength,
94 IN UINT8 PcrIndex
95 );
96
97 #endif