summaryrefslogtreecommitdiff
path: root/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c
diff options
context:
space:
mode:
Diffstat (limited to 'Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c')
-rw-r--r--Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c b/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c
index 59c73c62b..0abe1b27d 100644
--- a/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c
+++ b/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c
@@ -181,7 +181,19 @@ PlatformGOPPolicyEntryPoint (
&VarSize,
&SystemConfiguration
);
- 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,
+ &SystemConfiguration
+ );
+ ASSERT_EFI_ERROR (Status);
+ }
+
if (SystemConfiguration.GOPEnable == 1)
{
Status = gBS->InstallMultipleProtocolInterfaces (