From nobody Mon Feb 9 19:05:06 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+63753+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+63753+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1596674033; cv=none; d=zohomail.com; s=zohoarc; b=eM+eMxUcVupb13hy3udJmQyhzkJURj67NpYBMx79uf9ErD67Cw6eGo1J2D2vVSF81q7FFQrCij9m5PtOdu8GibRl/86qWjTgBZHK0od9+/jmndwf49MNzmt7BykKiYiNduVzvHW9ADC4kBoRtqFy0vU5GGXr61lipuBflJS4hG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596674033; 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=BvuaXuEvhbS0TTH+PxzsD28O1zGBTEhIqpmahR4KRHs=; b=QMoTrvJlTIiIZ2tWitmRhocoH7FL0iOeVILP9H8FG8iaUuy4aiUWc8Ua+fO6zRqBAHxognTbCDoUUBdb+FT25MjM4NNBhFLggRGxsxiZ9QHZjBCl8PR9qqA4w+fk5wL4TSDCEhyUJLGQ/F3uuzl6QNv/GYSzmaQ/br6jhmg8/9s= 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+63753+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 1596674033013140.04797078815807; Wed, 5 Aug 2020 17:33:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Tas4YY1788612xWg2Ieitipx; Wed, 05 Aug 2020 17:33:52 -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:52 -0700 IronPort-SDR: T4m9FPco6RyQ3HFHjglEZXsrIq7YHETn4PNWOmRUiJl/ZfiiT4/is1UlFERU6no8uQuehvbgsd UK6FiWpgU7gA== X-IronPort-AV: E=McAfee;i="6000,8403,9704"; a="150152777" X-IronPort-AV: E=Sophos;i="5.75,439,1589266800"; d="scan'208";a="150152777" 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:52 -0700 IronPort-SDR: NHwQDes8tJMfQCwzI3y33ky+2b6PPdsm+aR8ri1QNkTYOWnmZU4nM3EWPRjxuUIrj71ukgCczN Tu27PeBATEVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,439,1589266800"; d="scan'208";a="274924382" X-Received: from shwdesssddpdqi.ccr.corp.intel.com ([10.239.9.10]) by fmsmga007.fm.intel.com with ESMTP; 05 Aug 2020 17:33:50 -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 2/9] MdeModulePkg/NullTpmMeasurementLib: Add new API. Date: Thu, 6 Aug 2020 08:33:35 +0800 Message-Id: <20200806003342.17866-3-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: IS2hHb8dkf2DAZtqpGMYZe3Mx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1596674032; bh=pSVuXXbRtFVKjGGlI2eXsDsLZUt287BjIEngMCiyW3U=; h=Cc:Date:From:Reply-To:Subject:To; b=n1eyLkw2s0V4q6pWZhezfLIjDzBd29jqXJGe9qeB4/eM628z71CpuMEcFCc3rMq/hnd dK2Idq1w9Xa0stnAyzEuaQXG2Fyj7h6oc8PWjpX1KdFGu5a6yuArxxRdQAVpxixZXPqhs oyLJAt03pQHptjwu2QCvwzy8vbrdUf/qkTA= 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: Jiewen Yao Cc: Jian J Wang Cc: Hao A Wu Cc: Qi Zhang Signed-off-by: Jiewen Yao --- .../TpmMeasurementLibNull.c | 61 ++++++++++++++++++- .../TpmMeasurementLibNull.inf | 6 +- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNu= ll.c b/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.c index b9c5b68de8..2ce38d8258 100644 --- a/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.c +++ b/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.c @@ -1,11 +1,13 @@ /** @file This library is used by other modules to measure data to TPM. =20 -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 +#include + /** Tpm measure and log data, and extend the measurement result into a speci= fic PCR. =20 @@ -37,3 +39,60 @@ TpmMeasureAndLogData ( // return EFI_SUCCESS; } + +/** + Mesure a FirmwareBlob. + + @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 + ) +{ + // + // Do nothing, just return EFI_SUCCESS. + // + return EFI_SUCCESS; +} + +/** + 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 + ) +{ + // + // Do nothing, just return EFI_SUCCESS. + // + return EFI_SUCCESS; +} diff --git a/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNu= ll.inf b/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.i= nf index 61abcfa2ec..1db2c0d6a7 100644 --- a/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf +++ b/MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf @@ -1,7 +1,7 @@ ## @file # Provides NULL TPM measurement function. # -# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -10,9 +10,9 @@ INF_VERSION =3D 0x00010005 BASE_NAME =3D TpmMeasurementLibNull FILE_GUID =3D 6DFD6E9F-9278-48D8-8F45-B6CFF2C2B69C - MODULE_TYPE =3D UEFI_DRIVER + MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D TpmMeasurementLib|DXE_DRIVER DXE_RUNT= IME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER + LIBRARY_CLASS =3D TpmMeasurementLib MODULE_UNI_FILE =3D TpmMeasurementLibNull.uni =20 # --=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 (#63753): https://edk2.groups.io/g/devel/message/63753 Mute This Topic: https://groups.io/mt/76019583/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-