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

@@ -17,6 +17,8 @@ Module Name:
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@@ -306,7 +308,7 @@ SystemConfigRouteConfig (
Private->BackupNvData.ReservedO = Private->FakeNvData.ReservedO;
LoadLpssDefaultValues (Private);
//
//
// Pass changed uncommitted data back to Form Browser
//
HiiSetBrowserData (&mSystemConfigGuid, mVariableName, sizeof (SYSTEM_CONFIGURATION), (UINT8 *) FakeNvData, NULL);
@@ -358,6 +360,7 @@ SystemConfigCallback (
{
EFI_CALLBACK_INFO *Private;
SYSTEM_CONFIGURATION *FakeNvData;
SYSTEM_CONFIGURATION *SetupData;
UINTN SizeOfNvStore;
EFI_INPUT_KEY Key;
CHAR16 *StringBuffer1;
@@ -474,7 +477,7 @@ SystemConfigCallback (
FakeNvData = &Private->FakeNvData;
Status = HiiGetBrowserData (
&mSystemConfigGuid,
&mSystemConfigGuid,
mVariableName,
sizeof (SYSTEM_CONFIGURATION),
(UINT8 *) FakeNvData
@@ -525,7 +528,7 @@ SystemConfigCallback (
FakeNvData = &Private->FakeNvData;
Status = HiiGetBrowserData (
&mSystemConfigGuid,
&mSystemConfigGuid,
mVariableName,
sizeof (SYSTEM_CONFIGURATION),
(UINT8 *) FakeNvData
@@ -596,33 +599,31 @@ SystemConfigCallback (
//
StrCpy (StringBuffer1, L"Do you want to load setup defaults and Exit?");
StrCpy (StringBuffer2, L" Enter (YES) / Esc (NO) ");
do {
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL);
do {
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL);
} while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN));
//
// If the user hits the YES Response key
//
if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {
if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {
//
// Load default
//
FakeNvData = AllocateZeroPool (sizeof(SYSTEM_CONFIGURATION));
if (FakeNvData == NULL) {
return EFI_OUT_OF_RESOURCES;
}
Status = gBS->LocateProtocol (&gEdkiiFormBrowserEx2ProtocolGuid, NULL, (VOID **) &FormBrowserEx2);
FormBrowserEx2->ExecuteAction(BROWSER_ACTION_DEFAULT, EFI_HII_DEFAULT_CLASS_STANDARD);
FakeNvData = AllocateZeroPool (sizeof(SYSTEM_CONFIGURATION));
if (FakeNvData == NULL) {
return EFI_OUT_OF_RESOURCES;
}
SizeOfNvStore = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
L"SetupDefault",
&mNormalSetupGuid,
NULL,
&SizeOfNvStore,
FakeNvData
);
if (!EFI_ERROR (Status)) {
Status = HiiGetBrowserData (
&mSystemConfigGuid,
mVariableName,
sizeof (SYSTEM_CONFIGURATION),
(UINT8 *) FakeNvData
);
if (!EFI_ERROR (Status)) {
Status = gRT->SetVariable (