]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PeilessStartupLib/PeilessStartupInternal.h
a2d2c1c9145bacf2499a0530ca382a6726150313
[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 FV image.
63
64 @param[in] FvBase Base address of FV image.
65 @param[in] FvLength Length of FV image.
66 @param[in] PcrIndex Index of PCR
67
68 @retval EFI_SUCCESS Fv image is measured successfully
69 or it has been already measured.
70 @retval EFI_OUT_OF_RESOURCES No enough memory to log the new event.
71 @retval EFI_DEVICE_ERROR The command was unsuccessful.
72
73 **/
74 EFI_STATUS
75 EFIAPI
76 MeasureFvImage (
77 IN EFI_PHYSICAL_ADDRESS FvBase,
78 IN UINT64 FvLength,
79 IN UINT8 PcrIndex
80 );
81
82 #endif