From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.411.1573712555062592504 for ; Wed, 13 Nov 2019 22:22:35 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 22:22:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="216641602" Received: from nldesimo-desk1.amr.corp.intel.com ([10.7.159.63]) by orsmga002.jf.intel.com with ESMTP; 13 Nov 2019 22:22:34 -0800 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Michael Kubacki , Sai Chaganty , Liming Gao , Isaac W Oram , Jeremy Soller Subject: [edk2-platforms] [PATCH V1 00/13] SecFspWrapperPlatformSecLib Cleanup Date: Wed, 13 Nov 2019 22:06:42 -0800 Message-Id: <20191114060655.5161-1-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This patch series cleans up two outstanding problems with=0D SecFspWrapperPlatformSecLib:=0D =0D 1. There are several copies of SecFspWrapperPlatformSecLib=0D thoughout the codebase, this patch series consolidates=0D the various implementations down to a single implementation=0D contained in MinPlatformPkg.=0D =0D The WhiskeylakeOpenBoardPkg implementation of=0D SecFspWrapperPlatformSecLib diverged from MinPlatformPkg by=0D halting the TCO watch dog timer early in SEC instead of=0D early in PEI. Analysis of this change has shown that it is=0D unnessesary, so this patch series move that code back to PEI.=0D =0D The KabylakeOpenBoardPkg implementation of=0D SecFspWrapperPlatformSecLib contains support for FSP dispatch=0D mode. This was integrated into MinPlatformPkg, eliminating the=0D need for KabylakeOpenBoardPkg version.=0D =0D 2. Due to EFI_PEI_TEMPORARY_RAM_DONE_PPI being implemented=0D by SecMain, the BoardInitLib event callbacks for=0D BeforeTempRamExit() and AfterTempRamExit() are currently=0D linked by PlatformSecLib. Linking BoardInitLib in SEC=0D phase places a lot of restrictions on how BoardInitLib=0D is implemented. To mitigate this, the BoardInitLib calls=0D have been moved to a PlatformInitPreMem.=0D PlatformInitPreMem is invoked by PlatformSecLib using the=0D new PLATFORM_INIT_TEMP_RAM_EXIT_PPI, which then invokes=0D the BoardInitLib event callbacks. =0D This patch series also includes some general cleanup.=0D =0D Cc: Chasel Chiu =0D Cc: Michael Kubacki =0D Cc: Sai Chaganty =0D Cc: Liming Gao =0D Cc: Isaac W Oram =0D Cc: Jeremy Soller =0D Signed-off-by: Nate DeSimone =0D Nate DeSimone (13): KabylakeSiliconPkg: Change MODULE_TYPE of SiliconInitLib to PEIM KabylakeOpenBoardPkg: Update location of SiliconInitLib KabylakeSiliconPkg: Cleanup old comments CoffeeLakeSiliconPkg: Move TcoWdtHob.h CoffeelakeSiliconPkg: Add SiliconInitLib WhiskeylakeOpenBoardPkg: Add SiliconInitLib APIs to BoardInitLib WhiskeylakeOpenBoardPkg: Whitespace cleanup in BoardInitLib WhiskeylakeOpenBoardPkg: Remove SecFspWrapperPlatformSecLib override MinPlatformPkg: FSP Dispatch Mode Support for PlatformSecLib MinPlatformPkg: Coding style cleanups in MinPlatformPkg.dec KabylakeOpenBoardPkg: Add support for PcdFspDispatchModeUseFspPeiMain KabylakeOpenBoardPkg: Remove SecFspWrapperPlatformSecLib override MinPlatformPkg: Remove BoardInitLib dependency from PlatformSecLib .../FspWrapperPlatformSecLib.c | 186 --------- .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 40 -- .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h | 42 -- .../Ia32/PeiCoreEntry.nasm | 130 ------- .../Ia32/SecEntry.nasm | 361 ------------------ .../Ia32/Stack.nasm | 72 ---- .../PlatformInit.c | 47 --- .../SecFspWrapperPlatformSecLib.inf | 97 ----- .../SecGetPerformance.c | 89 ----- .../SecPlatformInformation.c | 78 ---- .../SecRamInitData.c | 36 -- .../SecTempRamDone.c | 73 ---- .../GalagoPro3/OpenBoardPkg.dsc | 4 +- .../KabylakeRvp3/OpenBoardPkg.dsc | 4 +- .../KabylakeRvp3/OpenBoardPkg.fdf | 5 +- .../KabylakeRvp3/OpenBoardPkgPcd.dsc | 20 + .../FspWrapperPlatformSecLib.c | 34 +- .../SecFspWrapperPlatformSecLib.inf | 8 +- .../SecTempRamDone.c | 72 +++- .../Include/Ppi/PlatformInitTempRamExitPpi.h | 55 +++ .../Intel/MinPlatformPkg/MinPlatformPkg.dec | 311 ++++++++------- .../PlatformInitPei/PlatformInitPreMem.c | 76 +++- .../PlatformInitPei/PlatformInitPreMem.inf | 1 + .../FspWrapperPlatformSecLib.c | 163 -------- .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 40 -- .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h | 43 --- .../Ia32/PeiCoreEntry.nasm | 130 ------- .../Ia32/SecEntry.nasm | 361 ------------------ .../Ia32/Stack.nasm | 72 ---- .../PlatformInit.c | 54 --- .../SecFspWrapperPlatformSecLib.inf | 97 ----- .../SecGetPerformance.c | 90 ----- .../SecPlatformInformation.c | 79 ---- .../SecRamInitData.c | 37 -- .../SecTempRamDone.c | 48 --- .../BoardInitLib/PeiBoardInitPostMemLib.inf | 1 + .../BoardInitLib/PeiBoardInitPreMemLib.inf | 1 + .../PeiMultiBoardInitPostMemLib.inf | 1 + .../PeiMultiBoardInitPreMemLib.inf | 2 +- .../PeiWhiskeylakeURvpInitPostMemLib.c | 191 +++++---- .../PeiWhiskeylakeURvpInitPreMemLib.c | 346 +++++++---------- .../BoardInitLib/WhiskeylakeURvpInit.h | 1 + .../WhiskeylakeURvp/OpenBoardPkg.dsc | 7 +- .../Include/Guid/TcoWdtHob.h | 0 .../Include/Library/SiliconInitLib.h | 28 ++ .../PeiSiliconInitLib/PeiSiliconInitLib.inf | 46 +++ .../Library/PeiSiliconInitLib/SiliconInit.c | 19 + .../PeiSiliconInitLib/SiliconInitPreMem.c | 109 ++++++ .../PeiSiliconInitLib.inf} | 3 +- .../SiliconInit.c | 0 .../SiliconInitPreMem.c | 4 +- 51 files changed, 863 insertions(+), 2951 deletions(-) delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/FsptCoreUpd.h delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/Ia32/Fsp.h delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.nasm delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/Ia32/Stack.nasm delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/PlatformInit.c delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/SecGetPerformance.c delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/SecPlatformInformation.c delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/SecRamInitData.c delete mode 100644 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/= SecFspWrapperPlatformSecLib/SecTempRamDone.c create mode 100644 Platform/Intel/MinPlatformPkg/Include/Ppi/PlatformInitT= empRamExitPpi.h delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/FsptCoreUpd.h delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/Ia32/Fsp.h delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.nasm delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/Ia32/Stack.nasm delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/PlatformInit.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/SecGetPerformance.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/SecPlatformInformation.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/SecRamInitData.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/FspWrapper/Libra= ry/SecFspWrapperPlatformSecLib/SecTempRamDone.c rename {Platform/Intel/WhiskeylakeOpenBoardPkg =3D> Silicon/Intel/Coffeela= keSiliconPkg}/Include/Guid/TcoWdtHob.h (100%) create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Include/Library/Sili= conInitLib.h create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Library/PeiSiliconIn= itLib/PeiSiliconInitLib.inf create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Library/PeiSiliconIn= itLib/SiliconInit.c create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Library/PeiSiliconIn= itLib/SiliconInitPreMem.c rename Silicon/Intel/KabylakeSiliconPkg/Library/{SiliconInitLib/SiliconIni= tLib.inf =3D> PeiSiliconInitLib/PeiSiliconInitLib.inf} (91%) rename Silicon/Intel/KabylakeSiliconPkg/Library/{SiliconInitLib =3D> PeiSi= liconInitLib}/SiliconInit.c (100%) rename Silicon/Intel/KabylakeSiliconPkg/Library/{SiliconInitLib =3D> PeiSi= liconInitLib}/SiliconInitPreMem.c (95%) --=20 2.23.0.windows.1