diff options
author | Tim He <tim.he@intel.com> | 2015-06-11 02:50:20 +0000 |
---|---|---|
committer | timhe <timhe@Edk2> | 2015-06-11 02:50:20 +0000 |
commit | 620f289162b08d319fe1e73b3c7e2baff6b388e4 (patch) | |
tree | db0955f5012f93e7aca96b11c6f39b0da158fafc /Vlv2TbltDevicePkg/PlatformInfoDxe | |
parent | 2a697cb579972d1b849c396499dd0a1d2e911d35 (diff) | |
download | edk2-platforms-620f289162b08d319fe1e73b3c7e2baff6b388e4.tar.xz |
Sync the branch changes to trunk.
Update the FCE tool to remove “runtime access” .
and recovery "Setup" variable 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/trunk/edk2@17620 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Vlv2TbltDevicePkg/PlatformInfoDxe')
-rw-r--r-- | Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.c b/Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.c index 6bf276246e..8bdcaee7c9 100644 --- a/Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.c +++ b/Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.c @@ -62,6 +62,19 @@ PlatformInfoInit ( &VarSize,
&SystemConfiguration
);
+
+ 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);
+ }
VarSize = sizeof(Selection);
Status = gRT->GetVariable(
@@ -113,7 +126,7 @@ PlatformInfoInit ( Status = gRT->SetVariable (
NORMAL_SETUP_NAME,
&gEfiNormalSetupGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
sizeof(SYSTEM_CONFIGURATION),
&SystemConfiguration
);
@@ -146,7 +159,7 @@ PlatformInfoInit ( Status = gRT->SetVariable(
L"PlatformInfo",
&gEfiVlv2VariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
sizeof(EFI_PLATFORM_INFO_HOB),
PlatformInfoHobPtr
);
|