summaryrefslogtreecommitdiffstats
path: root/Vlv2TbltDevicePkg/PlatformGopPolicy
diff options
context:
space:
mode:
authorTim He <tim.he@intel.com>2015-06-09 08:39:10 +0000
committertimhe <timhe@Edk2>2015-06-09 08:39:10 +0000
commitda01d6a73ddca8167571786d36317e988084fdf0 (patch)
treed231b75e334f0b1b68c98c0ce24ca179c2fc06b3 /Vlv2TbltDevicePkg/PlatformGopPolicy
parent4fba57d71d49864fafbdb297140f92a0bdd89b2f (diff)
downloadedk2-da01d6a73ddca8167571786d36317e988084fdf0.tar.gz
Recovery "Setup" variable for Minnowboard Max to
make sure system could boot properly in case of “Setup” variable size is incorrect somehow. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tim He <tim.he@intel.com> Reviewed-by: David Wei <david.wei@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2014.SP1@17595 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Vlv2TbltDevicePkg/PlatformGopPolicy')
-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 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 (