public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Zhang, Chao B" <chao.b.zhang@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] SecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table
Date: Thu, 12 Jan 2017 03:26:49 +0000	[thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8DF006@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20170112024414.21444-1-chao.b.zhang@intel.com>

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 <jiewen.yao@intel.com>; Zeng, Star <star.zeng@intel.com>;
> Zhang, Chao B <chao.b.zhang@intel.com>
> Subject: [PATCH] SecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table
> 
> Add PlatformClass info into TPM2 ACPI table, it is only valid with table
> Rev 4 and later.
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Yao Jiewen <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
> ---
>  SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c   | 10 ++++++++++
>  SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf |  1 +
>  2 files changed, 11 insertions(+)
> 
> 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));
> 
>    //
> +  // PlatformClass is only valid for version 4 and above
> +  //    BIT0~15:  PlatformClass
> +  //    BIT16~31: Reserved
> +  //
> +  if (mTpm2AcpiTemplate.Header.Revision >=
> EFI_TPM2_ACPI_TABLE_REVISION_4) {
> +    mTpm2AcpiTemplate.Flags = (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
> 
>  [Depex]
>    gEfiAcpiTableProtocolGuid AND
> --
> 1.9.5.msysgit.1



      parent reply	other threads:[~2017-01-12  3:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12  2:44 [PATCH] SecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table Zhang, Chao B
2017-01-12  2:49 ` Zeng, Star
2017-01-12  3:26 ` Yao, Jiewen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74D8A39837DF1E4DA445A8C0B3885C503A8DF006@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox