summaryrefslogtreecommitdiff
path: root/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2022-06-29 10:46:22 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-06 07:21:42 +0000
commit4f173db8b45b97563e83847cdff45e6690561482 (patch)
treed08031d0876ee85c4742f11523609ff0a5ba05cb /OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
parent0e72e8762a547eae7b0a463bb099d6fbbc9557cd (diff)
downloadedk2-4f173db8b45b97563e83847cdff45e6690561482.zip
edk2-4f173db8b45b97563e83847cdff45e6690561482.tar.gz
edk2-4f173db8b45b97563e83847cdff45e6690561482.tar.bz2
OvmfPkg/PlatformInitLib: Add functions for EmuVariableNvStore
There are 3 functions added for EmuVariableNvStore: - PlatformReserveEmuVariableNvStore - PlatformInitEmuVariableNvStore - PlatformValidateNvVarStore PlatformReserveEmuVariableNvStore allocate storage for NV variables early on so it will be at a consistent address. PlatformInitEmuVariableNvStore copies the content in PcdOvmfFlashNvStorageVariableBase to the storage allocated by PlatformReserveEmuVariableNvStore. This is used in the case that OVMF is launched with -bios parameter. Because in that situation 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. PlatformValidateNvVarStore is renamed from TdxValidateCfv and it is used to validate the integrity of FlashNvVarStore (PcdOvmfFlashNvStorageVariableBase). It should be called before PlatformInitEmuVariableNvStore is called to copy over the content. Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf')
-rw-r--r--OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf3
1 files changed, 3 insertions, 0 deletions
diff --git a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
index d2fa2d9..86a82ad 100644
--- a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
+++ b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
@@ -47,6 +47,7 @@
HobLib
QemuFwCfgLib
QemuFwCfgSimpleParserLib
+ MemoryAllocationLib
MtrrLib
PcdLib
PciLib
@@ -96,6 +97,8 @@
gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
gUefiOvmfPkgTokenSpaceGuid.PcdTdxAcceptPageSize
+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase
+ gUefiOvmfPkgTokenSpaceGuid.PcdCfvRawDataSize
[FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode