From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web09.1768.1582335530246421772 for ; Fri, 21 Feb 2020 17:38:50 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: miki.shindo@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2020 17:38:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,470,1574150400"; d="scan'208";a="437136260" Received: from mshindo-desk2.amr.corp.intel.com ([10.9.69.166]) by fmsmga006.fm.intel.com with ESMTP; 21 Feb 2020 17:38:48 -0800 From: miki.shindo@intel.com To: devel@edk2.groups.io Cc: Sai Chaganty , Chasel Chiu , Nate DeSimone , Prince Agyeman Subject: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib Date: Fri, 21 Feb 2020 17:37:31 -0800 Message-Id: <20200222013731.16204-1-miki.shindo@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2410 TPM measurements in PEI runs on FV_INFO_PPI notification function. Currently FvFspT is not installed so it is not measured by TPM. This commit makes FvFspT installed by FV_INFO_PPI so the measurement would run for FvFspT. FvFspT code actually runs, it has to be measured. Signed-off-by: Miki Shindo Cc: Sai Chaganty Cc: Chasel Chiu Cc: Nate DeSimone Cc: Prince Agyeman --- .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c | 13 ++++++++++++- .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c index 0d805d6fe7..6158fc9412 100644 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c @@ -1,7 +1,7 @@ /** @file Source code file for Report Firmware Volume (FV) library -Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -31,6 +31,17 @@ ReportPreMemFv ( 0 ); } + if (PcdGetBool(PcdFspWrapperBootMode)) { + DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize))); + PeiServicesInstallFvInfo2Ppi ( + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBase))->FileSystemGuid), + (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase), + PcdGet32 (PcdFlashFvFspTSize), + NULL, + NULL, + 0 + ); + } DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize))); PeiServicesInstallFvInfo2Ppi ( &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase))->FileSystemGuid), diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf index ef03e110bd..79cd5ee1f7 100644 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf @@ -1,7 +1,7 @@ ### @file # Component information file for the Report Firmware Volume (FV) library. # -# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -36,6 +36,8 @@ gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize ## CONSUMES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase ## CONSUMES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize ## CONSUMES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase ## CONSUMES -- 2.16.2.windows.1