* [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly
@ 2016-10-28 2:32 Dandan Bi
2016-10-31 3:06 ` Dong, Eric
0 siblings, 1 reply; 2+ messages in thread
From: Dandan Bi @ 2016-10-28 2:32 UTC (permalink / raw)
To: edk2-devel; +Cc: Eric Dong
Some boot options may be deleted in the "Delete Boot Option page",
But the data BootOptionOrder in BmmFakeNvData may not be updated.
So when user enter the "Change Boot Order" page, we should not always
get the BootOptionOrder in BmmFakeNvData, it will result in incorrect
UI behaviors. When the Boot Options have been saved,
we should get the BootOptionOrder through function GetBootOrder.
For driver option codes need to do the same change.
This patch is to fix the issue in bugzilla:
https://bugzilla.tianocore.org/show_bug.cgi?id=39
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
.../Universal/BdsDxe/BootMaint/UpdatePage.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
index b13ed11..b7fee3a 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
@@ -1,9 +1,9 @@
/** @file
Dynamically update the pages.
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, 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
http://opensource.org/licenses/bsd-license.php
@@ -557,18 +557,34 @@ UpdateOrderPage (
QuestionId = 0;
VarOffset = 0;
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;
break;
}
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly
2016-10-28 2:32 [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly Dandan Bi
@ 2016-10-31 3:06 ` Dong, Eric
0 siblings, 0 replies; 2+ messages in thread
From: Dong, Eric @ 2016-10-31 3:06 UTC (permalink / raw)
To: Bi, Dandan, edk2-devel@lists.01.org
Reviewed-by: Eric Dong <eric.dong@intel.com>
> -----Original Message-----
> From: Bi, Dandan
> Sent: Friday, October 28, 2016 10:33 AM
> To: edk2-devel@lists.01.org
> Cc: Dong, Eric
> Subject: [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly
>
> Some boot options may be deleted in the "Delete Boot Option page",
> But the data BootOptionOrder in BmmFakeNvData may not be updated.
> So when user enter the "Change Boot Order" page, we should not always
> get the BootOptionOrder in BmmFakeNvData, it will result in incorrect
> UI behaviors. When the Boot Options have been saved,
> we should get the BootOptionOrder through function GetBootOrder.
>
> For driver option codes need to do the same change.
>
> This patch is to fix the issue in bugzilla:
> https://bugzilla.tianocore.org/show_bug.cgi?id=39
>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
> .../Universal/BdsDxe/BootMaint/UpdatePage.c | 22 +++++++++++++++++++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
> b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
> index b13ed11..b7fee3a 100644
> --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
> +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
> @@ -1,9 +1,9 @@
> /** @file
> Dynamically update the pages.
>
> -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2004 - 2016, 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
> http://opensource.org/licenses/bsd-license.php
>
> @@ -557,18 +557,34 @@ UpdateOrderPage (
> QuestionId = 0;
> VarOffset = 0;
> 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;
> break;
> }
> --
> 1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-31 3:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-28 2:32 [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly Dandan Bi
2016-10-31 3:06 ` Dong, Eric
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox