/** @file\r
The functions for Boot Maintainence Main menu.\r
\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
{\r
END_DEVICE_PATH_TYPE,\r
END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
- { \r
+ {\r
(UINT8) (END_DEVICE_PATH_LENGTH),\r
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
}\r
\r
/**\r
This function will change video resolution and text mode\r
- according to defined setup mode or defined boot mode \r
+ according to defined setup mode or defined boot mode\r
\r
- @param IsSetupMode Indicate mode is changed to setup mode or boot mode. \r
+ @param IsSetupMode Indicate mode is changed to setup mode or boot mode.\r
\r
@retval EFI_SUCCESS Mode is changed successfully.\r
@retval Others Mode failed to be changed.\r
EFI_STATUS Status;\r
UINTN Index;\r
UINTN CurrentColumn;\r
- UINTN CurrentRow; \r
+ UINTN CurrentRow;\r
\r
MaxGopMode = 0;\r
MaxTextMode = 0;\r
\r
//\r
- // Get current video resolution and text mode \r
+ // Get current video resolution and text mode\r
//\r
Status = gBS->HandleProtocol (\r
gST->ConsoleOutHandle,\r
);\r
if (EFI_ERROR (Status)) {\r
SimpleTextOut = NULL;\r
- } \r
+ }\r
\r
if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) {\r
return EFI_UNSUPPORTED;\r
NewHorizontalResolution = mBmmBootHorizontalResolution;\r
NewVerticalResolution = mBmmBootVerticalResolution;\r
NewColumns = mBmmBootTextModeColumn;\r
- NewRows = mBmmBootTextModeRow; \r
+ NewRows = mBmmBootTextModeRow;\r
}\r
\r
if (GraphicsOutput != NULL) {\r
MaxGopMode = GraphicsOutput->Mode->MaxMode;\r
- } \r
+ }\r
\r
if (SimpleTextOut != NULL) {\r
MaxTextMode = SimpleTextOut->Mode->MaxMode;\r
\r
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
@param[in] Configuration A null-terminated Unicode string in\r
- <ConfigString> format. \r
+ <ConfigString> format.\r
@param[out] Progress A pointer to a string filled in with the\r
offset of the most recent '&' before the\r
first failing name / value pair (or the\r
successful.\r
\r
@retval EFI_SUCCESS The results have been distributed or are\r
- awaiting distribution. \r
+ awaiting distribution.\r
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the\r
parts of the results that must be\r
stored awaiting possible future\r
}\r
\r
Status = gBS->LocateProtocol (\r
- &gEfiHiiConfigRoutingProtocolGuid, \r
- NULL, \r
+ &gEfiHiiConfigRoutingProtocolGuid,\r
+ NULL,\r
(VOID **)&ConfigRouting\r
);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
\r
- Private = BMM_CALLBACK_DATA_FROM_THIS (This); \r
+ Private = BMM_CALLBACK_DATA_FROM_THIS (This);\r
//\r
// Get Buffer Storage data from EFI variable\r
//\r
&BufferSize,\r
Progress\r
);\r
- ASSERT_EFI_ERROR (Status); \r
+ ASSERT_EFI_ERROR (Status);\r
//\r
- // Compare new and old BMM configuration data and only do action for modified item to \r
+ // Compare new and old BMM configuration data and only do action for modified item to\r
// avoid setting unnecessary non-volatile variable\r
//\r
\r
//\r
// Check data which located in BMM main page and save the settings if need\r
- // \r
+ //\r
if (CompareMem (&NewBmmData->BootNext, &OldBmmData->BootNext, sizeof (NewBmmData->BootNext)) != 0) {\r
Status = Var_UpdateBootNext (Private);\r
if (EFI_ERROR (Status)) {\r
\r
//\r
// Check data which located in Boot Options Menu and save the settings if need\r
- // \r
- if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) { \r
- for (Index = 0; \r
- ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0])))); \r
+ //\r
+ if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) {\r
+ for (Index = 0;\r
+ ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0]))));\r
Index ++) {\r
NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index);\r
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;\r
\r
//\r
// Check data which located in Driver Options Menu and save the settings if need\r
- // \r
- if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) { \r
- for (Index = 0; \r
- ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0])))); \r
+ //\r
+ if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) {\r
+ for (Index = 0;\r
+ ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0]))));\r
Index++) {\r
NewMenuEntry = BOpt_GetMenuEntry (&DriverOptionMenu, Index);\r
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;\r
}\r
}\r
\r
- if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) { \r
+ if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) {\r
Status = Var_UpdateDriverOrder (Private);\r
if (EFI_ERROR (Status)) {\r
Offset = OFFSET_OF (BMM_FAKE_NV_DATA, DriverOptionOrder);\r
// 2. Re-scan the BootOption menus (including the legacy boot option).\r
//\r
CustomizeMenus ();\r
+ EfiBootManagerRefreshAllBootOption ();\r
BOpt_GetBootOptions (Private);\r
mFirstEnterBMMForm = TRUE;\r
}\r
if (Value == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
UpdatePageId (Private, QuestionId);\r
\r
if (QuestionId < FILE_OPTION_OFFSET) {\r
if (QuestionId < CONFIG_OPTION_OFFSET) {\r
switch (QuestionId) {\r
case FORM_BOOT_ADD_ID:\r
- // Leave BMM and enter FileExplorer. \r
+ // Leave BMM and enter FileExplorer.\r
ChooseFile (NULL, L".efi", CreateBootOptionFromFile, &File);\r
break;\r
\r
if ((Value == NULL) || (ActionRequest == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT) {\r
CleanUselessBeforeSubmit (Private);\r
CurrentFakeNVMap->BootOptionChanged = FALSE;\r
CurrentFakeNVMap->BootOptionChanged = TRUE;\r
} else if (QuestionId == KEY_VALUE_DRIVER_DESCRIPTION || QuestionId == KEY_VALUE_DRIVER_OPTION) {\r
CurrentFakeNVMap->DriverOptionChanged = TRUE;\r
- } \r
+ }\r
\r
if ((QuestionId >= BOOT_OPTION_DEL_QUESTION_ID) && (QuestionId < BOOT_OPTION_DEL_QUESTION_ID + MAX_MENU_NUMBER)) {\r
if (Value->b){\r
} else if ((QuestionId >= CON_OUT_DEVICE_QUESTION_ID) && (QuestionId < CON_OUT_DEVICE_QUESTION_ID + MAX_MENU_NUMBER)) {\r
UpdateConsoleContent (L"ConOut", CurrentFakeNVMap);\r
} else if ((QuestionId >= CON_ERR_DEVICE_QUESTION_ID) && (QuestionId < CON_ERR_DEVICE_QUESTION_ID + MAX_MENU_NUMBER)) {\r
- UpdateConsoleContent (L"ConErr", CurrentFakeNVMap);\r
+ UpdateConsoleContent (L"ErrOut", CurrentFakeNVMap);\r
}\r
}\r
\r
Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &mBmmCallbackInfo->FormBrowser2);\r
ASSERT_EFI_ERROR (Status);\r
\r
- EfiBootManagerRefreshAllBootOption ();\r
-\r
//\r
// Create LoadOption in BmmCallbackInfo for Driver Callback\r
//\r
\r
CreateUpdateData();\r
//\r
- // Update boot maintenance manager page \r
+ // Update boot maintenance manager page\r
//\r
InitializeBmmConfig(mBmmCallbackInfo);\r
\r