From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 E531281FCF for ; Tue, 6 Dec 2016 16:52:30 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP; 06 Dec 2016 16:52:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,310,1477983600"; d="scan'208";a="39783308" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 06 Dec 2016 16:52:30 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Dec 2016 16:52:30 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.239]) with mapi id 14.03.0248.002; Wed, 7 Dec 2016 08:52:27 +0800 From: "Dong, Eric" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" Thread-Topic: [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier Thread-Index: AQHSTprR+ANGJORnxku5UHMvA9+CTKD7qxOQ Date: Wed, 7 Dec 2016 00:52:27 +0000 Message-ID: References: <20161205015634.487520-1-ruiyu.ni@intel.com> In-Reply-To: <20161205015634.487520-1-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2016 00:52:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong > -----Original Message----- > From: Ni, Ruiyu > Sent: Monday, December 05, 2016 9:57 AM > To: edk2-devel@lists.01.org > Cc: Dong, Eric; Zhang, Chao B > Subject: [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earli= er >=20 > PlatformBootManagerBeforeConsole() might want to display UI > and ReadKeyStroke() call from UI depends on this event > to connect ConIn so BdsDxe initializes this event before > PlatformBootManagerBeforeConsole(). >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ruiyu Ni > Cc: Eric Dong > Cc: Chao B Zhang > --- > MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 31 ++++++++++++++++++--------= ----- > 1 file changed, 18 insertions(+), 13 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univ= ersal/BdsDxe/BdsEntry.c > index 98b3931..b5e6ef6 100644 > --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > @@ -874,6 +874,23 @@ BdsEntry ( > ); >=20 > // > + // Initialize ConnectConIn event before calling platform code. > + // > + if (PcdGetBool (PcdConInConnectOnDemand)) { > + Status =3D gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_CALLBACK, > + BdsDxeOnConnectConInCallBack, > + NULL, > + &gConnectConInEventGuid, > + &gConnectConInEvent > + ); > + if (EFI_ERROR (Status)) { > + gConnectConInEvent =3D NULL; > + } > + } > + > + // > // Do the platform init, can be customized by OEM/IBV > // Possible things that can be done in PlatformBootManagerBeforeConsol= e: > // > Update console variable: 1. include hot-plug devices; 2. Clear Co= nIn and add SOL for AMT > @@ -905,21 +922,9 @@ BdsEntry ( > if (PcdGetBool (PcdConInConnectOnDemand)) { > EfiBootManagerConnectConsoleVariable (ConOut); > EfiBootManagerConnectConsoleVariable (ErrOut); > - > // > - // Initialize ConnectConIn event > + // Do not connect ConIn devices when lazy ConIn feature is ON. > // > - Status =3D gBS->CreateEventEx ( > - EVT_NOTIFY_SIGNAL, > - TPL_CALLBACK, > - BdsDxeOnConnectConInCallBack, > - NULL, > - &gConnectConInEventGuid, > - &gConnectConInEvent > - ); > - if (EFI_ERROR (Status)) { > - gConnectConInEvent =3D NULL; > - } > } else { > EfiBootManagerConnectAllDefaultConsoles (); > } > -- > 2.9.0.windows.1