QemuFlashFvbServicesRuntimeDxe provides actual persistent storage for
non-volatile variables. When it is active, any on-disk NvVars file counts
as a stale source of variables -- hence don't load these files in BDS.
This also allows Secure Boot settings (eg. enrolled keys) to survive cold
VM reboots.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14844
6f19259b-4bc3-4df7-8a09-
765794883524
\r
ConnectRootBridge ();\r
\r
- //\r
- // Try to restore variables from the hard disk early so\r
- // they can be used for the other BDS connect operations.\r
- //\r
- PlatformBdsRestoreNvVarsFromHardDisk ();\r
+ if (PcdGetBool (PcdOvmfFlashVariablesEnable)) {\r
+ DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior: not restoring NvVars "\r
+ "from disk since flash variables appear to be supported.\n"));\r
+ } else {\r
+ //\r
+ // Try to restore variables from the hard disk early so\r
+ // they can be used for the other BDS connect operations.\r
+ //\r
+ PlatformBdsRestoreNvVarsFromHardDisk ();\r
+ }\r
\r
//\r
// Init the time out value\r
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut\r
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile\r
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent\r
+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable\r
\r
[Pcd.IA32, Pcd.X64]\r
gEfiMdePkgTokenSpaceGuid.PcdFSBClock\r