]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/PeilessStartupLib/PeilessStartupInternal.h
OvmfPkg/PeilessStartupLib: Find NCCFV in non-td guest
[mirror_edk2.git] / OvmfPkg / Library / PeilessStartupLib / PeilessStartupInternal.h
CommitLineData
4fe26784
MX
1/** @file\r
2\r
3 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r
4\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#ifndef PEILESS_STARTUP_INTERNAL_LIB_H_\r
10#define PEILESS_STARTUP_INTERNAL_LIB_H_\r
11\r
12#include <PiPei.h>\r
13#include <Library/BaseLib.h>\r
14#include <Uefi/UefiSpec.h>\r
15#include <Uefi/UefiBaseType.h>\r
16#include <IndustryStandard/IntelTdx.h>\r
17\r
18EFI_STATUS\r
19EFIAPI\r
20DxeLoadCore (\r
21 IN INTN FvInstance\r
22 );\r
23\r
70d1481b
MX
24EFI_STATUS\r
25EFIAPI\r
26FindDxeNonCc (\r
27 IN INTN FvInstance\r
28 );\r
29\r
4fe26784
MX
30VOID\r
31EFIAPI\r
32TransferHobList (\r
33 IN CONST VOID *HobStart\r
34 );\r
35\r
36/**\r
37 * This function is to find a memory region which is the largest one below 4GB.\r
38 * It will be used as the firmware hoblist.\r
39 *\r
40 * @param VmmHobList Vmm passed hoblist which constains the memory information.\r
41 * @return EFI_SUCCESS Successfully construct the firmware hoblist.\r
42 * @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.\r
43 */\r
44EFI_STATUS\r
45EFIAPI\r
46ConstructFwHobList (\r
47 IN CONST VOID *VmmHobList\r
48 );\r
49\r
50/**\r
51 * Construct the HobList in SEC phase.\r
52 *\r
53 * @return EFI_SUCCESS Successfully construct the firmware hoblist.\r
54 * @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.\r
55 */\r
56EFI_STATUS\r
57EFIAPI\r
58ConstructSecHobList (\r
59 );\r
60\r
ff0ffe59
MX
61/**\r
62 Measure the Hoblist passed from the VMM.\r
63\r
64 @param[in] VmmHobList The Hoblist pass the firmware\r
65\r
66 @retval EFI_SUCCESS Fv image is measured successfully\r
67 or it has been already measured.\r
68 @retval Others Other errors as indicated\r
69**/\r
70EFI_STATUS\r
71EFIAPI\r
72MeasureHobList (\r
73 IN CONST VOID *VmmHobList\r
74 );\r
75\r
76/**\r
77 Measure FV image.\r
78\r
79 @param[in] FvBase Base address of FV image.\r
80 @param[in] FvLength Length of FV image.\r
81 @param[in] PcrIndex Index of PCR\r
82\r
83 @retval EFI_SUCCESS Fv image is measured successfully\r
84 or it has been already measured.\r
85 @retval EFI_OUT_OF_RESOURCES No enough memory to log the new event.\r
86 @retval EFI_DEVICE_ERROR The command was unsuccessful.\r
87\r
88**/\r
89EFI_STATUS\r
90EFIAPI\r
91MeasureFvImage (\r
92 IN EFI_PHYSICAL_ADDRESS FvBase,\r
93 IN UINT64 FvLength,\r
94 IN UINT8 PcrIndex\r
95 );\r
96\r
4fe26784 97#endif\r