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.web09.6011.1583200561274881031 for ; Mon, 02 Mar 2020 17:56:01 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: miki.shindo@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2020 17:56:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,509,1574150400"; d="scan'208";a="286835102" Received: from mshindo-desk2.amr.corp.intel.com ([10.9.69.166]) by FMSMGA003.fm.intel.com with ESMTP; 02 Mar 2020 17:56:00 -0800 From: "Miki Shindo" To: devel@edk2.groups.io Cc: Sai Chaganty , Chasel Chiu , Nate DeSimone , Prince Agyeman Subject: [edk2-platform:PATCH v2] MinPlatformPkg/PeiReportFvLib: Remove redundant Fsp Fv installation Date: Mon, 2 Mar 2020 17:49:45 -0800 Message-Id: <20200303014945.25312-1-miki.shindo@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 REF : https://bugzilla.tianocore.org/show_bug.cgi?id=2542 ReportPreMemFv () has redundant calls to install Fsp FVs. FSP-M, S, U FVs do not need to be installed when Fsp Wrapper Boot Mode is disabled. Signed-off-by: Miki Shindo Cc: Sai Chaganty Cc: Chasel Chiu Cc: Nate DeSimone Cc: Prince Agyeman --- Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c | 38 +++++++------------------------------- Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf | 6 ------ 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c index 6158fc9412..1fad384cd6 100644 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c @@ -20,17 +20,9 @@ ReportPreMemFv ( VOID ) { - if (!PcdGetBool(PcdFspWrapperBootMode)) { - DEBUG ((DEBUG_INFO, "Install FlashFvFspM - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspMBase), PcdGet32 (PcdFlashFvFspMSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspMBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspMBase), - PcdGet32 (PcdFlashFvFspMSize), - NULL, - NULL, - 0 - ); - } + /// + /// Note : FSP FVs except FSP-T FV are installed in IntelFsp2Wrapper Pkg or FspPkg in Dispatch mode. + /// if (PcdGetBool(PcdFspWrapperBootMode)) { DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize))); PeiServicesInstallFvInfo2Ppi ( @@ -80,6 +72,10 @@ ReportPostMemFv ( Status = PeiServicesGetBootMode (&BootMode); ASSERT_EFI_ERROR (Status); + /// + /// Note : FSP FVs except FSP-T FV are installed in IntelFsp2Wrapper Pkg or FspPkg in Dispatch mode. + /// + /// /// Build HOB for DXE /// @@ -97,26 +93,6 @@ ReportPostMemFv ( NULL, 0 ); - if (!PcdGetBool(PcdFspWrapperBootMode)) { - DEBUG ((DEBUG_INFO, "Install FlashFvFspS - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspSBase), PcdGet32 (PcdFlashFvFspSSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspSBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspSBase), - PcdGet32 (PcdFlashFvFspSSize), - NULL, - NULL, - 0 - ); - DEBUG ((DEBUG_INFO, "Install FlashFvFspU - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspUBase), PcdGet32 (PcdFlashFvFspUSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspUBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspUBase), - PcdGet32 (PcdFlashFvFspUSize), - NULL, - NULL, - 0 - ); - } DEBUG ((DEBUG_INFO, "Install FlashFvUefiBoot - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvUefiBootBase), PcdGet32 (PcdFlashFvUefiBootSize))); PeiServicesInstallFvInfo2Ppi ( &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvUefiBootBase))->FileSystemGuid), diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf index 79cd5ee1f7..4258d0f2e7 100644 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf @@ -34,14 +34,8 @@ gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUSize ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase ## CONSUMES -- 2.16.2.windows.1