From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 161931A1E30 for ; Mon, 17 Oct 2016 21:09:49 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 17 Oct 2016 21:09:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,508,1473145200"; d="scan'208,217";a="20646072" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 17 Oct 2016 21:09:48 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 17 Oct 2016 21:09:48 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 17 Oct 2016 21:09:48 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.104]) with mapi id 14.03.0248.002; Tue, 18 Oct 2016 12:09:45 +0800 From: "Yao, Jiewen" To: "Dong, Guo" , "Mudusuru, Giri P" , "edk2-devel@lists.01.org" CC: "Ma, Maurice" , "Yarlagadda, Satya P" , "Yao, Jiewen" Thread-Topic: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if signaling first event. Thread-Index: AQHSKMk+4IDiZaFn1kmptzPOoZUo06CtCLIAgAAI7YCAAIazIA== Date: Tue, 18 Oct 2016 04:09:44 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386B2B30@shsmsx102.ccr.corp.intel.com> References: <4666AEFED60F8E4198B42BB01DCEABDF76F16C6A@ORSMSX113.amr.corp.intel.com> <0DE6ECBAEEB99B4DA9564FF580F3580A0D2C340A@fmsmsx120.amr.corp.intel.com> In-Reply-To: <0DE6ECBAEEB99B4DA9564FF580F3580A0D2C340A@fmsmsx120.amr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if signaling first event. 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, 18 Oct 2016 04:09:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi I am a little concern on this as well. If today, there is a POC require skipping PciEnumerationComplete. There might be the other POC tomorrow to skip ReadyToBoot Then another POC to skip EventExitBootServices. We will be exhausted to add POC to skip each separately. Can this POC handle all 3 event together? Or not handle 3 event completely? Thank you Yao Jiewen From: Dong, Guo Sent: Tuesday, October 18, 2016 12:04 PM To: Mudusuru, Giri P ; edk2-devel@lists.01.org Cc: Yao, Jiewen ; Ma, Maurice ;= Yarlagadda, Satya P Subject: RE: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if si= gnaling first event. Hi Giri, Thank you for the comment. In our POC implementation, Coreboot will notify FSP EnumerationComplete. A= nd in UEFI payload, the other 2 FSP notifications will be called from FspWr= apperNotifyDxe. Thanks, Guo -----Original Message----- From: Mudusuru, Giri P Sent: Monday, October 17, 2016 8:32 PM To: Dong, Guo >; edk2-devel@l= ists.01.org Cc: Yao, Jiewen >; Ma, Ma= urice >; Yarlagadda, Saty= a P > Subject: RE: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if si= gnaling first event. Hello Guo, FSP wrapper and Coreboot are bootloaders consuming FSP binary. FSP must get called Post PCI bus enumeration to do the required silicon ini= tialization. Why do we need a PCD to skip it? Thanks, -Giri > -----Original Message----- > From: Dong, Guo > Sent: Monday, October 17, 2016 3:53 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen >; Mudu= suru, Giri P > >; Dong, Guo = > > Subject: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if > signaling first event. > > PciEnumerationComplete might be signaled to FSP in Coreboot. Add a PCD > PcdNotifyPciEnumerationComplete so FspWrapperNotifyDxe driver could be > used in this case. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: gdong1 > > --- > .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 18 ++++++++++--= ------ > .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf | 3 ++- > IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 5 +++++ > 3 files changed, 17 insertions(+), 9 deletions(-) > > diff --git > a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c > b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c > index 0797f44..45eae4b 100644 > --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c > +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c > @@ -246,14 +246,16 @@ FspWrapperNotifyDxeEntryPoint ( > return EFI_SUCCESS; > } > > - ProtocolNotifyEvent =3D EfiCreateProtocolNotifyEvent ( > - &gEfiPciEnumerationCompleteProtocolGuid, > - TPL_CALLBACK, > - OnPciEnumerationComplete, > - NULL, > - &Registration > - ); > - ASSERT (ProtocolNotifyEvent !=3D NULL); > + if (PcdGetBool(PcdNotifyPciEnumerationComplete)) { > + ProtocolNotifyEvent =3D EfiCreateProtocolNotifyEvent ( > + &gEfiPciEnumerationCompleteProtocolGuid, > + TPL_CALLBACK, > + OnPciEnumerationComplete, > + NULL, > + &Registration > + ); > + ASSERT (ProtocolNotifyEvent !=3D NULL); } > > Status =3D EfiCreateEventReadyToBootEx ( > TPL_CALLBACK, > diff --git > a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf > b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf > index f851f68..f28356d 100644 > --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf > +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf > @@ -61,7 +61,8 @@ > gFspHobGuid ## CONSUMES ## HOB > > [Pcd] > - gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES > + gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## > CONSUMES > + gIntelFsp2WrapperTokenSpaceGuid.PcdNotifyPciEnumerationComplete ## > CONSUMES > > [Depex] > TRUE > diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > index d9d2d80..52ed9d8 100644 > --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > @@ -74,6 +74,11 @@ > ## This is the base address of FSP-T/M/S > > gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress|0x00000000|UINT32| > 0x00000300 > > gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UINT32 > |0x00000301 > + ## Indicates if the FSP wrapper will notify FSP > PciEnumerationComplete.

> + # TRUE - FSP wrapper will notify PciEnumerationComplete to FSP.
> + # FALSE - FSP wrapper will NOT notify PciEnumerationComplete to FSP.=
> + # @Prompt Notify FSP PciEnumerationComplete. > + > gIntelFsp2WrapperTokenSpaceGuid.PcdNotifyPciEnumerationComplete|TRUE| > BOOLEAN|0x40000009 > > [PcdsFixedAtBuild, PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx] > > gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x00000000|UINT32| > 0x00001001 > -- > 2.7.0.windows.1