X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FInclude%2FLibrary%2FPlatformInitLib.h;fp=OvmfPkg%2FInclude%2FLibrary%2FPlatformInitLib.h;h=c5234bf26d45205d175db538841c25bae7fe5a50;hp=2987a367cc9c8fa06bac931f0633911e644a474d;hb=4f173db8b45b97563e83847cdff45e6690561482;hpb=0e72e8762a547eae7b0a463bb099d6fbbc9557cd diff --git a/OvmfPkg/Include/Library/PlatformInitLib.h b/OvmfPkg/Include/Library/PlatformInitLib.h index 2987a367cc..c5234bf26d 100644 --- a/OvmfPkg/Include/Library/PlatformInitLib.h +++ b/OvmfPkg/Include/Library/PlatformInitLib.h @@ -234,4 +234,55 @@ PlatformTdxPublishRamRegions ( VOID ); +/** + Check the integrity of NvVarStore. + + @param[in] NvVarStoreBase - A pointer to NvVarStore header + @param[in] NvVarStoreSize - NvVarStore size + + @retval TRUE - The NvVarStore is valid. + @retval FALSE - The NvVarStore is invalid. + +**/ +BOOLEAN +EFIAPI +PlatformValidateNvVarStore ( + IN UINT8 *NvVarStoreBase, + IN UINT32 NvVarStoreSize + ); + +/** + Allocate storage for NV variables early on so it will be + at a consistent address. Since VM memory is preserved + across reboots, this allows the NV variable storage to survive + a VM reboot. + + * + * @retval VOID* The pointer to the storage for NV Variables + */ +VOID * +EFIAPI +PlatformReserveEmuVariableNvStore ( + VOID + ); + +/** + When OVMF is lauched with -bios parameter, UEFI variables will be + partially emulated, and non-volatile variables may lose their contents + after a reboot. This makes the secure boot feature not working. + + This function is used to initialize the EmuVariableNvStore + with the conent in PcdOvmfFlashNvStorageVariableBase. + + @param[in] EmuVariableNvStore - A pointer to EmuVariableNvStore + + @retval EFI_SUCCESS - Successfully init the EmuVariableNvStore + @retval Others - As the error code indicates + */ +EFI_STATUS +EFIAPI +PlatformInitEmuVariableNvStore ( + IN VOID *EmuVariableNvStore + ); + #endif // PLATFORM_INIT_LIB_H_