diff options
5 files changed, 14 insertions, 12 deletions
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c index 55c294dd73..2d52f9bac3 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c @@ -1295,7 +1295,7 @@ InitializeBmmConfig ( //
// Initialize data which located in BMM main page
//
- CallbackData->BmmFakeNvData.BootNext = (UINT16) (BootOptionMenu.MenuNumber);
+ CallbackData->BmmFakeNvData.BootNext = NONE_BOOTNEXT_VALUE;
for (Index = 0; Index < BootOptionMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index);
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManager.h b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManager.h index 6934a692a6..24526e1096 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManager.h +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManager.h @@ -233,6 +233,8 @@ typedef enum _TYPE_OF_TERMINAL { #define STRING_DEPOSITORY_NUMBER 8
+#define NONE_BOOTNEXT_VALUE (0xFFFF + 1)
+
///
/// Serial Ports attributes, first one is the value for
/// return from callback function, stringtoken is used to
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/FormGuid.h b/MdeModulePkg/Library/BootMaintenanceManagerLib/FormGuid.h index 3e1990dfc6..cf14b40083 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/FormGuid.h +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/FormGuid.h @@ -103,7 +103,7 @@ typedef struct { // for Timeout, BootNext, Variables respectively
//
UINT16 BootTimeOut;
- UINT16 BootNext;
+ UINT32 BootNext;
//
// This is the COM1 Attributes value storage
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/UpdatePage.c b/MdeModulePkg/Library/BootMaintenanceManagerLib/UpdatePage.c index 78ace0c135..cd1756aa58 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/UpdatePage.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/UpdatePage.c @@ -686,7 +686,7 @@ UpdateBootNextPage ( OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
- CallbackData->BmmFakeNvData.BootNext = (UINT16) (BootOptionMenu.MenuNumber);
+ CallbackData->BmmFakeNvData.BootNext = NONE_BOOTNEXT_VALUE;
for (Index = 0; Index < BootOptionMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index);
@@ -697,7 +697,7 @@ UpdateBootNextPage ( OptionsOpCodeHandle,
NewMenuEntry->DisplayStringToken,
EFI_IFR_OPTION_DEFAULT,
- EFI_IFR_TYPE_NUM_SIZE_16,
+ EFI_IFR_TYPE_NUM_SIZE_32,
Index
);
CallbackData->BmmFakeNvData.BootNext = Index;
@@ -706,27 +706,27 @@ UpdateBootNextPage ( OptionsOpCodeHandle,
NewMenuEntry->DisplayStringToken,
0,
- EFI_IFR_TYPE_NUM_SIZE_16,
+ EFI_IFR_TYPE_NUM_SIZE_32,
Index
);
}
}
- if (CallbackData->BmmFakeNvData.BootNext == Index) {
+ if (CallbackData->BmmFakeNvData.BootNext == NONE_BOOTNEXT_VALUE) {
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
STRING_TOKEN (STR_NONE),
EFI_IFR_OPTION_DEFAULT,
- EFI_IFR_TYPE_NUM_SIZE_16,
- Index
+ EFI_IFR_TYPE_NUM_SIZE_32,
+ NONE_BOOTNEXT_VALUE
);
} else {
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
STRING_TOKEN (STR_NONE),
0,
- EFI_IFR_TYPE_NUM_SIZE_16,
- Index
+ EFI_IFR_TYPE_NUM_SIZE_32,
+ NONE_BOOTNEXT_VALUE
);
}
@@ -738,7 +738,7 @@ UpdateBootNextPage ( STRING_TOKEN (STR_BOOT_NEXT),
STRING_TOKEN (STR_BOOT_NEXT_HELP),
0,
- EFI_IFR_NUMERIC_SIZE_2,
+ EFI_IFR_NUMERIC_SIZE_4,
OptionsOpCodeHandle,
NULL
);
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/Variable.c b/MdeModulePkg/Library/BootMaintenanceManagerLib/Variable.c index cd2da4a905..a276caed05 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/Variable.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/Variable.c @@ -868,7 +868,7 @@ Var_UpdateBootNext ( NewLoadContext->IsBootNext = FALSE;
}
- if (CurrentFakeNVMap->BootNext == BootOptionMenu.MenuNumber) {
+ if (CurrentFakeNVMap->BootNext == NONE_BOOTNEXT_VALUE) {
EfiLibDeleteVariable (L"BootNext", &gEfiGlobalVariableGuid);
return EFI_SUCCESS;
}
|