From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web09.8118.1603682300496207900 for ; Sun, 25 Oct 2020 20:18:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=xPsK7ytL; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: chasel.chiu@intel.com) IronPort-SDR: hh7ItU1cy9jbMTX6Gz/LDcIse7oKtA+qso4GUY9fVDZquCU/oVJP7nUfEa3z6jqZfGnxW9O1HC ZncYs9y6QMKQ== X-IronPort-AV: E=McAfee;i="6000,8403,9785"; a="155654290" X-IronPort-AV: E=Sophos;i="5.77,417,1596524400"; d="scan'208";a="155654290" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2020 20:18:17 -0700 IronPort-SDR: 3OinN33L1jBeIOTvNnWV7egZiP1OdFOsfOfTcWVJmFNCjXutw79Wqdft4Ya8WzWsUt/K66M/lO t5VfMYhyoPxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,417,1596524400"; d="scan'208";a="524146149" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga006.fm.intel.com with ESMTP; 25 Oct 2020 20:18:16 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 25 Oct 2020 20:18:16 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 25 Oct 2020 20:18:16 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 25 Oct 2020 20:18:16 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sun, 25 Oct 2020 20:17:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K3Wi//7z0ejbPBgCmYoAo2JeeAJtsWDwA1SjKWuItM6v5fl2e/fdsYMUn1InliaBHRj0Yh6ivHbjyhjQAf8b1oKxKVN7Gh4nQoAzX+vZe9O+Bgf/M+ktpLo3+lJkD9ymDess8RInobnHye20JsNTpGKMhRhsN7WOsubRUiPvGyDvs3yGKENXCtEu/SVuVoxNMMi5WSLCM8NpOR4WZPSKzSabsoD61EyaM6ho8qQgz5LZxKr2iW1NweuxnYPWP7qttAs7vUf6sEMW3jlClZG60iZPEoCdMFiWGj+SP74wtahT5/2Aty/+P1WM7gMoKVg7B3knKaqk/lW8AbcJlcW4ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pikl+QJDofyyLGO64J/uWpVY1EVmG1sYIKH6a8bcwP0=; b=nrd6MQFEFy75Ugsvt31Fd7flA+N1Gc5d3CofE+fmT32KJ+mddHsM+rMiHWj5fP6ifh6eH/Pw+t0d2/VrVZO5F6DSWn6fRlzRGXD8lriyy17Igge2PMEGyFFeTkriWqTZxCFtAiIVClLyoP13ExiC6gMZEnY3Xk440xb0xF9y6amK62k/3YVi3PG4KuGqpWm827zSL0anYvfdFLJ7BbnQSAt9c4s6wDVVupxA9WCH6QHrp8nu1u98lLHcwKrEMuioG+J+jmZz+fTUB3qyRduk9lLsz8FwW7OoEM34L516U/CiLqTjFJn0QnNezhsrv8OB66nx83BYR6sC3RtsmoNzoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pikl+QJDofyyLGO64J/uWpVY1EVmG1sYIKH6a8bcwP0=; b=xPsK7ytL5x+jFaKx/ChwBW+EmIU2zyGwunkKIL2vssjJycXoR3vmaUeloTqQEOePa6boms0eh0LPh0tamoljc/f4V4oNFItoGAod5GznPh5+Ppc3HnruuRHd9yK/tqCncOHAUz5pqTDgYIIpsV0jOMEO/d93X9O6M088vdpeMAc= Received: from SN6PR11MB2814.namprd11.prod.outlook.com (2603:10b6:805:55::15) by SN6PR11MB3358.namprd11.prod.outlook.com (2603:10b6:805:c0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Mon, 26 Oct 2020 03:17:54 +0000 Received: from SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::4540:a6b5:b0bc:9d82]) by SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::4540:a6b5:b0bc:9d82%4]) with mapi id 15.20.3477.028; Mon, 26 Oct 2020 03:17:54 +0000 From: "Chiu, Chasel" To: "Luo, Heng" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Desimone, Nathaniel L" Subject: Re: [Patch V2] BoardModulePkg: Early connect PCI Root Bridge in BoardBdsHookLib Thread-Topic: [Patch V2] BoardModulePkg: Early connect PCI Root Bridge in BoardBdsHookLib Thread-Index: AQHWqzRg0miD8bk/pka8rVqECRWFJ6mpNnww Date: Mon, 26 Oct 2020 03:17:54 +0000 Message-ID: References: <20201026010717.5240-1-heng.luo@intel.com> In-Reply-To: <20201026010717.5240-1-heng.luo@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [180.217.154.123] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a1a4048b-e5db-4a5f-e110-08d8795dbaf6 x-ms-traffictypediagnostic: SN6PR11MB3358: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xmws3mcUeO2uOmOP0sPqdzKUYjWNUQTjrfbz3zCuRXkIWPS5ITU1C3U832bKLp6P+tExvxPEFXwrEK5E5g+wwP09uYZ3i3eXeF8GVTJA7ARdBiQ6NDIqSyi4wZUT+G1v/vl6PvVjr0a6/X91LtLyhSTfiuRhwhBTp560St5UCnanNVDIBAtWnfOLK31Ofe36tpVISh6g1QFztZnf2xrc/SGbIzUz/uWD0/9mVpquawjUPTVfbAEayEMqt32jKHhM0EUcowLl9t8BkYFOkLXELo2dKxZPAVfTrJaN3XViU0Al+N/hqkbDTnBeZDZhKpbxM56MIpRw/VCrtHwN0bYDDT1ETMV/XHxVt+suoNUH/j/Wx0y8qecC6I/YtHfV/N+ATxKdFn3wGwknSuXi/aTHUzHDMo2IeH8Em9tpwe/HhN/4bTg141rLkiwrDGOMlVHEaVL9iZ49Z94gTwQz0hbH4g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2814.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(396003)(376002)(136003)(346002)(366004)(8936002)(52536014)(33656002)(107886003)(86362001)(64756008)(66476007)(110136005)(83380400001)(9686003)(66946007)(76116006)(66556008)(8676002)(71200400001)(66446008)(966005)(55016002)(5660300002)(6506007)(54906003)(7696005)(2906002)(26005)(53546011)(4326008)(316002)(186003)(478600001)(156123004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: IgiZhn8TB8OzaB/dJPGWb1qMPFcgg2BCZL7BCLL4RF6MeJIooHaWKnFWTbCSgU0junPCAkHF6f6lUxqo09IXp5qujineFa2vqZMTlbMfmNaYBq+/5MR+xH3AlzFiRzIHTVy1eMro+/2aMrEZD9rmTVpcbasU2Y+tvoVp7iZtF0w7fvsYqFem4p7gCo7qu3mC6s+A8LA23t2pTN0EJI4nYMfapzzdCIO5SKuZH5DNK/h/awwt/TvmoGTRfiECqeNWLUwj+KZm6YtLI80N+iWfqmqNwNB5TLuP1+70Ceb13pU30u2Zm4+zxbIq4zSBRlo8K0s4FRVeqvskG3pWWSPLefGiO9kbGaMc/MSzmOwqCkQ7dRVc7A8EyeML/3b2QusF10zSS1pFivXwdwojo/LbRch8Dx9mPAtBSalNAsbv4qnqMvUPPJ7mkk572q+0bEPdNYdXBdPGMXysArSssriY4oS/GjXGwIeFg+nvkNVlvQmtXeeB5dK+XfPzfwy2SXpD4Q1V94WE1U7H07ua16acWmG46a6TasRk9Rxkf7Wet5sDS1WaLl42jz9Oj07P/ic0NYhv44XRvsxxGRdSMt42cJ22Quay7dzXZjhvG1sCOw3H/AwJR3cmOa3nA032m6aujL10eYqGTsK8kP5WmcvY7A== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2814.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1a4048b-e5db-4a5f-e110-08d8795dbaf6 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2020 03:17:54.7466 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kfq/yukCaNOcIG6yQAPnhH1S9v1FeyrFZnfsF25OUrk7KC4h5Zc2V6O4IraX+O5ztz0g3hbVrnSZGAcgYJlC2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3358 Return-Path: chasel.chiu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chasel Chiu > -----Original Message----- > From: Luo, Heng > Sent: Monday, October 26, 2020 9:07 AM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Chiu, Chasel ; > Desimone, Nathaniel L > Subject: [Patch V2] BoardModulePkg: Early connect PCI Root Bridge in > BoardBdsHookLib >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3016 >=20 > Trigger PCI Bus scanning at BdsBeforeConsoleAfterTrustedConsoleCallback()= . > Move the call to EnumUsbKeyboard() to after PciEnumComplete. >=20 > Cc: Eric Dong > Cc: Chasel Chiu > Cc: Nate DeSimone > Signed-off-by: Heng Luo > --- > Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c > | 77 ++++++++++++++++++++++++++++++++++++++------------------------------= ----- > ---- > 1 file changed, 38 insertions(+), 39 deletions(-) >=20 > diff --git > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib > .c > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib > .c > index 9d42a8c27f..d7612fb80a 100644 > --- > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib > .c > +++ > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib > .c > @@ -1141,11 +1141,6 @@ BdsPciEnumCompleteCallback ( >=20 >=20 > gBootMode =3D GetBootModeHob (); >=20 >=20 >=20 > - // >=20 > - // Connect Root Bridge to make PCI BAR resource allocated and all PciI= o > created >=20 > - // >=20 > - ConnectRootBridge (FALSE); >=20 > - >=20 > // >=20 > // Fill ConIn/ConOut in Full Configuration boot mode >=20 > // >=20 > @@ -1180,6 +1175,42 @@ BdsPciEnumCompleteCallback ( > } >=20 > } >=20 >=20 >=20 > + // >=20 > + // Enumerate USB keyboard >=20 > + // >=20 > + EnumUsbKeyboard (); >=20 > + >=20 > + // >=20 > + // For trusted console it must be handled here. >=20 > + // >=20 > + UpdateGraphicConOut (TRUE); >=20 > + >=20 > + // >=20 > + // Register Boot Options >=20 > + // >=20 > + RegisterDefaultBootOption (); >=20 > + >=20 > + // >=20 > + // Register Static Hot keys >=20 > + // >=20 > + RegisterStaticHotkey (); >=20 > + >=20 > + // >=20 > + // Process Physical Preo >=20 > + // >=20 > + PERF_START_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7010); >=20 > + if (PcdGetBool (PcdTpm2Enable)) { >=20 > + ProcessTcgPp (); >=20 > + ProcessTcgMor (); >=20 > + } >=20 > + PERF_END_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7011); >=20 > + >=20 > + // >=20 > + // Perform memory test >=20 > + // We should make all UEFI memory and GCD information populated before > ExitPmAuth. >=20 > + // SMM may consume these information. >=20 > + // >=20 > + MemoryTest((EXTENDMEM_COVERAGE_LEVEL) PcdGet32 > (PcdPlatformMemoryCheckLevel)); >=20 > } >=20 >=20 >=20 > /** >=20 > @@ -1265,41 +1296,9 @@ BdsBeforeConsoleAfterTrustedConsoleCallback ( > DEBUG ((DEBUG_INFO, "Event gBdsEventBeforeConsoleBeforeEndOfDxeGuid > callback starts\n")); >=20 >=20 >=20 > // >=20 > - // Enumerate USB keyboard >=20 > - // >=20 > - EnumUsbKeyboard (); >=20 > - >=20 > - // >=20 > - // For trusted console it must be handled here. >=20 > - // >=20 > - UpdateGraphicConOut (TRUE); >=20 > - >=20 > - // >=20 > - // Register Boot Options >=20 > - // >=20 > - RegisterDefaultBootOption (); >=20 > - >=20 > - // >=20 > - // Register Static Hot keys >=20 > - // >=20 > - RegisterStaticHotkey (); >=20 > - >=20 > - // >=20 > - // Process Physical Preo >=20 > - // >=20 > - PERF_START_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7010); >=20 > - if (PcdGetBool (PcdTpm2Enable)) { >=20 > - ProcessTcgPp (); >=20 > - ProcessTcgMor (); >=20 > - } >=20 > - PERF_END_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7011); >=20 > - >=20 > - // >=20 > - // Perform memory test >=20 > - // We should make all UEFI memory and GCD information populated before > ExitPmAuth. >=20 > - // SMM may consume these information. >=20 > + // Connect Root Bridge to make PCI BAR resource allocated and all PciI= o > created >=20 > // >=20 > - MemoryTest((EXTENDMEM_COVERAGE_LEVEL) PcdGet32 > (PcdPlatformMemoryCheckLevel)); >=20 > + ConnectRootBridge (FALSE); >=20 > } >=20 >=20 >=20 >=20 >=20 > -- > 2.24.0.windows.2