summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2015-12-22 09:16:21 +0000
committerdandanbi <dandanbi@Edk2>2015-12-22 09:16:21 +0000
commit0034796f6c3c9526ad8487b8e4c6b9094aac56aa (patch)
tree24603f2fc709778ade089c77233acc8444f2e924
parentff3b043f76f1611325984136eef90e8cbf56f394 (diff)
downloadedk2-platforms-0034796f6c3c9526ad8487b8e4c6b9094aac56aa.tar.xz
MdeModulePkg:Update Boot Manager form when enter it.
Currently BootManager is an independent library,used by UiApp.It only load boot option when enter UiApp.So when add boot option through boot maintenance manager, it will not display in boot manager. In order to fix this issue,now we update the boot manager form every time we enter it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19440 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Library/BootManagerLib/BootManager.c16
-rw-r--r--MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr11
2 files changed, 23 insertions, 4 deletions
diff --git a/MdeModulePkg/Library/BootManagerLib/BootManager.c b/MdeModulePkg/Library/BootManagerLib/BootManager.c
index dd87250743..7a8ccfe152 100644
--- a/MdeModulePkg/Library/BootManagerLib/BootManager.c
+++ b/MdeModulePkg/Library/BootManagerLib/BootManager.c
@@ -681,6 +681,18 @@ BootManagerCallback (
EFI_BOOT_MANAGER_LOAD_OPTION *BootOption;
UINTN BootOptionCount;
EFI_INPUT_KEY Key;
+
+ if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
+ //
+ //Means enter the boot manager form.
+ //Update the boot manage page,because the boot option may changed.
+ //
+ if (QuestionId == 0x1212){
+ UpdateBootManager();
+ }
+ return EFI_SUCCESS;
+ }
+
if (Action != EFI_BROWSER_ACTION_CHANGED) {
//
// Do nothing for other UEFI Action. Only do call back when data is changed.
@@ -759,10 +771,6 @@ BootManagerLibConstructor (
);
ASSERT (gBootManagerPrivate.HiiHandle != NULL);
- //
- // Update boot manager page
- //
- UpdateBootManager ();
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr b/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr
index d3281f55ae..14c1f8fae3 100644
--- a/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr
+++ b/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr
@@ -33,6 +33,17 @@ formset
subtitle text = STRING_TOKEN(STR_LAST_STRING);
//
+ //Add this invisable text in order to indicate enter Boot Manager form.
+ //
+ suppressif TRUE;
+ text
+ help = STRING_TOKEN(STR_LAST_STRING ),
+ text = STRING_TOKEN(STR_LAST_STRING ),
+ flags = INTERACTIVE,
+ key = 0x1212;
+ endif;
+
+ //
// This is where we will dynamically add choices for the Boot Manager
//
label LABEL_BOOT_OPTION;