From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0723.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::723]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D0C1A81FDC for ; Tue, 6 Dec 2016 03:17:35 -0800 (PST) Received: from CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.26) by CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Tue, 6 Dec 2016 11:17:34 +0000 Received: from CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.26]) by CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.26]) with mapi id 15.01.0761.017; Tue, 6 Dec 2016 11:17:34 +0000 From: "Wang, Sunny (HPS SW)" To: Ruiyu Ni , "edk2-devel@lists.01.org" CC: Eric Dong , Chao B Zhang , "Wang, Sunny (HPS SW)" Thread-Topic: [edk2] [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier Thread-Index: AQHSTprXnuBoLAGOZkWdfyi+bW5SeKD6xuGA Date: Tue, 6 Dec 2016 11:17:33 +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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sunnywang@hpe.com; x-originating-ip: [15.211.131.5] x-microsoft-exchange-diagnostics: 1; CS1PR84MB0295; 7:fsZX4YnsW7CObx8UBLymQP4LcfTo8uO1HgSKMkjVchw125YZW5V3HTYHHZBODiJ0gFT4dQ5Ul5EL8H/I5ejolLBxwwxV9eGELMgOYlhSwa9C2nf0xaGSjUVvwXZzeCqPmGWKPhNZyvnnOQLFr7QbL3yJE8qglCDcbiPC+ExlDnh73lI4HX0QPBd7P8arZBbv2LYkQfC4yQ8saz8YhgBPSCPC0GV/wzDjGPjVBEldEupFFSZbgWQ4HV7J8kvA5u800+/G1FWhlDmiOm+YB/dPVTlg2tWBQkWY4XP90CFA/K+GvQlbxQJ/nn+ZXlVbAZ9RIlVfsbjiei8AgGLuY0z3R04WiHcBw0YV+4conwk3q7mIwmok4znFO64O+U9aUXQfiqaCV6CmfvTz+gfpwox8IOuaimpK9ztsTxTvXE+5xvPSrcaD8gtLjihVjY/W7KdoWT4h0qLswZyDYb3Bgzx+Ew== x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10019020)(6029001)(6009001)(7916002)(377454003)(199003)(189002)(13464003)(305945005)(6506006)(122556002)(9686002)(189998001)(3660700001)(2501003)(8936002)(39840400001)(39860400001)(39850400001)(74316002)(92566002)(66066001)(68736007)(7696004)(33656002)(2950100002)(97736004)(38730400001)(39450400002)(54356999)(39410400001)(50986999)(76176999)(5660300001)(2900100001)(5001770100001)(86362001)(7736002)(101416001)(106356001)(6116002)(4326007)(102836003)(3846002)(7846002)(81166006)(2906002)(3280700002)(8676002)(81156014)(106116001)(105586002)(229853002)(99286002)(77096006)(145543001); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0295; H:CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; x-ms-office365-filtering-correlation-id: 9cbcb2bf-e941-4ae8-c7bf-08d41dc97a18 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CS1PR84MB0295; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(21532816269658)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:CS1PR84MB0295; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0295; x-forefront-prvs: 01480965DA received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2016 11:17:33.7946 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0295 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: Tue, 06 Dec 2016 11:17:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Looks good to me.=20 Reviewed-by: Sunny Wang -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiy= u Ni Sent: Monday, December 05, 2016 9:57 AM To: edk2-devel@lists.01.org Cc: Eric Dong ; Chao B Zhang Subject: [edk2] [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent = earlier PlatformBootManagerBeforeConsole() might want to display UI and ReadKeyStro= ke() call from UI depends on this event to connect ConIn so BdsDxe initiali= zes this event before PlatformBootManagerBeforeConsole(). 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(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/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 PlatformBootManagerBeforeConsole: // > Update console variable: 1. include hot-plug devices; 2. Clear ConI= n 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel