From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web11.3442.1596674029695996418 for ; Wed, 05 Aug 2020 17:33:50 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: qi1.zhang@intel.com) IronPort-SDR: hiSiEoEycoJZzpvzP+hsbXv3ujrh3GQua7rLIAUkSXY+gp5o9lMURqFIasWeXEH92JTBHo5cUo udehLDj7n0mQ== X-IronPort-AV: E=McAfee;i="6000,8403,9704"; a="150152757" X-IronPort-AV: E=Sophos;i="5.75,439,1589266800"; d="scan'208";a="150152757" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2020 17:33:50 -0700 IronPort-SDR: 4T2Bs38sePEykbAEIf/1CrPVKRjfcxP1pWkJTmbaPI+PV9oYHFUpotzaAhe/9Tffkn+J6e0p7u VVNdPJTLua3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,439,1589266800"; d="scan'208";a="274924368" Received: from shwdesssddpdqi.ccr.corp.intel.com ([10.239.9.10]) by fmsmga007.fm.intel.com with ESMTP; 05 Aug 2020 17:33:48 -0700 From: "Qi Zhang" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Hao A Wu , Qi Zhang Subject: [PATCH v2 1/9] MdeModulePkg/TpmMeasurementLib: Add new API to TpmMeasurmentLib. Date: Thu, 6 Aug 2020 08:33:34 +0800 Message-Id: <20200806003342.17866-2-qi1.zhang@intel.com> X-Mailer: git-send-email 2.26.2.windows.1 In-Reply-To: <20200806003342.17866-1-qi1.zhang@intel.com> References: <20200806003342.17866-1-qi1.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jiewen Yao REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2376 Cc: Jian J Wang Cc: Hao A Wu Cc: Qi Zhang Signed-off-by: Jiewen Yao --- .../Include/Library/TpmMeasurementLib.h | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Include/Library/TpmMeasurementLib.h b/MdeModulePk= g/Include/Library/TpmMeasurementLib.h index ddf6723f03..5a0f97d208 100644 --- a/MdeModulePkg/Include/Library/TpmMeasurementLib.h +++ b/MdeModulePkg/Include/Library/TpmMeasurementLib.h @@ -1,7 +1,7 @@ /** @file=0D This library is used by other modules to measure data to TPM.=0D =0D -Copyright (c) 2012, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -35,4 +35,50 @@ TpmMeasureAndLogData ( IN UINT64 HashDataLen=0D );=0D =0D +/**=0D + Mesure a FirmwareBlob.=0D +=0D + @param[in] PcrIndex PCR Index.=0D + @param[in] Descrption Description for this FirmwareBlob.=0D + @param[in] FirmwareBlobBase Base address of this FirmwareBlob.=0D + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob.= =0D +=0D + @retval EFI_SUCCESS Operation completed successfully.=0D + @retval EFI_UNSUPPORTED TPM device not available.=0D + @retval EFI_OUT_OF_RESOURCES Out of memory.=0D + @retval EFI_DEVICE_ERROR The operation was unsuccessful.=0D +*/=0D +EFI_STATUS=0D +EFIAPI=0D +MeasureFirmwareBlob (=0D + IN UINT32 PcrIndex,=0D + IN CHAR8 *Description OPTIONAL,=0D + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase,=0D + IN UINT64 FirmwareBlobLength=0D + );=0D +=0D +/**=0D + Mesure a HandoffTable.=0D +=0D + @param[in] PcrIndex PcrIndex of the measurment.=0D + @param[in] Descrption Description for this HandoffTable.=0D + @param[in] TableGuid GUID of this HandoffTable.=0D + @param[in] TableAddress Base address of this HandoffTable.=0D + @param[in] TableLength Size in bytes of this HandoffTable.= =0D +=0D + @retval EFI_SUCCESS Operation completed successfully.=0D + @retval EFI_UNSUPPORTED TPM device not available.=0D + @retval EFI_OUT_OF_RESOURCES Out of memory.=0D + @retval EFI_DEVICE_ERROR The operation was unsuccessful.=0D +*/=0D +EFI_STATUS=0D +EFIAPI=0D +MeasureHandoffTable (=0D + IN UINT32 PcrIndex,=0D + IN CHAR8 *Description OPTIONAL,=0D + IN EFI_GUID *TableGuid,=0D + IN VOID *TableAddress,=0D + IN UINTN TableLength=0D + );=0D +=0D #endif=0D --=20 2.26.2.windows.1