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] SecurityPkg: Tcg2PhysicalPresence: Define TPM2 PP Flags Initial Pcd
Date: Wed, 28 Dec 2016 02:17:09 +0000	[thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8D5F4F@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1482886717-3924-1-git-send-email-chao.b.zhang@intel.com>

Reviewed-by: Jiewen.yao@Intel.com

> -----Original Message-----
> From: Zhang, Chao B
> Sent: Wednesday, December 28, 2016 8:59 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] SecurityPkg: Tcg2PhysicalPresence: Define TPM2 PP Flags Initial
> Pcd
> 
> Define PcdTpm2PhysicalPresenceFlags to initialize TPM2 PP Flags setting.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
> ---
>  .../Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.c | 3 ++-
>  .../DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf       | 5
> ++++-
>  SecurityPkg/SecurityPkg.dec                                         | 6
> ++++++
>  3 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git
> a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.
> c
> b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.
> c
> index a077b03..8ffc1d9 100644
> ---
> a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.
> c
> +++
> b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.
> c
> @@ -932,7 +932,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
>                    &PpiFlags
>                    );
>    if (EFI_ERROR (Status)) {
> -    PpiFlags.PPFlags = TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT |
> TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT;
> +    PpiFlags.PPFlags = PcdGet32(PcdTpm2PhysicalPresenceFlags);
>      Status   = gRT->SetVariable (
>                        TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE,
>                        &gEfiTcg2PhysicalPresenceGuid,
> @@ -944,6 +944,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
>        DEBUG ((EFI_D_ERROR, "[TPM2] Set physical presence flag failed, Status
> = %r\n", Status));
>        return ;
>      }
> +    DEBUG((DEBUG_INFO, "[TPM2] Initial physical presence flags value is
> 0x%x\n", PpiFlags.PPFlags));
>    }
> 
>    //
> diff --git
> a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.i
> nf
> b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.
> inf
> index f4aa0da..0e04e6b 100644
> ---
> a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.i
> nf
> +++
> b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.
> inf
> @@ -8,7 +8,7 @@
>  #  This driver will have external input - variable.
>  #  This external input must be validated carefully to avoid security issue.
>  #
> -# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
>  # 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
> @@ -60,6 +60,9 @@
>    gEfiTcg2ProtocolGuid                 ## SOMETIMES_CONSUMES
>    gEdkiiVariableLockProtocolGuid       ## SOMETIMES_CONSUMES
> 
> +[Pcd]
> +  gEfiSecurityPkgTokenSpaceGuid.PcdTpm2PhysicalPresenceFlags       ##
> SOMETIMES_CONSUMES
> +
>  [Guids]
>    ## SOMETIMES_CONSUMES ## HII
>    ## SOMETIMES_PRODUCES ## Variable:L"Tcg2PhysicalPresence"
> diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
> index 02fdd98..7364ccf 100644
> --- a/SecurityPkg/SecurityPkg.dec
> +++ b/SecurityPkg/SecurityPkg.dec
> @@ -431,6 +431,12 @@
>    # @Prompt Revision of TPM2 ACPI table
>    gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|3|UINT8|0x0001001A
> 
> +  ## This PCD defines initial setting of TPM 2.0 Persistent Firmware TPM
> Management Flags
> +  # PCD can be configured for different settings in different scenarios
> +  # Default setting is TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT |
> TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT
> +  # @Prompt Inital setting of TPM 2.0 Persistent Firmware TPM Management
> Flags
> +
> gEfiSecurityPkgTokenSpaceGuid.PcdTpm2PhysicalPresenceFlags|0x300E3|UINT3
> 2|0x0001001B
> +
>  [PcdsDynamic, PcdsDynamicEx]
> 
>    ## This PCD indicates Hash mask for TPM 2.0.<BR><BR>
> --
> 1.9.5.msysgit.1



      reply	other threads:[~2016-12-28  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28  0:58 [PATCH] SecurityPkg: Tcg2PhysicalPresence: Define TPM2 PP Flags Initial Pcd Zhang, Chao B
2016-12-28  2:17 ` 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=74D8A39837DF1E4DA445A8C0B3885C503A8D5F4F@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