From nobody Sun May 5 10:58:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532143903371965.1717969728596; Fri, 20 Jul 2018 20:31:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id F2A7B210BFF55; Fri, 20 Jul 2018 20:31:40 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DA683210BFF4A for ; Fri, 20 Jul 2018 20:31:39 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2018 20:31:39 -0700 Received: from czhan46-mobl1.ccr.corp.intel.com ([10.249.168.149]) by orsmga002.jf.intel.com with ESMTP; 20 Jul 2018 20:31:37 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,382,1526367600"; d="scan'208";a="76597034" From: "Zhang, Chao B" To: edk2-devel@lists.01.org Date: Sat, 21 Jul 2018 11:31:31 +0800 Message-Id: <20180721033132.19752-2-chao.b.zhang@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 In-Reply-To: <20180721033132.19752-1-chao.b.zhang@intel.com> References: <20180721033132.19752-1-chao.b.zhang@intel.com> Subject: [edk2] [Patch 1/2] MdeModulePkg: Variable: Re-prioritize TCG/TCG2 protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yao@ml01.01.org, Jiewen , Long@ml01.01.org, Qin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" TPM1.2 is obsoleted by TPM2.0. switch TCG/TCG2 protocol check to apply this trend Cc: Long, Qin Cc: Yao, Jiewen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang, Chao B Reviewed-by: Jiewen.yao@intel.com --- MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c b/M= deModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c index c26616ecfe..28aa2893c6 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c @@ -2,11 +2,11 @@ TCG MOR (Memory Overwrite Request) Lock Control support (SMM version). =20 This module initilizes MemoryOverwriteRequestControlLock variable. This module adds Variable Hook and check MemoryOverwriteRequestControlLo= ck. =20 -Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at http://opensource.org/licenses/bsd-license.php =20 @@ -457,18 +457,18 @@ MorLockInitAtEndOfDxe ( // does not produce it. Whether this is the case (from the last OS boo= t) // can be deduced from the absence of the TCG / TCG2 protocols, as edk= 2's // MOR implementation depends on (one of) those protocols. // TcgStatus =3D gBS->LocateProtocol ( - &gEfiTcgProtocolGuid, - NULL, // Registration + &gEfiTcg2ProtocolGuid, + NULL, // Registration &TcgInterface ); if (EFI_ERROR (TcgStatus)) { TcgStatus =3D gBS->LocateProtocol ( - &gEfiTcg2ProtocolGuid, - NULL, // Registration + &gEfiTcgProtocolGuid, + NULL, // Registration &TcgInterface ); } =20 if (!EFI_ERROR (TcgStatus)) { --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 10:58:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 15321439063381014.3074622228633; Fri, 20 Jul 2018 20:31:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 348CA210BFF5A; Fri, 20 Jul 2018 20:31:42 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 89DAE210BFF58 for ; Fri, 20 Jul 2018 20:31:41 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2018 20:31:41 -0700 Received: from czhan46-mobl1.ccr.corp.intel.com ([10.249.168.149]) by orsmga002.jf.intel.com with ESMTP; 20 Jul 2018 20:31:39 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,382,1526367600"; d="scan'208";a="76597039" From: "Zhang, Chao B" To: edk2-devel@lists.01.org Date: Sat, 21 Jul 2018 11:31:32 +0800 Message-Id: <20180721033132.19752-3-chao.b.zhang@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 In-Reply-To: <20180721033132.19752-1-chao.b.zhang@intel.com> References: <20180721033132.19752-1-chao.b.zhang@intel.com> Subject: [edk2] [Patch 2/2] MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yao@ml01.01.org, Jiewen , Long@ml01.01.org, Qin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" TPM1.2 is obsoleted by TPM2.0. switch TCG/TCG2 protocol check to apply this trend Cc: Long, Qin Cc: Yao, Jiewen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang, Chao B Reviewed-by: Jiewen.yao@intel.com --- .../DxeTpmMeasurementLib/DxeTpmMeasurementLib.c | 23 +++++++++++-------= ---- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.= c b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c index 8c56a713d8..3aa034851d 100644 --- a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c +++ b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c @@ -182,25 +182,26 @@ TpmMeasureAndLogData ( ) { EFI_STATUS Status; =20 // - // Try to measure using Tpm1.2 protocol + // Try to measure using Tpm20 protocol // - Status =3D Tpm12MeasureAndLogData( - PcrIndex, - EventType, - EventLog, - LogLen, - HashData, - HashDataLen - ); + Status =3D Tpm20MeasureAndLogData( + PcrIndex, + EventType, + EventLog, + LogLen, + HashData, + HashDataLen + ); + if (EFI_ERROR (Status)) { // - // Try to measure using Tpm20 protocol + // Try to measure using Tpm1.2 protocol // - Status =3D Tpm20MeasureAndLogData( + Status =3D Tpm12MeasureAndLogData( PcrIndex, EventType, EventLog, LogLen, HashData, --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel