]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/PlatformDxe/ExI.c
UefiCpuPkg: Fix comment typo for MtrrLibApplyFixedMtrrs function
[mirror_edk2.git] / Vlv2TbltDevicePkg / PlatformDxe / ExI.c
index 2dad89f606a1c59f3a1aabf0ac409196c53b25e3..603b44aa82f36296217c41859dd38b15cbe985cd 100644 (file)
@@ -73,7 +73,18 @@ InitExI (
                   &SystemConfiguration\r
                   );\r
 \r
-  ASSERT_EFI_ERROR(Status);\r
+  if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)) {\r
+    //The setup variable is corrupted\r
+    VarSize = sizeof(SYSTEM_CONFIGURATION);\r
+    Status = gRT->GetVariable(\r
+              L"SetupRecovery",\r
+              &gEfiNormalSetupGuid,\r
+              NULL,\r
+              &VarSize,\r
+              &SystemConfiguration\r
+              );\r
+    ASSERT_EFI_ERROR (Status);\r
+  }  \r
 \r
   if (SystemConfiguration.ExISupport == 1) {\r
          MmioOr32 ((UINTN) (GetPmcBase() + R_PCH_PMC_MTPMC1), (UINT32) BIT0+BIT1+BIT2);\r