From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.4790.1603748961037251515 for ; Mon, 26 Oct 2020 14:49:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ssT+QWP8; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: Z3HqAXLfEBfudVkjAv/JwG9H7ROdV4P8zUjO4vhSud4z6y9oz+knt3P/t4+fiue3+MQe3oBpdg ULwt8jWqqHtQ== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="232180110" X-IronPort-AV: E=Sophos;i="5.77,421,1596524400"; d="scan'208";a="232180110" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 14:49:19 -0700 IronPort-SDR: vK6zKP2iYyqOI9AgVOJ0sB/tUYuaVZAIpqDb6/g0hqQ9v5ZWbq33cEtlc2ZwU+gjm/ClyCqSyO MGhgmNi6kNkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,421,1596524400"; d="scan'208";a="524444013" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga006.fm.intel.com with ESMTP; 26 Oct 2020 14:49:19 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 26 Oct 2020 14:49:18 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 26 Oct 2020 14:49:18 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 26 Oct 2020 14:49:18 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.51) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 26 Oct 2020 14:49:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyc3GVKGc3eT1Pxoigmb294drUACG39z7Z9fcFRaLeRQiftnHCk7IcDWUL3AO2eVX/dHkaWeTCkeIKuHpaeeKNUFxepN5keyiNZ/xPa3cgT8vXPcdETMa4p5h0Y/w5OLKF8XCPhw9djkgYRliC0HU8e+FboxqIj982eTtche0gbSaTfPJXhNMnoDAhqfGSsKXrTgXGjTlr+AsgRHL5yEfqpm3EKNbyfssK9jdoYxFn9ULqsih/c0g1vnq4/bZlcM57LL65SQUHpECNZat+TI0mGt0OMcIXFAOakCwgrgOvAuKjZYFXdJWT4PYEWFVFhPBw/SCX+e0AR80qBDT2AoFg== 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=aAptIQJ2ncIT5MLWof/LsdtT0V/cAR37erxR0j9tRJY=; b=HsNsveVERCVW9FxYZU9a+dJwRKpOmqpbvcmFw3RqA7lgrAZJ/fX5jEonqoxY8dBfsr2LlSpLzClmaDv6GcxLFse0lyd8gL8rZhmzQ6DRyln71WBb3JFd8CRpHvU3aXh/+N1MTrEUfiV5PwfxifPLn5ctfStso/d9hK/o85oProZzJCxPAUKcZVvjSyIGyVoQo2Pqgw3xwQSKWGODDrjTTxoS4Mtl5eAD5z3WEBY/gWr4K010SBKRkuNMVbWmzO0x3lvDD2xBMi8BehpfesGQuffLGd3+jzDLV63BFIkjidd6xpsORfpkA42c5b++ttYwyZiaIiHM7YjayMi/0Kq7+A== 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=aAptIQJ2ncIT5MLWof/LsdtT0V/cAR37erxR0j9tRJY=; b=ssT+QWP8MA/tW8keQvNqxROTmuPRORpDz/9Pi2VZOFakNfKlPJuE0Cemys40jxjFGw95oyKR6Tk8c3CZys9iiZseO5eRg8HknsAcWkLTk71oh/X8u/eqt5WOjzeL1Cac05xtEb/ARXJe6HPdazPpJgmXsJ2ZbzgNxQSTbo+AnoM= Received: from MWHPR1101MB2160.namprd11.prod.outlook.com (2603:10b6:301:5b::12) by MW3PR11MB4731.namprd11.prod.outlook.com (2603:10b6:303:2f::8) 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 21:49:16 +0000 Received: from MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::75c9:81e9:2646:791c]) by MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::75c9:81e9:2646:791c%4]) with mapi id 15.20.3477.029; Mon, 26 Oct 2020 21:49:16 +0000 From: "Nate DeSimone" To: "Luo, Heng" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Chiu, Chasel" 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: AQHWqzRguY5b8nBim0+0co9mQb4XtqmqbTQQ Date: Mon, 26 Oct 2020 21:49:16 +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: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWUzM2YyNGMtN2I0OS00MGRiLWIwNmYtYTk0OTY4ZDViMTkzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoia2RKYlU4bVRucVh5T2NqMnBaWXRcLzh6a0htd2pJVFRXSzRpeUxXK3hcL3hMZDJsSlwveDlqcDd3WUF5WFNFVlE5SSJ9 dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-ctpclassification: CTP_NT 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: [50.53.190.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4121fa4e-52c3-4302-31d2-08d879f8fc2b x-ms-traffictypediagnostic: MW3PR11MB4731: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kFSPHNXAN6Qa3N/kcUdV/LdhFlGoIdqjhPdJoCF6LjWZwdgwyNNgRpNTcWTTCJraYZVtWb3C6xNje9rwrsq8wAQJFvDE4CVRZaXXbh1PZRExs7Ec3FpnYScmT5dsnZoj3xirWeZnnQn8HjYq4TrS4oFThEPIbNZGelysotncmDodREM8uCAB8E4fS4Kh2bNDBdGVolPS1TUuKp0VYSpmtmS5pL4bgstij8nyoY+6qBEicgtvIf9NP5yY/Fce+3Z8nbt0KZ/daTlAy3UZhGIrtV7V09WxBFfd725PHtIdUSBwmrYbbvupOEdNaye0nPbOKeCIpfDXR/je7GMwfiFy9rqPtunwYQpnLs+vQISl7JJ/7X+h6mu1VRqndTHR9xyHpE7FKoJNMwyOEbhL4rDfp67H8G8xRhxp8LeEbE95CyRn/yRbs0QeAgMnPq8gmqjcdietZpcj2SzP4e8wTRKDXg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1101MB2160.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(136003)(366004)(376002)(346002)(396003)(9686003)(966005)(86362001)(110136005)(5660300002)(55016002)(2906002)(52536014)(54906003)(316002)(478600001)(64756008)(107886003)(8936002)(186003)(8676002)(83380400001)(4326008)(26005)(53546011)(66556008)(76116006)(66946007)(6506007)(7696005)(66476007)(66446008)(33656002)(71200400001)(156123004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: xL46R7jdfcHcc3q4iXFyT4tj5RIokzBl7NXsipwvN265ZkzcTr/dy2HgspDb3VO9UsV2K+OFlXLCqif9K+6w87ijAoyto3uJL7Fn8Jv7b/yMGrRYe4VJRHmI3osFHB7lv0ZSOUR0EmElCTGJMipyp9bWhIrJGWcciQnCW1iy4THL0ARN2OKBn16//JL7f9keMf49PGhaTICpoFQOx3xHNu/c2V3H98OcRxsjR5lFXKpA9/pNnwb8QU+6gYgqAL0opJqjB8fJHBXShR0hr3uAn4sYW4RN0RDiR/82Ao9RX7p0SZnrkdTIVZGwzBXc2i/J2iUUTF6EUBGKYS0e1LDzhnOUm7LKw9bJ69a99A2ilhwnEQ7/zUBFv7WcnRPhsNJXlXxc5xyETXdbXazNTvqAIkBuLcG+NPlnRveoDIR3RIuVW34OlB4+lmKpA8tknwafrqe9UT9N/Q/phQv+RdJ6/NHzqS2L8DQ5XOPP7AzqsJ4Nut5DbhP7A2A9HcRoVb0FosZ1M6UmKr1d0P0frMQbfJ2ebSTr/4SsCHcefgAS/VmaL4Y/LrMT1fZBSrms6KZGZ1YJ5g0h8aReCak75GVuMAf/i8TjWTWLovypktBSceMYlHuY+yLRM6ihqRocvJinG5OTklDeXssN3c79MuxE/A== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2160.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4121fa4e-52c3-4302-31d2-08d879f8fc2b X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2020 21:49:16.1025 (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: OTMgAAek+ABK6QUF/F4xu5VLjEiSIuOF1Vhs9xDXsK2ROt7X/5OZ6O7cQzQmtWxB/PyZgO50CD+S1oMiHTO30Nri4gpobfIMHV1ShASL9Uo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4731 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone > -----Original Message----- > From: Luo, Heng > Sent: Sunday, October 25, 2020 6:07 PM > 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 > --- >=20 > Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLi > b.c | 77 ++++++++++++++++++++++++++++++++++++++----------------------- > ---------------- > 1 file changed, 38 insertions(+), 39 deletions(-) >=20 > diff --git > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook > Lib.c > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook > Lib.c > index 9d42a8c27f..d7612fb80a 100644 > --- > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook > Lib.c > +++ > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook > Lib.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