]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
Sync the branch changes to trunk.
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / MultiPlatformLib / BoardClkGens / BoardClkGens.c
index 1fc731205bad28b507d75a8a8762453932f849bc..86cd67cea82fac3c048341cc48586f1fd767ab49 100644 (file)
@@ -346,7 +346,18 @@ ConfigurePlatformClocks (
                                    NULL,\r
                                    &VariableSize,\r
                                    &SystemConfiguration);\r
-\r
+  if (EFI_ERROR (Status) || VariableSize != sizeof(SYSTEM_CONFIGURATION)) {\r
+    //The setup variable is corrupted\r
+    VariableSize = sizeof(SYSTEM_CONFIGURATION);\r
+    Status = Variable->GetVariable(Variable,\r
+              L"SetupRecovery",\r
+              &gEfiSetupVariableGuid,\r
+              NULL,\r
+              &VariableSize,\r
+              &SystemConfiguration\r
+              );\r
+    ASSERT_EFI_ERROR (Status);\r
+  }  \r
   if(!EFI_ERROR (Status)){\r
     EnableSpreadSpectrum = SystemConfiguration.EnableClockSpreadSpec;\r
   }\r