From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E3A2722742A92 for ; Wed, 11 Apr 2018 18:32:30 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2018 18:32:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,439,1517904000"; d="scan'208";a="50091553" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga002.jf.intel.com with ESMTP; 11 Apr 2018 18:32:30 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Eric Dong , Liming Gao Date: Thu, 12 Apr 2018 09:31:38 +0800 Message-Id: <20180412013138.113904-4-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180412013138.113904-1-dandan.bi@intel.com> References: <20180412013138.113904-1-dandan.bi@intel.com> Subject: [patch 3/3] MdeModulePkg/BMUiLib: Signal event when enter/exit setup menu X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2018 01:32:31 -0000 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 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- 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.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
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.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# 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