diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-01-10 05:56:55 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-01-10 05:56:55 +0000 |
commit | b452ca899292ebe8fae8252fbb2a2a06072e8fe3 (patch) | |
tree | 93fc3b39ea026a6d500feea8de6013699edc0b8e /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint | |
parent | 3a4ddfc564d9b599d408a7d2d7992a51a5100e22 (diff) | |
download | edk2-platforms-b452ca899292ebe8fae8252fbb2a2a06072e8fe3.tar.xz |
Enhance BDS to support Boot/Driver option whose option number >= 0xFF.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11242 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint')
5 files changed, 57 insertions, 61 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c index 48035298d3..6e15e096a6 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c @@ -1,7 +1,7 @@ /** @file
The functions for Boot Maintainence Main menu.
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -678,11 +678,11 @@ ApplyChangeHandler ( case FORM_BOOT_DEL_ID:
for (Index = 0;
- ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (CurrentFakeNVMap->BootOptionDel) / sizeof (UINT8))));
+ ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (CurrentFakeNVMap->OptionDel) / sizeof (CurrentFakeNVMap->OptionDel[0]))));
Index ++) {
NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index);
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
- NewLoadContext->Deleted = CurrentFakeNVMap->BootOptionDel[Index];
+ NewLoadContext->Deleted = CurrentFakeNVMap->OptionDel[Index];
}
Var_DelBootOption ();
@@ -690,11 +690,11 @@ ApplyChangeHandler ( case FORM_DRV_DEL_ID:
for (Index = 0;
- ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (CurrentFakeNVMap->DriverOptionDel) / sizeof (UINT8))));
+ ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (CurrentFakeNVMap->OptionDel) / sizeof (CurrentFakeNVMap->OptionDel[0]))));
Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&DriverOptionMenu, Index);
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
- NewLoadContext->Deleted = CurrentFakeNVMap->DriverOptionDel[Index];
+ NewLoadContext->Deleted = CurrentFakeNVMap->OptionDel[Index];
}
Var_DelDriverOption ();
@@ -757,14 +757,14 @@ ApplyChangeHandler ( for (Index = 0; Index < ConsoleInpMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleInpMenu, Index);
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
- ASSERT (Index < MAX_MENU_NUMBER);
+ ASSERT (Index < MAX_MENU_NUMBER);
NewConsoleContext->IsActive = CurrentFakeNVMap->ConsoleCheck[Index];
}
for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- ASSERT (Index + ConsoleInpMenu.MenuNumber < MAX_MENU_NUMBER);
+ ASSERT (Index + ConsoleInpMenu.MenuNumber < MAX_MENU_NUMBER);
NewTerminalContext->IsConIn = CurrentFakeNVMap->ConsoleCheck[Index + ConsoleInpMenu.MenuNumber];
}
@@ -775,14 +775,14 @@ ApplyChangeHandler ( for (Index = 0; Index < ConsoleOutMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleOutMenu, Index);
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
- ASSERT (Index < MAX_MENU_NUMBER);
+ ASSERT (Index < MAX_MENU_NUMBER);
NewConsoleContext->IsActive = CurrentFakeNVMap->ConsoleCheck[Index];
}
for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- ASSERT (Index + ConsoleOutMenu.MenuNumber < MAX_MENU_NUMBER);
+ ASSERT (Index + ConsoleOutMenu.MenuNumber < MAX_MENU_NUMBER);
NewTerminalContext->IsConOut = CurrentFakeNVMap->ConsoleCheck[Index + ConsoleOutMenu.MenuNumber];
}
@@ -793,14 +793,14 @@ ApplyChangeHandler ( for (Index = 0; Index < ConsoleErrMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleErrMenu, Index);
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
- ASSERT (Index < MAX_MENU_NUMBER);
+ ASSERT (Index < MAX_MENU_NUMBER);
NewConsoleContext->IsActive = CurrentFakeNVMap->ConsoleCheck[Index];
}
for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- ASSERT (Index + ConsoleErrMenu.MenuNumber < MAX_MENU_NUMBER);
+ ASSERT (Index + ConsoleErrMenu.MenuNumber < MAX_MENU_NUMBER);
NewTerminalContext->IsStdErr = CurrentFakeNVMap->ConsoleCheck[Index + ConsoleErrMenu.MenuNumber];
}
@@ -850,20 +850,20 @@ DiscardChangeHandler ( switch (Private->BmmPreviousPageId) {
case FORM_BOOT_CHG_ID:
case FORM_DRV_CHG_ID:
- CopyMem (CurrentFakeNVMap->OptionOrder, Private->BmmOldFakeNVData.OptionOrder, 100);
+ CopyMem (CurrentFakeNVMap->OptionOrder, Private->BmmOldFakeNVData.OptionOrder, sizeof (CurrentFakeNVMap->OptionOrder));
break;
case FORM_BOOT_DEL_ID:
- ASSERT (BootOptionMenu.MenuNumber <= (sizeof (CurrentFakeNVMap->BootOptionDel) / sizeof (CurrentFakeNVMap->BootOptionDel[0])));
+ ASSERT (BootOptionMenu.MenuNumber <= (sizeof (CurrentFakeNVMap->OptionDel) / sizeof (CurrentFakeNVMap->OptionDel[0])));
for (Index = 0; Index < BootOptionMenu.MenuNumber; Index++) {
- CurrentFakeNVMap->BootOptionDel[Index] = 0x00;
+ CurrentFakeNVMap->OptionDel[Index] = FALSE;
}
break;
case FORM_DRV_DEL_ID:
- ASSERT (DriverOptionMenu.MenuNumber <= (sizeof (CurrentFakeNVMap->DriverOptionDel) / sizeof (CurrentFakeNVMap->DriverOptionDel[0])));
+ ASSERT (DriverOptionMenu.MenuNumber <= (sizeof (CurrentFakeNVMap->OptionDel) / sizeof (CurrentFakeNVMap->OptionDel[0])));
for (Index = 0; Index < DriverOptionMenu.MenuNumber; Index++) {
- CurrentFakeNVMap->DriverOptionDel[Index] = 0x00;
+ CurrentFakeNVMap->OptionDel[Index] = FALSE;
}
break;
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h index 673324475c..bd74fd2a6b 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h @@ -1,7 +1,7 @@ /** @file
Header file for boot maintenance module.
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -189,9 +189,7 @@ typedef enum _FILE_EXPLORER_DISPLAY_CONTEXT { #define CON_MODE_VAR_OFFSET VAR_OFFSET (ConsoleOutMode)
#define CON_DEVICE_VAR_OFFSET VAR_OFFSET (ConsoleCheck)
#define OPTION_ORDER_VAR_OFFSET VAR_OFFSET (OptionOrder)
-#define DRIVER_OPTION_ORDER_VAR_OFFSET VAR_OFFSET (DriverOptionToBeDeleted)
-#define BOOT_OPTION_DEL_VAR_OFFSET VAR_OFFSET (BootOptionDel)
-#define DRIVER_OPTION_DEL_VAR_OFFSET VAR_OFFSET (DriverOptionDel)
+#define OPTION_DEL_VAR_OFFSET VAR_OFFSET (OptionDel)
#define DRIVER_ADD_OPTION_VAR_OFFSET VAR_OFFSET (DriverAddHandleOptionalData)
#define COM_BAUD_RATE_VAR_OFFSET VAR_OFFSET (COMBaudRate)
#define COM_DATA_RATE_VAR_OFFSET VAR_OFFSET (COMDataRate)
@@ -228,9 +226,7 @@ typedef enum _FILE_EXPLORER_DISPLAY_CONTEXT { #define CON_MODE_QUESTION_ID QUESTION_ID (ConsoleOutMode)
#define CON_DEVICE_QUESTION_ID QUESTION_ID (ConsoleCheck)
#define OPTION_ORDER_QUESTION_ID QUESTION_ID (OptionOrder)
-#define DRIVER_OPTION_ORDER_QUESTION_ID QUESTION_ID (DriverOptionToBeDeleted)
-#define BOOT_OPTION_DEL_QUESTION_ID QUESTION_ID (BootOptionDel)
-#define DRIVER_OPTION_DEL_QUESTION_ID QUESTION_ID (DriverOptionDel)
+#define OPTION_DEL_QUESTION_ID QUESTION_ID (OptionDel)
#define DRIVER_ADD_OPTION_QUESTION_ID QUESTION_ID (DriverAddHandleOptionalData)
#define COM_BAUD_RATE_QUESTION_ID QUESTION_ID (COMBaudRate)
#define COM_DATA_RATE_QUESTION_ID QUESTION_ID (COMDataRate)
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h index 948b5e95b2..71c59762d7 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h @@ -1,7 +1,7 @@ /** @file
Formset guids, form id and VarStore data structure for Boot Maintenance Manager.
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -147,15 +147,15 @@ typedef struct { //
// Boot or Driver Option Order storage
+ // The value is the OptionNumber+1 because the order list value cannot be 0
+ // Use UINT32 to hold the potential value 0xFFFF+1=0x10000
//
- UINT8 OptionOrder[MAX_MENU_NUMBER];
- UINT8 DriverOptionToBeDeleted[MAX_MENU_NUMBER];
+ UINT32 OptionOrder[MAX_MENU_NUMBER];
//
- // Boot Option Delete storage
+ // Boot or Driver Option Delete storage
//
- UINT8 BootOptionDel[MAX_MENU_NUMBER];
- UINT8 DriverOptionDel[MAX_MENU_NUMBER];
+ BOOLEAN OptionDel[MAX_MENU_NUMBER];
//
// This is the Terminal Attributes value storage
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c index f83d166bb3..24a444d24f 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c @@ -254,7 +254,7 @@ UpdateBootDelPage ( UpdatePageStart (CallbackData);
CreateMenuStringToken (CallbackData, CallbackData->BmmHiiHandle, &BootOptionMenu);
- ASSERT (BootOptionMenu.MenuNumber <= (sizeof (CallbackData->BmmFakeNvData.BootOptionDel) / sizeof (CallbackData->BmmFakeNvData.BootOptionDel[0])));
+ ASSERT (BootOptionMenu.MenuNumber <= (sizeof (CallbackData->BmmFakeNvData.OptionDel) / sizeof (CallbackData->BmmFakeNvData.OptionDel[0])));
for (Index = 0; Index < BootOptionMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index);
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
@@ -263,13 +263,13 @@ UpdateBootDelPage ( }
NewLoadContext->Deleted = FALSE;
- CallbackData->BmmFakeNvData.BootOptionDel[Index] = 0x00;
+ CallbackData->BmmFakeNvData.OptionDel[Index] = FALSE;
HiiCreateCheckBoxOpCode (
mStartOpCodeHandle,
- (EFI_QUESTION_ID) (BOOT_OPTION_DEL_QUESTION_ID + Index),
+ (EFI_QUESTION_ID) (OPTION_DEL_QUESTION_ID + Index),
VARSTORE_ID_BOOT_MAINT,
- (UINT16) (BOOT_OPTION_DEL_VAR_OFFSET + Index),
+ (UINT16) (OPTION_DEL_VAR_OFFSET + Index),
NewMenuEntry->DisplayStringToken,
NewMenuEntry->HelpStringToken,
0,
@@ -337,19 +337,19 @@ UpdateDrvDelPage ( CreateMenuStringToken (CallbackData, CallbackData->BmmHiiHandle, &DriverOptionMenu);
- ASSERT (DriverOptionMenu.MenuNumber <= (sizeof (CallbackData->BmmFakeNvData.DriverOptionDel) / sizeof (CallbackData->BmmFakeNvData.DriverOptionDel[0])));
+ ASSERT (DriverOptionMenu.MenuNumber <= (sizeof (CallbackData->BmmFakeNvData.OptionDel) / sizeof (CallbackData->BmmFakeNvData.OptionDel[0])));
for (Index = 0; Index < DriverOptionMenu.MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&DriverOptionMenu, Index);
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
NewLoadContext->Deleted = FALSE;
- CallbackData->BmmFakeNvData.DriverOptionDel[Index] = 0x00;
+ CallbackData->BmmFakeNvData.OptionDel[Index] = FALSE;
HiiCreateCheckBoxOpCode (
mStartOpCodeHandle,
- (EFI_QUESTION_ID) (DRIVER_OPTION_DEL_QUESTION_ID + Index),
+ (EFI_QUESTION_ID) (OPTION_DEL_QUESTION_ID + Index),
VARSTORE_ID_BOOT_MAINT,
- (UINT16) (DRIVER_OPTION_DEL_VAR_OFFSET + Index),
+ (UINT16) (OPTION_DEL_VAR_OFFSET + Index),
NewMenuEntry->DisplayStringToken,
NewMenuEntry->HelpStringToken,
0,
@@ -545,7 +545,7 @@ UpdateOrderPage ( CreateMenuStringToken (CallbackData, CallbackData->BmmHiiHandle, OptionMenu);
- ZeroMem (CallbackData->BmmFakeNvData.OptionOrder, 100);
+ ZeroMem (CallbackData->BmmFakeNvData.OptionOrder, sizeof (CallbackData->BmmFakeNvData.OptionOrder));
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
@@ -557,7 +557,7 @@ UpdateOrderPage ( (Index <
(
sizeof (CallbackData->BmmFakeNvData.OptionOrder) /
- sizeof (UINT8)
+ sizeof (CallbackData->BmmFakeNvData.OptionOrder[0])
)
)
);
@@ -568,10 +568,10 @@ UpdateOrderPage ( OptionsOpCodeHandle,
NewMenuEntry->DisplayStringToken,
0,
- EFI_IFR_NUMERIC_SIZE_1,
- (UINT8) (NewMenuEntry->OptionNumber + 1)
+ EFI_IFR_TYPE_NUM_SIZE_32,
+ (UINT32) (NewMenuEntry->OptionNumber + 1)
);
- CallbackData->BmmFakeNvData.OptionOrder[Index] = (UINT8) (NewMenuEntry->OptionNumber + 1);
+ CallbackData->BmmFakeNvData.OptionOrder[Index] = (UINT32) (NewMenuEntry->OptionNumber + 1);
}
if (OptionMenu->MenuNumber > 0) {
@@ -584,7 +584,7 @@ UpdateOrderPage ( STRING_TOKEN (STR_CHANGE_ORDER), // Question help text
0, // Question flag
0, // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET
- EFI_IFR_NUMERIC_SIZE_1, // Data type of Question value
+ EFI_IFR_TYPE_NUM_SIZE_32, // Data type of Question value
100, // Maximum container
OptionsOpCodeHandle, // Option Opcode list
NULL // Default Opcode is NULL
@@ -598,7 +598,7 @@ UpdateOrderPage ( CopyMem (
CallbackData->BmmOldFakeNVData.OptionOrder,
CallbackData->BmmFakeNvData.OptionOrder,
- 100
+ sizeof (CallbackData->BmmOldFakeNVData.OptionOrder)
);
}
@@ -641,7 +641,7 @@ UpdateBootNextPage ( OptionsOpCodeHandle,
NewMenuEntry->DisplayStringToken,
EFI_IFR_OPTION_DEFAULT,
- EFI_IFR_NUMERIC_SIZE_2,
+ EFI_IFR_TYPE_NUM_SIZE_16,
Index
);
CallbackData->BmmFakeNvData.BootNext = Index;
@@ -650,7 +650,7 @@ UpdateBootNextPage ( OptionsOpCodeHandle,
NewMenuEntry->DisplayStringToken,
0,
- EFI_IFR_NUMERIC_SIZE_2,
+ EFI_IFR_TYPE_NUM_SIZE_16,
Index
);
}
@@ -661,7 +661,7 @@ UpdateBootNextPage ( OptionsOpCodeHandle,
STRING_TOKEN (STR_NONE),
EFI_IFR_OPTION_DEFAULT,
- EFI_IFR_NUMERIC_SIZE_2,
+ EFI_IFR_TYPE_NUM_SIZE_16,
Index
);
} else {
@@ -669,7 +669,7 @@ UpdateBootNextPage ( OptionsOpCodeHandle,
STRING_TOKEN (STR_NONE),
0,
- EFI_IFR_NUMERIC_SIZE_2,
+ EFI_IFR_TYPE_NUM_SIZE_16,
Index
);
}
@@ -715,7 +715,7 @@ UpdateTimeOutPage ( DefaultOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (DefaultOpCodeHandle != NULL);
- HiiCreateDefaultOpCode (DefaultOpCodeHandle, EFI_HII_DEFAULT_CLASS_STANDARD, EFI_IFR_NUMERIC_SIZE_2, BootTimeOut);
+ HiiCreateDefaultOpCode (DefaultOpCodeHandle, EFI_HII_DEFAULT_CLASS_STANDARD, EFI_IFR_TYPE_NUM_SIZE_16, BootTimeOut);
HiiCreateNumericOpCode (
mStartOpCodeHandle,
@@ -823,7 +823,7 @@ UpdateConModePage ( OptionsOpCodeHandle,
ModeToken[Index],
EFI_IFR_OPTION_DEFAULT,
- EFI_IFR_NUMERIC_SIZE_2,
+ EFI_IFR_TYPE_NUM_SIZE_16,
(UINT16) Mode
);
} else {
@@ -831,7 +831,7 @@ UpdateConModePage ( OptionsOpCodeHandle,
ModeToken[Index],
0,
- EFI_IFR_NUMERIC_SIZE_2,
+ EFI_IFR_TYPE_NUM_SIZE_16,
(UINT16) Mode
);
}
@@ -905,7 +905,7 @@ UpdateTerminalPage ( OptionsOpCodeHandle,
BaudRateList[Index].StringToken,
CheckFlags,
- EFI_IFR_NUMERIC_SIZE_1,
+ EFI_IFR_TYPE_NUM_SIZE_8,
Index
);
}
@@ -940,7 +940,7 @@ UpdateTerminalPage ( OptionsOpCodeHandle,
DataBitsList[Index].StringToken,
CheckFlags,
- EFI_IFR_NUMERIC_SIZE_1,
+ EFI_IFR_TYPE_NUM_SIZE_8,
Index
);
}
@@ -974,7 +974,7 @@ UpdateTerminalPage ( OptionsOpCodeHandle,
ParityList[Index].StringToken,
CheckFlags,
- EFI_IFR_NUMERIC_SIZE_1,
+ EFI_IFR_TYPE_NUM_SIZE_8,
Index
);
}
@@ -1008,7 +1008,7 @@ UpdateTerminalPage ( OptionsOpCodeHandle,
StopBitsList[Index].StringToken,
CheckFlags,
- EFI_IFR_NUMERIC_SIZE_1,
+ EFI_IFR_TYPE_NUM_SIZE_8,
Index
);
}
@@ -1041,7 +1041,7 @@ UpdateTerminalPage ( OptionsOpCodeHandle,
(EFI_STRING_ID) TerminalType[Index],
CheckFlags,
- EFI_IFR_NUMERIC_SIZE_1,
+ EFI_IFR_TYPE_NUM_SIZE_8,
Index
);
}
@@ -1317,7 +1317,7 @@ UpdateSetLegacyDeviceOrderPage ( OptionsOpCodeHandle,
NewMenuEntry->DisplayStringToken,
(UINT8) ((Index == 0) ? EFI_IFR_OPTION_DEFAULT : 0),
- EFI_IFR_NUMERIC_SIZE_1,
+ EFI_IFR_TYPE_NUM_SIZE_8,
(UINT8) ((BM_LEGACY_DEVICE_CONTEXT *) NewMenuEntry->VariableContext)->Index
);
}
@@ -1329,7 +1329,7 @@ UpdateSetLegacyDeviceOrderPage ( OptionsOpCodeHandle,
STRING_TOKEN (STR_DISABLE_LEGACY_DEVICE),
0,
- EFI_IFR_NUMERIC_SIZE_1,
+ EFI_IFR_TYPE_NUM_SIZE_8,
0xFF
);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c index c7d6bc4ad1..f476b40803 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c @@ -1,7 +1,7 @@ /** @file
Variable operation that will be used by bootmaint
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1050,8 +1050,8 @@ Var_UpdateDriverOrder ( FreePool (DriverOrderList);
}
- ASSERT (DriverOrderListSize <= (sizeof (CallbackData->BmmFakeNvData.OptionOrder) / sizeof (CallbackData->BmmFakeNvData.OptionOrder[0])));
- for (Index = 0; Index < DriverOrderListSize; Index++) {
+ ASSERT (DriverOptionMenu.MenuNumber <= (sizeof (CallbackData->BmmFakeNvData.OptionOrder) / sizeof (CallbackData->BmmFakeNvData.OptionOrder[0])));
+ for (Index = 0; Index < DriverOptionMenu.MenuNumber; Index++) {
NewDriverOrderList[Index] = (UINT16) (CallbackData->BmmFakeNvData.OptionOrder[Index] - 1);
}
|