]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Include/Library/PlatformInitLib.h
OvmfPkg/QemuFwCfgLib: remove mQemuFwCfgSupported + mQemuFwCfgDmaSupported
[mirror_edk2.git] / OvmfPkg / Include / Library / PlatformInitLib.h
index 2987a367cc9c8fa06bac931f0633911e644a474d..bf6f90a5761cac6e47bccb3a9fb5cf243cf8ea7a 100644 (file)
@@ -48,6 +48,12 @@ typedef struct {
 \r
   UINT32               S3AcpiReservedMemoryBase;\r
   UINT32               S3AcpiReservedMemorySize;\r
+\r
+  UINT64               FeatureControlValue;\r
+\r
+  BOOLEAN              QemuFwCfgChecked;\r
+  BOOLEAN              QemuFwCfgSupported;\r
+  BOOLEAN              QemuFwCfgDmaSupported;\r
 } EFI_HOB_PLATFORM_INFO;\r
 #pragma pack()\r
 \r
@@ -234,4 +240,55 @@ PlatformTdxPublishRamRegions (
   VOID\r
   );\r
 \r
+/**\r
+  Check the integrity of NvVarStore.\r
+\r
+  @param[in] NvVarStoreBase - A pointer to NvVarStore header\r
+  @param[in] NvVarStoreSize - NvVarStore size\r
+\r
+  @retval  TRUE   - The NvVarStore is valid.\r
+  @retval  FALSE  - The NvVarStore is invalid.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+PlatformValidateNvVarStore (\r
+  IN UINT8   *NvVarStoreBase,\r
+  IN UINT32  NvVarStoreSize\r
+  );\r
+\r
+/**\r
+ Allocate storage for NV variables early on so it will be\r
+ at a consistent address.  Since VM memory is preserved\r
+ across reboots, this allows the NV variable storage to survive\r
+ a VM reboot.\r
+\r
+ *\r
+ * @retval VOID* The pointer to the storage for NV Variables\r
+ */\r
+VOID *\r
+EFIAPI\r
+PlatformReserveEmuVariableNvStore (\r
+  VOID\r
+  );\r
+\r
+/**\r
+ When OVMF is lauched with -bios parameter, UEFI variables will be\r
+ partially emulated, and non-volatile variables may lose their contents\r
+ after a reboot. This makes the secure boot feature not working.\r
+\r
+ This function is used to initialize the EmuVariableNvStore\r
+ with the conent in PcdOvmfFlashNvStorageVariableBase.\r
+\r
+ @param[in] EmuVariableNvStore      - A pointer to EmuVariableNvStore\r
+\r
+ @retval  EFI_SUCCESS   - Successfully init the EmuVariableNvStore\r
+ @retval  Others        - As the error code indicates\r
+ */\r
+EFI_STATUS\r
+EFIAPI\r
+PlatformInitEmuVariableNvStore (\r
+  IN VOID  *EmuVariableNvStore\r
+  );\r
+\r
 #endif // PLATFORM_INIT_LIB_H_\r