\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