diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-10-17 14:32:51 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-10-19 11:37:52 +0800 |
commit | 2c30541a197b2204f941bfa47a01dc4d4d57ab5a (patch) | |
tree | dfba21f19209d407a5a7796ca7e3e4b975d5defe /MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c | |
parent | 7880f73a8e89f482c61e181861997331baf37857 (diff) | |
download | edk2-platforms-2c30541a197b2204f941bfa47a01dc4d4d57ab5a.tar.xz |
MdeModulePkg/BMMUI: Show "Change Boot/Driver order" page correctly
When user enter the "Change Boot Order" page, the BootOptionOrder in
BmmFakeNvData may maintain some uncommitted data which are not saved
in "BootOrder" Variable and BootOptionMenu. So we should not always get
the BootOptionOrder through the function GetBootOrder, it will
result in incorrect UI behaviors. When the BootOptionOrder has not been
saved, we should use the BootOptionOrder in current BmmFakeNvData.
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c')
-rw-r--r-- | MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c index 29d3ac9a47..8194979477 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c @@ -585,14 +585,30 @@ UpdateOrderPage ( switch (UpdatePageId) {
case FORM_BOOT_CHG_ID:
- GetBootOrder (CallbackData);
+ //
+ // If the BootOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData,
+ // means all Boot Options has been save in BootOptionMenu, we can get the date from the menu.
+ // else means browser maintains some uncommitted date which are not saved in BootOptionMenu,
+ // so we should not get the data from BootOptionMenu to show it.
+ //
+ if (CompareMem (CallbackData->BmmFakeNvData.BootOptionOrder, CallbackData->BmmOldFakeNVData.BootOptionOrder, sizeof (CallbackData->BmmFakeNvData.BootOptionOrder)) == 0) {
+ GetBootOrder (CallbackData);
+ }
OptionOrder = CallbackData->BmmFakeNvData.BootOptionOrder;
QuestionId = BOOT_OPTION_ORDER_QUESTION_ID;
VarOffset = BOOT_OPTION_ORDER_VAR_OFFSET;
break;
case FORM_DRV_CHG_ID:
- GetDriverOrder (CallbackData);
+ //
+ // If the DriverOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData,
+ // means all Driver Options has been save in DriverOptionMenu, we can get the DriverOptionOrder from the menu.
+ // else means browser maintains some uncommitted date which are not saved in DriverOptionMenu,
+ // so we should not get the data from DriverOptionMenu to show it.
+ //
+ if (CompareMem (CallbackData->BmmFakeNvData.DriverOptionOrder, CallbackData->BmmOldFakeNVData.DriverOptionOrder, sizeof (CallbackData->BmmFakeNvData.DriverOptionOrder)) == 0) {
+ GetDriverOrder (CallbackData);
+ }
OptionOrder = CallbackData->BmmFakeNvData.DriverOptionOrder;
QuestionId = DRIVER_OPTION_ORDER_QUESTION_ID;
VarOffset = DRIVER_OPTION_ORDER_VAR_OFFSET;
|