From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.19076.1628751992903850264 for ; Thu, 12 Aug 2021 00:06:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=dkhUl6f7; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: gregx.yeh@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10073"; a="202481398" X-IronPort-AV: E=Sophos;i="5.84,315,1620716400"; d="scan'208";a="202481398" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 00:06:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,315,1620716400"; d="scan'208";a="527652835" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga002.fm.intel.com with ESMTP; 12 Aug 2021 00:06:30 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.2242.10; Thu, 12 Aug 2021 00:06:29 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Thu, 12 Aug 2021 00:06:29 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Thu, 12 Aug 2021 00:06:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eUV0RYuw2oxG/tyigNT2B5glrD0r9DzHqM4Gs/Ulbmcvu9J9/KLKSyummStMdrjfiKo8jgU0a6Wtv20ivKiXBZgGmI9kL066pJAK3MRye0hnLp1mU1xxnVCwfhs5TJD6qY4/zMrSsNeFIlyTkinkBQFFN8A0PADYwUNPlOqXyHv7mI8Gcy+p6cwg1naPOCC1ucVe8FgfPiu5FSbbBbhOeurT2iIzKXLYt9KR54CTlHmgyZdMJYq3JNnIBl/wFnkDzm7mdZMLvjPYw/508/WsGBU04NQUpMinZ9FBpFmqRKo4NYr3j3ex6jHt3pu6QDEq8MM2iuybiDVYhVLSKOXSQw== 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=oggLOSnOyLg5xn9jtzixA4gS9wkEuCWbnvpmLaD9yDg=; b=eHLxS0ZMB8jUReSGKtzaMn4PYv9dM+HuCrt1I4HzV2o2IzsQeNrLfWaKKhhP16vEWcv5rV2iUQ1v0SR1+OWNUn/+/YaaWjXArasl8hThH8OwwtPE6eOEuvIGHAN26LaCIGtOM4MoKbbb0YTYzoZ6qSFgXPgu/bhNOjSTeDGStR7Pm58SJTHTQ2bYEOmpfF5goVfi9p8wSaoji3AVhxQy3HR5OcBUKnYYtz94FcrzqtMX/nv/SuWQgdDJncwP0dGipnBAX90aSeIED76M78KplmNolx3IcAi5UegMRyn3T3EOgS+YA38g2aLn7CxJYwfrRsGWWMt9guyUOcpajBzKNQ== 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=oggLOSnOyLg5xn9jtzixA4gS9wkEuCWbnvpmLaD9yDg=; b=dkhUl6f7juAbamNYjVscgGhl8CyY6hwWiKJozUV9WNt/Ej8f9Yy21gjtxJFiJhHikEvl5q6Ixw42WT0PPUgdRSmtgiZYDXxCiO1X4i6lEV+YHDoL/6kRPZfrwyZGefvC/kSU8Zpq6Ul3FO+l0ZExurGbYgWOpUnnQGcb4dwgt10= Received: from BYAPR11MB3368.namprd11.prod.outlook.com (2603:10b6:a03:1b::13) by SJ0PR11MB4848.namprd11.prod.outlook.com (2603:10b6:a03:2af::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Thu, 12 Aug 2021 07:06:28 +0000 Received: from BYAPR11MB3368.namprd11.prod.outlook.com ([fe80::5810:c190:daf6:8436]) by BYAPR11MB3368.namprd11.prod.outlook.com ([fe80::5810:c190:daf6:8436%5]) with mapi id 15.20.4415.016; Thu, 12 Aug 2021 07:06:28 +0000 From: "GregX Yeh" To: "Bi, Dandan" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Wu, Hao A" , Liming Gao Subject: Re: [PATCH] MdeModulePkg PCD: FSP NotifyPhase APIs caused 100ms delay Thread-Topic: [PATCH] MdeModulePkg PCD: FSP NotifyPhase APIs caused 100ms delay Thread-Index: AQHXjyy2ehTys/r2v0qWAtoPjzFK6Ktvcdbw Date: Thu, 12 Aug 2021 07:06:28 +0000 Message-ID: References: <20210809022732.1753-1-gregx.yeh@intel.com> In-Reply-To: Accept-Language: zh-TW, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0e7870eb-2e8b-4ab6-c99c-08d95d5fb4c0 x-ms-traffictypediagnostic: SJ0PR11MB4848: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0Jc8unPlL0UFK2FW9r9OkqthcykbRiB66RNcuANA1W/sKO3enEx9hXM8730y9O426TWGC3uvmEY7lKtVsiA+gCr06DAV5vRT81lOjbJCUPwO4ZzAb+2uAaL17za0sLhF1cJj5A2N2uRyWRYf70z/SFYSGoB7YvwCjFnNXOqE4i1XgyKOTWhwqe0V9WLn3mlXT9dxe7ho7l1kqkcFeMzN4LnQZ/nQWFC7XnQMD4ywAu7yoYEYHlQ8jP2b+A5s2DYN6ybe84bpSq6MupoNLt81xg8f5oNrRqZwUZ9GY1tl2ziQHKuf6beakr27wNh1qGvHZmyJ+BhBsRRr9wzG1S0KaV3uTbtz6WAAnSlAzZAFiIgYho8hYMvGAWfQlcK0ep3t7u0DSObcFSagZn4pM2pZDTkSSMD3P2/dN0fN4kpcRzgrzdRycT/3tdo/whaWDeiYXiW3n5a5smit3Ob+fF2z2fAFqE1fvNzLcxp3zLf2/M7sWYdDQUpDBt8BhGdY7XkeDC5PDVDDontDE3xYcA/ZmSwdu7vtqIVB2tcmlJRtyPzygbT1J2Q2UU1RPfQ2cbLmN5YVOiXmdgiZ5iVkNLHT1kv30V6jJshF66SULbVmbBN9ZYNR+4PinKzrk8NOj3eAC2aEvCkfkis2ER4jnjzXcLLxHwaWn8qBzWBfJ69PCsD71efxKZPLOiMM/jk7VeBOSxwMaFW+Luxe4uDxKU+/c2V+a2K8lB3vGk5xzUMi9Z3RTLtM8yTV8J1VP1UVZ591PmYfgE8S3WvPIzIQ1PkCADQH6kvRy76Ehlm4bDvMqjM= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3368.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(376002)(366004)(39860400002)(346002)(396003)(186003)(26005)(966005)(122000001)(9686003)(66946007)(5660300002)(66446008)(38100700002)(478600001)(316002)(8676002)(8936002)(66476007)(83380400001)(76116006)(71200400001)(86362001)(4326008)(2906002)(7696005)(110136005)(66556008)(53546011)(54906003)(55016002)(52536014)(33656002)(6506007)(38070700005)(64756008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?oBHSJHi9tWAGCrr+zUbz95AiyG2rPfTF1ZOGW63JYuTuTZMikAwTxDzVjhr4?= =?us-ascii?Q?+q5c5G70+Rsrmv5XVOGf9UW2nFhTTHOjiIdze7qZW4Ip/tmKoDPKU3tN0Fv2?= =?us-ascii?Q?Q6vMJ1PXsDpr5m87xRYeTHbj1SpV5kCkZ0ky8a3DimOLFzs+bm/uHOaa/bQY?= =?us-ascii?Q?krK/926Q23Qwv5q5nd9ICzO9pZpDPstibZUDY/vYqPgqn4lC+bYx+ylpTUuE?= =?us-ascii?Q?T0VAcbbZTSe5e5Za45fERMsZBIgQFb0A0w3PTEdLU8JOm7Clf1g8AEPMlmbj?= =?us-ascii?Q?OI/xqkZzpSar3soavMEbbV8PgXj/Wee/7m/bWGSNhJEpaUAtzG5cIzHp32/g?= =?us-ascii?Q?nTfDxMJwK7qsOBivNAnjalk0oFzsHFOFg2bztTqcf4VCW7j72bJiBsM4v0Az?= =?us-ascii?Q?mOLouR+uALojs42E24bQZzmmrLKjiiMhzPrutNgU/R/Z4ASXtQg3xG8tpFMz?= =?us-ascii?Q?sfBmFaCr6hbFhqGe8vC1k1TT+BOEpbl7F0FKtUKle/DlSeftX0fb0fbY88Rp?= =?us-ascii?Q?o7ER/eWdcGMEWMh9qDJv8KoegbFKITS9X7NF8QweHXhqkn/S2bgxC3SeSmyk?= =?us-ascii?Q?wcCyCOnDhsuzk0UO1wPDj4f1FEMWPdsBcPO7ZpSq6FXSQaHY/9tlZQJ77oXq?= =?us-ascii?Q?n08X9JDdUmnnfac7KyWxlH06TfZPMTRBLXeEHSGy4FdKqAStqsdH3BPf1JzN?= =?us-ascii?Q?CLhpIicHAy290gg8DJVVampj6Bwa7hhou+Ay4r1d5aNZpHVZHrZrziFEZcX+?= =?us-ascii?Q?HUMkdgRk/YMeFHcpinUySiKgSwL3x8xx+ocFHspu5/FuYGhjI0DnSJH1GfT7?= =?us-ascii?Q?9GweTqhgCU7AO+WQ7zKk0H1BSXKmYAHpr0ec74Dz3Cn3122WW15reZas0AoK?= =?us-ascii?Q?5co2b8OPC5DkIM7SJCj0ouWymj7XyoGB7Ohn4xBCIOjJQKsDQsflBBAnoqZp?= =?us-ascii?Q?LaX45rEHtcJFSQhFKoCXMPPK9NSnMw9AEoGTOZSH6zVd5VKXOztika5AAEP0?= =?us-ascii?Q?mpaHpb9dNB/6OZL+ucajv59A6gA4Wf4UBH8+QBYULrFm+5kg3sTGIo4lj9Yc?= =?us-ascii?Q?/dL+5pxA876LggEhDHgptT34jvEAzDdp4fpD13BEmkrYEe40jYdm6js889XY?= =?us-ascii?Q?ydF+eSO15zsMBCFFZOmMMrGvzgnkq5QzCgRTOaaQtT7QBfN1chhQtoCwNzRq?= =?us-ascii?Q?nunpOMHiYHF8tlgtoIcUEIZr8gB9NL/iNKufeTqxwXTFdcmZmF6AcvHfJqhR?= =?us-ascii?Q?40TmAtR2zArNskPi3maahVOoGEQD4MwczoDpuUFIhEvdVWNLadcFMpJctHCC?= =?us-ascii?Q?iWIdDDGC8hueUL7AMtNt1RyO?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3368.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e7870eb-2e8b-4ab6-c99c-08d95d5fb4c0 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2021 07:06:28.3746 (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: 1muzDkNG15ltTgeV0RPMM+1YemvprX1FCyAiSCuFd+H0b/DIAFCzLKJpmjB1bEV7n62KGaANhzXS7UFeA1bE8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4848 Return-Path: gregx.yeh@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Dandan, So I need create new patch file with new subject then send-email again? Thanks, Greg -----Original Message----- From: Bi, Dandan =20 Sent: Thursday, August 12, 2021 11:47 AM To: Yeh, GregX ; devel@edk2.groups.io Cc: Wang, Jian J ; Wu, Hao A ; L= iming Gao Subject: RE: [PATCH] MdeModulePkg PCD: FSP NotifyPhase APIs caused 100ms de= lay Hi Greg, One minor comment, could we update the subject to reflect what have done in= this patch for PCD module before submitting the patch?=20 With that addressed Reviewed-by: Dandan Bi Thanks, Dandan > -----Original Message----- > From: Yeh, GregX > Sent: Monday, August 9, 2021 10:28 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A=20 > ; Bi, Dandan ; Liming Gao=20 > > Subject: [PATCH] MdeModulePkg PCD: FSP NotifyPhase APIs caused 100ms=20 > delay >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D3525 >=20 > After PciSegmentLib using Dynamic PCD for Pcie base address such long=20 > delay found in FSP. The root cause is some of the PCD service PPIs not=20 > shadowed to memory and flash cache may have been disabled in NotifyPhase = stage. > Solution is to shadow all PCD service PPIs to memory. >=20 > Signed-off-by: GregX Yeh > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao > --- > MdeModulePkg/Universal/PCD/Pei/Pcd.c | 71 > +++++++++++++++++++++++++++- > 1 file changed, 70 insertions(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c > b/MdeModulePkg/Universal/PCD/Pei/Pcd.c > index 9c6346924f..f31e0be35f 100644 > --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c > +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c > @@ -1,7 +1,7 @@ > /** @file All Pcd Ppi services are implemented here. -Copyright (c) 20= 06 - > 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 -=20 > 2021, Intel Corporation. All rights reserved.
(C) Copyright 2016=20 > Hewlett Packard Enterprise Development LP
SPDX-License-Identifier:=20 > BSD-2- Clause-Patent @@ -339,6 +339,75 @@ PcdPeimInit ( > { EFI_STATUS Status; + Status =3D PeiServicesRegisterForShadow > (FileHandle);+ if (Status =3D=3D EFI_ALREADY_STARTED) {+ //+ // Th= is is now > starting in memory, the second time starting.+ //+ > EFI_PEI_PPI_DESCRIPTOR *OldPpiList;+ EFI_PEI_PPI_DESCRIPTOR > *OldPpiList2;+ VOID *Ppi;+ VOID *Ppi2;++ OldPpiList =3D NULL;+ = Status =3D > PeiServicesLocatePpi (+ &gPcdPpiGuid,+ 0,+ > &OldPpiList,+ &Ppi+ );+ ASSERT_EFI_ERROR (= Status);++ if > (OldPpiList !=3D NULL) {+ Status =3D PeiServicesReInstallPpi (OldPpi= List, > &mPpiList[0]);+ ASSERT_EFI_ERROR (Status);+ }++ OldPpiList2 = =3D NULL;+ > Status =3D PeiServicesLocatePpi (+ &gGetPcdInfoPpiGuid,+ = 0,+ > &OldPpiList2,+ &Ppi2+ );+ ASSERT_EFI_ERROR= (Status);++ if > (OldPpiList2 !=3D NULL) {+ Status =3D PeiServicesReInstallPpi (OldPp= iList2, > &mPpiList2[0]);+ ASSERT_EFI_ERROR (Status);+ }++ OldPpiList = =3D NULL;+ > Status =3D PeiServicesLocatePpi (+ &gEfiPeiPcdPpiGuid,+ = 0,+ > &OldPpiList,+ &Ppi+ );+ ASSERT_EFI_ERROR (= Status);++ if > (OldPpiList !=3D NULL) {+ Status =3D PeiServicesReInstallPpi (OldPpi= List, > &mPpiList[1]);+ ASSERT_EFI_ERROR (Status);+ }++ OldPpiList2 = =3D NULL;+ > Status =3D PeiServicesLocatePpi (+ &gEfiGetPcdInfoPpiGuid,+= 0,+ > &OldPpiList2,+ &Ppi2+ );+ ASSERT_EFI_ERROR= (Status);++ if > (OldPpiList2 !=3D NULL) {+ Status =3D PeiServicesReInstallPpi (OldPp= iList2, > &mPpiList2[1]);+ ASSERT_EFI_ERROR (Status);+ }++ return Status= ;+ }+ > BuildPcdDatabase (FileHandle); //-- > 2.32.0.windows.1