diff options
Diffstat (limited to 'Vlv2TbltDevicePkg/PlatformGopPolicy')
-rw-r--r-- | Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c b/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.c index 59c73c62ba..0abe1b27d9 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 (
|