summaryrefslogtreecommitdiff
path: root/Vlv2TbltDevicePkg/PciPlatform
diff options
context:
space:
mode:
Diffstat (limited to 'Vlv2TbltDevicePkg/PciPlatform')
-rw-r--r--Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c b/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c
index 1b59eee74f..08f5df2a25 100644
--- a/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c
+++ b/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c
@@ -343,7 +343,18 @@ PciPlatformDriverEntry (
&VarSize,
&mSystemConfiguration
);
- ASSERT_EFI_ERROR(Status);
+ if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)) {
+ //The setup variable is corrupted
+ VarSize = sizeof(SYSTEM_CONFIGURATION);
+ Status = gRT->GetVariable(
+ L"SetupRecovery",
+ &gEfiNormalSetupGuid,
+ NULL,
+ &VarSize,
+ &mSystemConfiguration
+ );
+ ASSERT_EFI_ERROR (Status);
+ }
//
// Install on a new handle