public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Eric Dong <eric.dong@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [patch 3/3] MdeModulePkg/BMUiLib: Signal event when enter/exit setup menu
Date: Thu, 12 Apr 2018 09:31:38 +0800	[thread overview]
Message-ID: <20180412013138.113904-4-dandan.bi@intel.com> (raw)
In-Reply-To: <20180412013138.113904-1-dandan.bi@intel.com>

These changes are to support notify callbacks when enter/exit
setup menu, since some driver may need to hook setup enter/exit
points to do something.

We will signal setup enter/exit events for all setup menu
enter/exit cases.Then the module which pay attention to these
events can execute the callback.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Library/BootManagerUiLib/BootManager.c        | 7 ++++++-
 MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf | 4 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
index 8e776327883..3dd4de06b16 100644
--- a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
+++ b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
@@ -1,9 +1,9 @@
 /** @file
   The boot manager reference implementation
 
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, 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 that accompanies this distribution.
 The full text of the license may be found at
 http://opensource.org/licenses/bsd-license.php.
 
@@ -823,10 +823,14 @@ BootManagerCallback (
   // Clear  the  screen  before.
   //
   gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
   gST->ConOut->ClearScreen (gST->ConOut);
 
+  //
+  // Signal the exit setup event before reset the system or boot to another boot option.
+  //
+  EfiEventGroupSignal(&gEdkiiSetupExitGuid);
   //
   //check any reset required change is applied? if yes, reset system
   //
   BmSetupResetReminder ();
 
@@ -834,10 +838,11 @@ BootManagerCallback (
   // parse the selected option
   //
   BmSetConsoleMode (FALSE);
   EfiBootManagerBoot (&BootOption[QuestionId - 1]);
   BmSetConsoleMode (TRUE);
+  EfiEventGroupSignal(&gEdkiiSetupEnterGuid);
 
   if (EFI_ERROR (BootOption[QuestionId - 1].Status)) {
     gST->ConOut->OutputString (
                   gST->ConOut,
                   HiiGetString (gBootManagerPrivate.HiiHandle, STRING_TOKEN (STR_ANY_KEY_CONTINUE), NULL)
diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf b/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
index 7983b079493..dbe99ca7018 100644
--- a/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
+++ b/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
@@ -1,9 +1,9 @@
 ## @file
 #  Boot Manager Library used by UiApp.
 #
-#  Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2011 - 2018, 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 that accompanies this distribution.
 #  The full text of the license may be found at
 #  http://opensource.org/licenses/bsd-license.php.
 #  
@@ -50,10 +50,12 @@
   UefiBootManagerLib
 
 [Guids]
   gEfiIfrTianoGuid                              ## CONSUMES ## GUID (Extended IFR Guid Opcode)
   gEfiIfrFrontPageGuid                          ## CONSUMES ## GUID
+  gEdkiiSetupEnterGuid                          ## CONSUMES ## GUID
+  gEdkiiSetupExitGuid                           ## CONSUMES ## GUID
 
 [Protocols]
   gEfiHiiConfigAccessProtocolGuid               ## CONSUMES
   gEfiDevicePathToTextProtocolGuid              ## CONSUMES
   gEdkiiFormBrowserEx2ProtocolGuid              ## CONSUMES
-- 
2.14.3.windows.1



  parent reply	other threads:[~2018-04-12  1:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12  1:31 [patch 0/3] MdeModulePkg/UiApp: Signal event when enter/exit setup menu Dandan Bi
2018-04-12  1:31 ` [patch 1/3] " Dandan Bi
2018-04-12  1:31 ` [patch 2/3] MdeModulePkg/BMMUiLib: " Dandan Bi
2018-04-12  1:31 ` Dandan Bi [this message]
2018-04-12  1:44 ` [patch 0/3] MdeModulePkg/UiApp: " Kinney, Michael D
2018-04-12  3:16   ` Bi, Dandan
2018-04-12  3:46     ` Bi, Dandan
2018-04-12  3:49       ` Tim Lewis
2018-04-12  4:53         ` Bi, Dandan
2018-04-12  5:10           ` Tim Lewis
2018-04-12  6:02       ` Zeng, Star
2018-04-12  6:07         ` Bi, Dandan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180412013138.113904-4-dandan.bi@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox