From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.7165.1635397209852428777 for ; Wed, 27 Oct 2021 22:00:10 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: min.m.xu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="291160655" X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="291160655" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 22:00:06 -0700 X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="498214289" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.238.4.37]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 22:00:03 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao , Jian J Wang , Ken Lu , Sami Mujawar Subject: [PATCH V3 0/3] Introduce TeeMeasurementProtocol into EDK2 Date: Thu, 28 Oct 2021 12:59:26 +0800 Message-Id: X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3625 If TEE-Guest firmware supports measurement and an event is created, TEE-Guest firmware is designed to report the event log with the same data structure in TCG-Platform-Firmware-Profile specification with EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 format. The TEE-Guest firmware supports measurement. It is designed to produce EFI_TEE_MEASUREMENT_PROTOCOL with new GUID EFI_TEE_MEASUREMENT_PROTOCOL_GUID to report event log and provides hash capability. Patch #1: Introduce the TEE Measurement Protocol definition into MdePkg. Patch #2: Update DxeTpm2MeasureBootLib to support TEE based measure boot. Patch #3: Update DxeTpmMeasurementLib to support TEE based measurement. Code is at https://github.com/mxu9/edk2/tree/td_protocol.v3 v3 changes: - Rename TdProtocol to TeeMeasurementProtocol which is a neutral name. With this protocol, TEE based measure boot is supported. TD based measure boot is one of the TEE based measure boot. - The spec will be updated according to the changes later. - Fix errors in DxeTpm2MeasureBootLib. v2 changes: - TD based measure boot is implemented in DxeTpm2MeasureBootLib. This minimize the code changes. - TD based measurement is added. It is implemented in DxeTpmMeasurementLib. - Fix the typo in comments. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Jiewen Yao Cc: Jian J Wang Cc: Ken Lu Cc: Sami Mujawar Signed-off-by: Min Xu Min Xu (3): MdePkg: Introduce TeeMeasurementProtocol for TEE Guest firmware SecurityPkg: Support TeeMeasurementProtocol in DxeTpm2MeasureBootLib SecurityPkg: Support TeeMeasurementProtocol in DxeTpmMeasurementLib MdePkg/Include/Protocol/TdProtocol.h | 36 ++ MdePkg/Include/Protocol/TeeMeasurement.h | 296 ++++++++++++++ MdePkg/MdePkg.dec | 3 + .../DxeTpm2MeasureBootLib.c | 364 ++++++++++++++---- .../DxeTpm2MeasureBootLib.inf | 1 + .../DxeTpmMeasurementLib.c | 88 ++++- .../DxeTpmMeasurementLib.inf | 5 +- 7 files changed, 720 insertions(+), 73 deletions(-) create mode 100644 MdePkg/Include/Protocol/TdProtocol.h create mode 100644 MdePkg/Include/Protocol/TeeMeasurement.h -- 2.29.2.windows.2