diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c index 656106fc24..a30f5f1bbf 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c @@ -123,6 +123,18 @@ BmmCreateTimeOutMenu ( IN VOID *StartOpCodeHandle ) { + VOID *DefaultOpCodeHandle; + + DefaultOpCodeHandle = HiiAllocateOpCodeHandle (); + ASSERT (DefaultOpCodeHandle != NULL); + + HiiCreateDefaultOpCode ( + DefaultOpCodeHandle, + EFI_HII_DEFAULT_CLASS_STANDARD, + EFI_IFR_TYPE_NUM_SIZE_16, + PcdGet16 (PcdPlatformBootTimeOut) + ); + HiiCreateNumericOpCode ( StartOpCodeHandle, (EFI_QUESTION_ID) FORM_TIME_OUT_ID, @@ -135,8 +147,10 @@ BmmCreateTimeOutMenu ( 0, 65535, 0, - NULL + DefaultOpCodeHandle ); + + HiiFreeOpCodeHandle (DefaultOpCodeHandle); } /**