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:
Tim He
2015-06-11 02:50:20 +00:00
committed by timhe
parent 2a697cb579
commit 620f289162
18 changed files with 384 additions and 66 deletions

View File

@@ -322,7 +322,18 @@ GetGopDevicePath (
//
// Select display devices
//
//
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
L"Setup",
&gEfiNormalSetupGuid,
NULL,
&VarSize,
&mSystemConfiguration
);
if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)) {
//The setup variable is corrupted
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
L"SetupRecovery",
&gEfiNormalSetupGuid,
@@ -624,7 +635,18 @@ PlatformBdsForceActiveVga (
if (PlugInPciVgaDevicePath == NULL && OnboardPciVgaDevicePath == NULL) {
return EFI_UNSUPPORTED;
}
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
L"Setup",
&gEfiNormalSetupGuid,
NULL,
&VarSize,
&mSystemConfiguration
);
if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)) {
//The setup variable is corrupted
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
L"SetupRecovery",
&gEfiNormalSetupGuid,
@@ -680,7 +702,18 @@ UpdateConsoleResolution(
HorizontalResolution = PcdGet32 (PcdSetupVideoHorizontalResolution);
VerticalResolution = PcdGet32 (PcdSetupVideoVerticalResolution);
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
L"Setup",
&gEfiNormalSetupGuid,
NULL,
&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,
@@ -1576,6 +1609,11 @@ PlatformBdsPolicyBehavior (
UINTN HandleCount;
EFI_HANDLE *HandleBuffer;
UINTN Index1;
UINTN SataPciRegBase = 0;
UINT16 SataModeSelect = 0;
VOID *RegistrationExitPmAuth = NULL;
EFI_EVENT Event;
BOOLEAN IsFirstBoot;
UINT16 *BootOrder;
UINTN BootOrderSize;
@@ -1584,9 +1622,19 @@ PlatformBdsPolicyBehavior (
//we think the Timeout variable is corrupted
Timeout = 10;
}
Timeout = PcdGet16 (PcdPlatformBootTimeOut);
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
NORMAL_SETUP_NAME,
&gEfiNormalSetupGuid,
NULL,
&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,