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 3503722742A92 for ; Wed, 11 Apr 2018 18:32:26 -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:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,439,1517904000"; d="scan'208";a="50091520" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga002.jf.intel.com with ESMTP; 11 Apr 2018 18:32:25 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Eric Dong , Liming Gao Date: Thu, 12 Apr 2018 09:31:37 +0800 Message-Id: <20180412013138.113904-3-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 2/3] MdeModulePkg/BMMUiLib: 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:26 -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 --- .../BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf | 4 +++- MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf index def923b977d..e716e053777 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf @@ -1,9 +1,9 @@ ## @file # Boot Maintenance 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. # @@ -80,10 +80,12 @@ ## SOMETIMES_CONSUMES ## Variable:L"ConOut" (The device path of console out device) ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device) gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## GUID (Extended IFR Guid Opcode) gEfiIfrFrontPageGuid ## CONSUMES ## GUID gEfiIfrBootMaintenanceGuid ## CONSUMES ## GUID + gEdkiiSetupEnterGuid ## CONSUMES ## GUID + gEdkiiSetupExitGuid ## CONSUMES ## GUID [Protocols] gEfiSimpleFileSystemProtocolGuid ## CONSUMES gEfiLoadFileProtocolGuid ## CONSUMES gEfiHiiConfigAccessProtocolGuid ## CONSUMES diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c index 8680a51d78c..e3363b469ce 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c @@ -3,11 +3,11 @@ Include file system navigation, system handle selection Boot option manipulation -Copyright (c) 2004 - 2016, 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 which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -926,18 +926,24 @@ BootFromFile ( ); // // Since current no boot from removable media directly is allowed */ // gST->ConOut->ClearScreen (gST->ConOut); + + // + // Signal exit setup event berfore reset the system or boot to another boot option. + // + EfiEventGroupSignal(&gEdkiiSetupExitGuid); // // Check whether need to reset system. // BmmSetupResetReminder (); BmmSetConsoleMode (FALSE); EfiBootManagerBoot (&BootOption); BmmSetConsoleMode (TRUE); + EfiEventGroupSignal(&gEdkiiSetupEnterGuid); FreePool(FileName); EfiBootManagerFreeLoadOption (&BootOption); } -- 2.14.3.windows.1