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
This commit is contained in:
@@ -202,6 +202,19 @@ UpdateBootMode (
|
||||
// Use normal setup default from NVRAM variable,
|
||||
// the Platform Mode (manufacturing/safe/normal) is handle in PeiGetVariable.
|
||||
//
|
||||
VarSize = sizeof(SYSTEM_CONFIGURATION);
|
||||
Status = Variable->GetVariable (
|
||||
Variable,
|
||||
L"Setup",
|
||||
&gEfiSetupVariableGuid,
|
||||
NULL,
|
||||
&VarSize,
|
||||
&SystemConfiguration
|
||||
);
|
||||
if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)) {
|
||||
//The setup variable is corrupted
|
||||
VarSize = sizeof(SYSTEM_CONFIGURATION);
|
||||
Status = Variable->GetVariable(
|
||||
Variable,
|
||||
L"SetupRecovery",
|
||||
&gEfiSetupVariableGuid,
|
||||
@@ -386,16 +399,16 @@ SetPlatformBootMode (
|
||||
|
||||
ZeroMem(&PlatformSetupId, sizeof (EFI_PLATFORM_SETUP_ID));
|
||||
|
||||
CopyMem (&PlatformSetupId.SetupGuid,
|
||||
&gEfiNormalSetupGuid,
|
||||
CopyMem (&PlatformSetupId.SetupGuid,
|
||||
&gEfiNormalSetupGuid,
|
||||
sizeof (EFI_GUID));
|
||||
|
||||
if (CheckIfRecoveryMode(PeiServices, PlatformInfoHob)) {
|
||||
//
|
||||
// Recovery mode
|
||||
//
|
||||
CopyMem (&PlatformSetupId.SetupName,
|
||||
SAFE_SETUP_NAME,
|
||||
CopyMem (&PlatformSetupId.SetupName,
|
||||
&NORMAL_SETUP_NAME,
|
||||
StrSize (NORMAL_SETUP_NAME));
|
||||
PlatformSetupId.PlatformBootMode = PLATFORM_RECOVERY_MODE;
|
||||
} else if (CheckIfSafeMode(PeiServices, PlatformInfoHob)) {
|
||||
|
Reference in New Issue
Block a user