3 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef PEILESS_STARTUP_INTERNAL_LIB_H_
10 #define PEILESS_STARTUP_INTERNAL_LIB_H_
13 #include <Library/BaseLib.h>
14 #include <Uefi/UefiSpec.h>
15 #include <Uefi/UefiBaseType.h>
16 #include <IndustryStandard/IntelTdx.h>
27 IN CONST VOID
*HobStart
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.
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.
41 IN CONST VOID
*VmmHobList
45 * Construct the HobList in SEC phase.
47 * @return EFI_SUCCESS Successfully construct the firmware hoblist.
48 * @return EFI_NOT_FOUND Cannot find a memory region to be the fw hoblist.
56 Check the integrity of CFV data.
58 @param[in] TdxCfvBase - A pointer to CFV header
59 @param[in] TdxCfvSize - CFV data size
61 @retval TRUE - The CFV data is valid.
62 @retval FALSE - The CFV data is invalid.
73 Measure the Hoblist passed from the VMM.
75 @param[in] VmmHobList The Hoblist pass the firmware
77 @retval EFI_SUCCESS Fv image is measured successfully
78 or it has been already measured.
79 @retval Others Other errors as indicated
84 IN CONST VOID
*VmmHobList
90 @param[in] FvBase Base address of FV image.
91 @param[in] FvLength Length of FV image.
92 @param[in] PcrIndex Index of PCR
94 @retval EFI_SUCCESS Fv image is measured successfully
95 or it has been already measured.
96 @retval EFI_OUT_OF_RESOURCES No enough memory to log the new event.
97 @retval EFI_DEVICE_ERROR The command was unsuccessful.
103 IN EFI_PHYSICAL_ADDRESS FvBase
,