From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: star.zeng@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Sun, 14 Apr 2019 03:15:33 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Apr 2019 03:15:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,348,1549958400"; d="scan'208";a="142611363" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 14 Apr 2019 03:15:32 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 14 Apr 2019 03:15:32 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 14 Apr 2019 03:15:32 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.39]) with mapi id 14.03.0415.000; Sun, 14 Apr 2019 18:15:30 +0800 From: "Zeng, Star" To: "Chiu, Chasel" , "devel@edk2.groups.io" CC: "Desimone, Nathaniel L" , "Zeng, Star" Subject: Re: [PATCH] IntelFsp2WrapperPkg: Perform post FSP-S process. Thread-Topic: [PATCH] IntelFsp2WrapperPkg: Perform post FSP-S process. Thread-Index: AQHU8UDGWcVrhKGR3k6AnsN+1pOWRqY7cqIw Date: Sun, 14 Apr 2019 10:15:29 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB048310402B6902@shsmsx102.ccr.corp.intel.com> References: <20190412150203.14836-1-chasel.chiu@intel.com> In-Reply-To: <20190412150203.14836-1-chasel.chiu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmU4MjAyZTEtZTRmYS00NDE1LTk5Y2ItOTFmNDYxODUwOTVkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiczM4STlvVVlaU1wvRitJbGNCUzBibDRrVnI3R2w5N2dNREhNZmdmRWI4MVZwaUNWN2M0WG5vQnF3SHk5aXdSbCsifQ== dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: star.zeng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Minor comment inline. > -----Original Message----- > From: Chiu, Chasel > Sent: Friday, April 12, 2019 11:02 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Zeng, Star > Subject: [PATCH] IntelFsp2WrapperPkg: Perform post FSP-S process. >=20 > From: "Chasel, Chiu" >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1716 >=20 > In API mode FSP wrapper will perform some post FSP-S process but such > process was skipped in Dispatch mode which may impact some of boot > loaders. > To align behavior between API and Dispatch, an End-of-Pei callback is > introduced to perform same process in Dispatch mode. >=20 > Test: Verified on internal platform and both > FSP API and Dispatch modes booted successfully. >=20 > Cc: Nate DeSimone > Cc: Star Zeng > Contributed-under: TianoCore Contribution Agreement 1.1 This line should be not needed for new license. > Signed-off-by: Chasel Chiu > --- > IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 50 > +++++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 49 insertions(+), 1 deletion(-) >=20 > diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > index bb126797ae..c1823656ed 100644 > --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > @@ -3,7 +3,7 @@ > register TemporaryRamDonePpi to call TempRamExit API, and register > MemoryDiscoveredPpi > notify to call FspSiliconInit API. >=20 > - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
> + Copyright (c) 2014 - 2019, Intel Corporation. All rights > + reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -179,6 +179,46 @@ FspSiliconInitDoneGetFspHobList ( } >=20 > /** > + This function is for FSP dispatch mode to perform post FSP-S process. > + > + @param[in] PeiServices Pointer to PEI Services Table. > + @param[in] NotifyDesc Pointer to the descriptor for the Notificati= on > event that > + caused this function to execute. > + @param[in] Ppi Pointer to the PPI data associated with this > function. > + > + @retval EFI_STATUS Status returned by PeiServicesInstallPpi () > +**/ > +EFI_STATUS > +EFIAPI > +FspsWrapperEndOfPeiNotify ( > + IN EFI_PEI_SERVICES **PeiServices, > + IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, > + IN VOID *Ppi > + ) > +{ > + EFI_STATUS Status; > + > + // > + // In Dispatch mode no FspHobList so passing NULL // > + PostFspsHobProcess (NULL); Why this calling is needed? > + > + // > + // Install FspSiliconInitDonePpi so that any other driver can consume = this > info. > + // > + Status =3D PeiServicesInstallPpi (&mPeiFspSiliconInitDonePpi); There is a typo "FReturn" in FspSiliconInitDoneGetFspHobList, up to you to = fix it or not in this patch. Thanks, Star=20 > + ASSERT_EFI_ERROR(Status); > + > + return Status; > +} > + > +EFI_PEI_NOTIFY_DESCRIPTOR mFspsWrapperEndOfPeiNotifyDesc =3D { > + (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | > +EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), > + &gEfiEndOfPeiSignalPpiGuid, > + FspsWrapperEndOfPeiNotify > +}; > + > +/** > This function is called after PEI core discover memory and finish migr= ation. >=20 > @param[in] PeiServices Pointer to PEI Services Table. > @@ -341,6 +381,8 @@ FspsWrapperPeimEntryPoint ( > IN CONST EFI_PEI_SERVICES **PeiServices > ) > { > + EFI_STATUS Status; > + > DEBUG ((DEBUG_INFO, "FspsWrapperPeimEntryPoint\n")); >=20 > if (PcdGet8 (PcdFspModeSelection) =3D=3D 1) { @@ -353,6 +395,12 @@ > FspsWrapperPeimEntryPoint ( > NULL, > NULL > ); > + > + // > + // Register EndOfPei Nofity to run post FSP-S process. > + // > + Status =3D PeiServicesNotifyPpi (&mFspsWrapperEndOfPeiNotifyDesc); > + ASSERT_EFI_ERROR (Status); > } >=20 > return EFI_SUCCESS; > -- > 2.13.3.windows.1