From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 8670681C01 for ; Wed, 11 Jan 2017 19:26:53 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP; 11 Jan 2017 19:26:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,348,1477983600"; d="scan'208";a="1093010459" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 11 Jan 2017 19:26:53 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Jan 2017 19:26:53 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Jan 2017 19:26:52 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Thu, 12 Jan 2017 11:26:50 +0800 From: "Yao, Jiewen" To: "Zhang, Chao B" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [PATCH] SecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table Thread-Index: AQHSbH3HFA5E2em2p0akrfAbrPAfYaE0LmYg Date: Thu, 12 Jan 2017 03:26:49 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8DF006@shsmsx102.ccr.corp.intel.com> References: <20170112024414.21444-1-chao.b.zhang@intel.com> In-Reply-To: <20170112024414.21444-1-chao.b.zhang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 03:26:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: jiewen.yao@intel.com > -----Original Message----- > From: Zhang, Chao B > Sent: Thursday, January 12, 2017 10:44 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zeng, Star ; > Zhang, Chao B > Subject: [PATCH] SecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table >=20 > Add PlatformClass info into TPM2 ACPI table, it is only valid with table > Rev 4 and later. >=20 > Cc: Star Zeng > Cc: Yao Jiewen > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Chao Zhang > --- > SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 10 ++++++++++ > SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf | 1 + > 2 files changed, 11 insertions(+) >=20 > diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > index 0c3b19c..5a1fd3e 100644 > --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > @@ -513,6 +513,16 @@ PublishTpm2 ( > DEBUG((DEBUG_INFO, "Tpm2 ACPI table revision is %d\n", > mTpm2AcpiTemplate.Header.Revision)); >=20 > // > + // PlatformClass is only valid for version 4 and above > + // BIT0~15: PlatformClass > + // BIT16~31: Reserved > + // > + if (mTpm2AcpiTemplate.Header.Revision >=3D > EFI_TPM2_ACPI_TABLE_REVISION_4) { > + mTpm2AcpiTemplate.Flags =3D (mTpm2AcpiTemplate.Flags & 0xFFFF0000) | > PcdGet8(PcdTpmPlatformClass); > + DEBUG((DEBUG_INFO, "Tpm2 ACPI table PlatformClass is %d\n", > (mTpm2AcpiTemplate.Flags & 0x0000FFFF))); > + } > + > + // > // Measure to PCR[0] with event EV_POST_CODE ACPI DATA > // > TpmMeasureAndLogData( > diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > index 2793242..7018474 100644 > --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > @@ -74,6 +74,7 @@ > gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress ## > CONSUMES > gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer ## > CONSUMES > gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev ## > CONSUMES > + gEfiSecurityPkgTokenSpaceGuid.PcdTpmPlatformClass ## > SOMETIMES_CONSUMES >=20 > [Depex] > gEfiAcpiTableProtocolGuid AND > -- > 1.9.5.msysgit.1