From nobody Mon Feb 9 07:05:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+63752+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+63752+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1596674031; cv=none; d=zohomail.com; s=zohoarc; b=SN+Ee9bBogx7XNPVwgRJ8UMf6yzptUJqKnbsOaIcImAsaIJhwb1O5N8XEahcBxyYB20Q6YDX/SWTelo3yd759YXl5f14ENCOxuKhEJnmMDNJXjhMukCiI2aUI2BM4GJZ2aQ+6/2klD8Dr/M8Q3NGjSgZgSVd16Ton4hBLiNMPLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596674031; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4dhwl/1HgYqJugztRe3RFiVJrtq/mqmrQ4imiETA0eg=; b=mb80pyx3dy6z8P44Sd4ckBFBmZW28/+yGP+ZduMxwBe03NRWVawm+xdY0QZkw/GVnCpRwbvqMX1ro1ZeTeAW/nsgHYM8uOxTv7aj1pUsJ982KmC+Yt6VanyLmaPhwJi7LR6Jkj6ZxiruGkvMEBo6gh5b2E7z37npIopG6/vH5tI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+63752+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1596674031740105.24889140990956; Wed, 5 Aug 2020 17:33:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DN8yYY1788612xwTyGUCKiRY; Wed, 05 Aug 2020 17:33:51 -0700 X-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 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 X-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" X-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: [edk2-devel] [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> In-Reply-To: <20200806003342.17866-1-qi1.zhang@intel.com> References: <20200806003342.17866-1-qi1.zhang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,qi1.zhang@intel.com X-Gm-Message-State: Vef5S7wcp1YES8Zthxm6hqYGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1596674031; bh=AypXuVzqunf0PyZ0dCTgroHfqpi0kMDOIen8ZXjs5O0=; h=Cc:Date:From:Reply-To:Subject:To; b=U1A+7AogjsvlslISr0oFgQygYjmjV2U0YWOZmDjIofBDOpnEoiExx4IqJOnPjA56pFo sRJrbFaBPUtYn5VF54CTGOQXDLpXPX48b4IxLRuNXLyBOymAhethza5l3kKO0tuTh1ef1 6PQP6GJNyjAkY1mZ+XhP7Mdsl2n7K1BYzkY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 This library is used by other modules to measure data to TPM. =20 -Copyright (c) 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -35,4 +35,50 @@ TpmMeasureAndLogData ( IN UINT64 HashDataLen ); =20 +/** + Mesure a FirmwareBlob. + + @param[in] PcrIndex PCR Index. + @param[in] Descrption Description for this FirmwareBlob. + @param[in] FirmwareBlobBase Base address of this FirmwareBlob. + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob. + + @retval EFI_SUCCESS Operation completed successfully. + @retval EFI_UNSUPPORTED TPM device not available. + @retval EFI_OUT_OF_RESOURCES Out of memory. + @retval EFI_DEVICE_ERROR The operation was unsuccessful. +*/ +EFI_STATUS +EFIAPI +MeasureFirmwareBlob ( + IN UINT32 PcrIndex, + IN CHAR8 *Description OPTIONAL, + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, + IN UINT64 FirmwareBlobLength + ); + +/** + Mesure a HandoffTable. + + @param[in] PcrIndex PcrIndex of the measurment. + @param[in] Descrption Description for this HandoffTable. + @param[in] TableGuid GUID of this HandoffTable. + @param[in] TableAddress Base address of this HandoffTable. + @param[in] TableLength Size in bytes of this HandoffTable. + + @retval EFI_SUCCESS Operation completed successfully. + @retval EFI_UNSUPPORTED TPM device not available. + @retval EFI_OUT_OF_RESOURCES Out of memory. + @retval EFI_DEVICE_ERROR The operation was unsuccessful. +*/ +EFI_STATUS +EFIAPI +MeasureHandoffTable ( + IN UINT32 PcrIndex, + IN CHAR8 *Description OPTIONAL, + IN EFI_GUID *TableGuid, + IN VOID *TableAddress, + IN UINTN TableLength + ); + #endif --=20 2.26.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63752): https://edk2.groups.io/g/devel/message/63752 Mute This Topic: https://groups.io/mt/76019582/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-