diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c index 0a8a3c3000..9933b7bdd6 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c @@ -1109,9 +1109,7 @@ BootMaintCallback ( UINTN Index; EFI_DEVICE_PATH_PROTOCOL *File; - if ((Action != EFI_BROWSER_ACTION_CHANGING) && (Action != EFI_BROWSER_ACTION_CHANGED) && - (Action != EFI_BROWSER_ACTION_FORM_OPEN) && (Action != EFI_BROWSER_ACTION_DEFAULT_STANDARD) && - (Action != EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING)) { + if ((Action != EFI_BROWSER_ACTION_CHANGING) && (Action != EFI_BROWSER_ACTION_CHANGED) && (Action != EFI_BROWSER_ACTION_FORM_OPEN)) { // // Do nothing for other UEFI Action. Only do call back when data is changed or the form is open. // @@ -1132,7 +1130,7 @@ BootMaintCallback ( // 1. Update the menus (including legacy munu) show in BootMiantenanceManager page. // 2. Re-scan the BootOption menus (including the legacy boot option). // - CustomizeMenus (); + // CustomizeMenus (); EfiBootManagerRefreshAllBootOption (); BOpt_GetBootOptions (Private); mFirstEnterBMMForm = TRUE; @@ -1147,18 +1145,6 @@ BootMaintCallback ( OldFakeNVMap = &Private->BmmOldFakeNVData; HiiGetBrowserData (&mBootMaintGuid, mBootMaintStorageName, sizeof (BMM_FAKE_NV_DATA), (UINT8 *)CurrentFakeNVMap); - if (Action == EFI_BROWSER_ACTION_DEFAULT_STANDARD || Action == EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING) { - if (Value == NULL) - return EFI_INVALID_PARAMETER; - - if (QuestionId == FORM_TIME_OUT_ID) { - CurrentFakeNVMap->BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut); - Value->u16 = PcdGet16 (PcdPlatformBootTimeOut); - } else { - return EFI_UNSUPPORTED; - } - } - if (Action == EFI_BROWSER_ACTION_CHANGING) { if (Value == NULL) { return EFI_INVALID_PARAMETER; @@ -1571,6 +1557,8 @@ InitializeBmmConfig ( GetConsoleErrCheck (CallbackData); GetTerminalAttribute (CallbackData); + CustomizeMenus(); + CallbackData->BmmFakeNvData.ForceReconnect = TRUE; // diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h index b776effba9..4018db963b 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h @@ -199,7 +199,7 @@ typedef enum _TYPE_OF_TERMINAL { #define COM1_DATA_RATE_QUESTION_ID QUESTION_ID (COM1DataRate) #define COM1_STOP_BITS_QUESTION_ID QUESTION_ID (COM1StopBits) #define COM1_PARITY_QUESTION_ID QUESTION_ID (COM1Parity) -#define COM1_TERMINAL_QUESTION_ID QUESTION_ID (COM2TerminalType) +#define COM1_TERMINAL_QUESTION_ID QUESTION_ID (COM1TerminalType) #define COM2_BAUD_RATE_QUESTION_ID QUESTION_ID (COM2BaudRate) #define COM2_DATA_RATE_QUESTION_ID QUESTION_ID (COM2DataRate) #define COM2_STOP_BITS_QUESTION_ID QUESTION_ID (COM2StopBits) diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr index 93dbf34573..69fb606324 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr @@ -40,17 +40,6 @@ formset // label LABEL_FORM_MAIN_END; - numeric varid = BmmData.BootTimeOut, - questionid = FORM_TIME_OUT_ID, - prompt = STRING_TOKEN(STR_NUM_AUTO_BOOT), - help = STRING_TOKEN(STR_HLP_AUTO_BOOT), - flags = RESET_REQUIRED | INTERACTIVE | NUMERIC_SIZE_2 | DISPLAY_UINT_DEC, - key = FORM_TIME_OUT_ID, - minimum = 0, - maximum = 65535, - step = 0, - endnumeric; - endform; form formid = FORM_BOOT_SETUP_ID, diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUi.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUi.c index a98d867ba2..d79212e75c 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUi.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUi.c @@ -58,7 +58,7 @@ UiCustomizeBMMPage ( // // Create "Time Out" menu. // - // BmmCreateTimeOutMenu (HiiHandle, StartOpCodeHandle); + BmmCreateTimeOutMenu (HiiHandle, StartOpCodeHandle); } /** diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c index 48c424c941..710d076bbc 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c @@ -125,12 +125,14 @@ BmmCreateTimeOutMenu ( DefaultOpCodeHandle = HiiAllocateOpCodeHandle (); ASSERT (DefaultOpCodeHandle != NULL); - HiiCreateDefaultOpCode ( - DefaultOpCodeHandle, - EFI_HII_DEFAULT_CLASS_STANDARD, - EFI_IFR_TYPE_NUM_SIZE_16, - PcdGet16 (PcdPlatformBootTimeOut) - ); + if (DefaultOpCodeHandle != NULL ) { + HiiCreateDefaultOpCode ( + DefaultOpCodeHandle, + EFI_HII_DEFAULT_CLASS_STANDARD, + EFI_IFR_TYPE_NUM_SIZE_16, + PcdGet16 (PcdPlatformBootTimeOut) + ); + } HiiCreateNumericOpCode ( StartOpCodeHandle, @@ -144,10 +146,12 @@ BmmCreateTimeOutMenu ( 0, 65535, 0, - DefaultOpCodeHandle + DefaultOpCodeHandle ? DefaultOpCodeHandle : NULL ); - HiiFreeOpCodeHandle (DefaultOpCodeHandle); + if (DefaultOpCodeHandle != NULL) { + HiiFreeOpCodeHandle (DefaultOpCodeHandle); + } } /**