From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: chao.b.zhang@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Mon, 16 Sep 2019 18:28:28 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2019 18:28:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,514,1559545200"; d="scan'208,217";a="191245077" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 16 Sep 2019 18:28:26 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Sep 2019 18:28:25 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Sep 2019 18:28:25 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.113]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.146]) with mapi id 14.03.0439.000; Tue, 17 Sep 2019 09:28:23 +0800 From: "Zhang, Chao B" To: "Wang, Jian J" , "Gao, Liming" , "devel@edk2.groups.io" Subject: Re: [Patch v2] SecurityPkg Tcg2Config: Move common definitions to new Tcg2Internal.h Thread-Topic: [Patch v2] SecurityPkg Tcg2Config: Move common definitions to new Tcg2Internal.h Thread-Index: AQHVaTBKHRWzvkPxW0CYwcTu/7GnA6ctTsGAgAHNKRA= Date: Tue, 17 Sep 2019 01:28:23 +0000 Message-ID: References: <1568268405-780-1-git-send-email-liming.gao@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGE0NjQ2ZTItMDU1Yi00NWM5LWEwZGEtZDdhYjRhZjQ0NmM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN0xBbUNubDJCNWIyaG5hQUszTnRpSlNSaHY1eExwcEFMbGpkRUhCcGZaS2g2VjFqKzgzTlA1bHJWRXNaVzRORSJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: chao.b.zhang@intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_FF72C7E4248F3C4E9BDF19D4918E90F24DF25E86shsmsx102ccrcor_" --_000_FF72C7E4248F3C4E9BDF19D4918E90F24DF25E86shsmsx102ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by : Chao Zhang From: Wang, Jian J Sent: Monday, September 16, 2019 1:57 PM To: Gao, Liming ; devel@edk2.groups.io Cc: Zhang, Chao B Subject: RE: [Patch v2] SecurityPkg Tcg2Config: Move common definitions to = new Tcg2Internal.h Reviewed-by: Jian J Wang > > -----Original Message----- > From: Gao, Liming > Sent: Thursday, September 12, 2019 2:07 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J >; Z= hang, Chao B > > > Subject: [Patch v2] SecurityPkg Tcg2Config: Move common definitions to ne= w > Tcg2Internal.h > > Common definitions are not consumed by VFR. They are not required to be > defined in Tcg2ConfigNvData.h with WA way. New shared internal header > file is added to include those common definitions. > > Cc: Jian Wang > > Cc: Chao Zhang > > Signed-off-by: Liming Gao > > --- > In V2: > Keep struct TCG2_DEVICE_DETECTION in Tcg2ConfigNvData.h. > Only remove BUGBUG definition. > > SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 1 + > SecurityPkg/Tcg/Tcg2Config/TpmDetection.c | 1 + > SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf | 1 + > SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 3 +++ > SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h | 35 ---------------------= ------ > SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 1 + > SecurityPkg/Tcg/Tcg2Config/Tcg2Internal.h | 26 ++++++++++++++++++++ > 7 files changed, 33 insertions(+), 35 deletions(-) > create mode 100644 SecurityPkg/Tcg/Tcg2Config/Tcg2Internal.h > > diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c > b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c > index a50a128766..a15919685e 100644 > --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c > +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c > @@ -23,6 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > > #include "Tcg2ConfigNvData.h" > +#include "Tcg2Internal.h" > > TPM_INSTANCE_ID mTpmInstanceId[] =3D TPM_INSTANCE_ID_LIST; > > diff --git a/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c > b/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c > index 2f220c6c90..eeaadc5e2f 100644 > --- a/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c > +++ b/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c > @@ -20,6 +20,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > > #include "Tcg2ConfigNvData.h" > +#include "Tcg2Internal.h" > > /** > This routine check both SetupVariable and real TPM device, and return = final > TpmDevice configuration. > diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf > b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf > index 866e47d23e..6417ab82a1 100644 > --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf > +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf > @@ -30,6 +30,7 @@ > Tcg2Config.vfr > Tcg2ConfigStrings.uni > Tcg2ConfigNvData.h > + Tcg2Internal.h > > [Packages] > MdePkg/MdePkg.dec > diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h > b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h > index 4b0e18dfbb..af542d52ef 100644 > --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h > +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h > @@ -36,6 +36,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > > #include "Tcg2ConfigNvData.h" > +#include "Tcg2Internal.h" > + > +#define TCG2_PROTOCOL_VERSION_DEFAULT 0x0001 > > // > // Tool generated IFR binary data and String package data > diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h > b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h > index d0a124684f..a91c052850 100644 > --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h > +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h > @@ -13,15 +13,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > > -// > -// BUGBUG: In order to pass VfrCompiler, we have to redefine below MACRO= , > which already in . > -// > -#ifndef __TCG2_H__ > -#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 0x00000001 > -#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 0x00000002 > -#endif > -#define EFI_TCG2_EVENT_LOG_FORMAT_ALL > (EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 | > EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) > - > #define TCG2_CONFIGURATION_VARSTORE_ID 0x0001 > #define TCG2_CONFIGURATION_INFO_VARSTORE_ID 0x0002 > #define TCG2_VERSION_VARSTORE_ID 0x0003 > @@ -55,9 +46,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #define TPM_DEVICE_INTERFACE_MAX TPM_DEVICE_INTERFACE_PTP_FIFO > #define TPM_DEVICE_INTERFACE_DEFAULT > TPM_DEVICE_INTERFACE_PTP_CRB > > -#define TCG2_PROTOCOL_VERSION_DEFAULT 0x0001 > -#define EFI_TCG2_EVENT_LOG_FORMAT_DEFAULT > EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 > - > #define TCG2_PPI_VERSION_1_2 0x322E31 // "1.2" > #define TCG2_PPI_VERSION_1_3 0x332E31 // "1.3" > > @@ -97,27 +85,4 @@ typedef struct { > #define TCG2_DEVICE_DETECTION_NAME L"TCG2_DEVICE_DETECTION" > #define TCG2_VERSION_NAME L"TCG2_VERSION" > > -#define TPM_INSTANCE_ID_LIST { \ > - {TPM_DEVICE_INTERFACE_NONE, TPM_DEVICE_NULL}, \ > - {TPM_DEVICE_INTERFACE_TPM12, TPM_DEVICE_1_2}, \ > - {TPM_DEVICE_INTERFACE_TPM20_DTPM, TPM_DEVICE_2_0_DTPM}, \ > -} > - > -// > -// BUGBUG: In order to pass VfrCompiler, we have to redefine GUID here. > -// > -#ifndef __BASE_H__ > -typedef struct { > - UINT32 Data1; > - UINT16 Data2; > - UINT16 Data3; > - UINT8 Data4[8]; > -} GUID; > -#endif > - > -typedef struct { > - GUID TpmInstanceGuid; > - UINT8 TpmDevice; > -} TPM_INSTANCE_ID; > - > #endif > diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf > b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf > index 837cbd12f0..f2aa3234ad 100644 > --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf > +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf > @@ -28,6 +28,7 @@ > [Sources] > Tcg2ConfigPeim.c > Tcg2ConfigNvData.h > + Tcg2Internal.h > TpmDetection.c > > [Packages] > diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2Internal.h > b/SecurityPkg/Tcg/Tcg2Config/Tcg2Internal.h > new file mode 100644 > index 0000000000..6ed1015ef2 > --- /dev/null > +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2Internal.h > @@ -0,0 +1,26 @@ > +/** @file > + The internal header file defines the common structures for PEI and DXE > modules. > + > +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef __TCG2_INTERNAL_H__ > +#define __TCG2_INTERNAL_H__ > + > +#define EFI_TCG2_EVENT_LOG_FORMAT_DEFAULT > EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 > +#define EFI_TCG2_EVENT_LOG_FORMAT_ALL > (EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 | > EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) > + > +#define TPM_INSTANCE_ID_LIST { \ > + {TPM_DEVICE_INTERFACE_NONE, TPM_DEVICE_NULL}, \ > + {TPM_DEVICE_INTERFACE_TPM12, TPM_DEVICE_1_2}, \ > + {TPM_DEVICE_INTERFACE_TPM20_DTPM, TPM_DEVICE_2_0_DTPM}, \ > +} > + > +typedef struct { > + GUID TpmInstanceGuid; > + UINT8 TpmDevice; > +} TPM_INSTANCE_ID; > + > +#endif > -- > 2.13.0.windows.1 --_000_FF72C7E4248F3C4E9BDF19D4918E90F24DF25E86shsmsx102ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by : Chao Zhang <chao.b.zha= ng@intel.com>

 =

From: Wang, Jian J
Sent: Monday, September 16, 2019 1:57 PM
To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io Cc: Zhang, Chao B <chao.b.zhang@intel.com>
Subject: RE: [Patch v2] SecurityPkg Tcg2Config: Move common definiti= ons to new Tcg2Internal.h

 


Reviewed-by: Jian J Wang &l= t;jian.j.wang@intel.com>

> -----Original Message-----
> From: Gao, Liming > Sent: Thursday, September&= nbsp;12, 2019 2:07 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J = ;<jian.j.wang@intel.com>= ; Zhang, Chao B
> <chao.b.zhang@intel.com>
> Subject: [Patch v2] S= ecurityPkg Tcg2Config: Move common definitions to&= nbsp;new
> Tcg2Internal.h

> Common definitions are&nbs= p;not consumed by VFR. They are not requ= ired to be
> defined in Tcg2ConfigNvDat= a.h with WA way. New shared internal hea= der
> file is added to = ;include those common definitions.

> Cc: Jian Wang <jian.j.wang@intel.com><= br> > Cc: Chao Zhang <chao.b.zhang@intel.com>
> Signed-off-by: Liming Gao&= nbsp;<liming.gao@intel.com&g= t;
> ---
> In V2:
>  Keep struct TCG2_DEV= ICE_DETECTION in Tcg2ConfigNvData.h.
>  Only remove BUGBUG&n= bsp;definition.

>  SecurityPkg/Tcg/Tcg2Config/Tcg= 2ConfigPeim.c   |  1 +
>  SecurityPkg/Tcg/Tcg2Config/Tpm= Detection.c     |  1 + >  SecurityPkg/Tcg/Tcg2Config/Tcg= 2ConfigDxe.inf  |  1 +
>  SecurityPkg/Tcg/Tcg2Config/Tcg= 2ConfigImpl.h   |  3 +++ >  SecurityPkg/Tcg/Tcg2Config/Tcg= 2ConfigNvData.h | 35 ---------------------------
>  SecurityPkg/Tcg/Tcg2Config/Tcg= 2ConfigPei.inf  |  1 +
>  SecurityPkg/Tcg/Tcg2Config/Tcg= 2Internal.h     | 26 ++++= ;+++++++++++++++= ;+
>  7 files changed,&nbs= p;33 insertions(+), 35 deletions(-)
>  create mode 100644&n= bsp;SecurityPkg/Tcg/Tcg2Config/Tcg2Internal.h

> diff --git a/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigPeim.c
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Con= figPeim.c
> index a50a128766..a15919685e&nb= sp;100644
> --- a/SecurityPkg/Tcg/Tcg2Confi= g/Tcg2ConfigPeim.c
> +++ b/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigPeim.c
> @@ -23,6 +23,7 @@=  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <Protocol/Tcg= 2Protocol.h>

>  #include "Tcg2Config= NvData.h"
> +#include "Tcg2Interna= l.h"

>  TPM_INSTANCE_ID  mTp= mInstanceId[] =3D TPM_INSTANCE_ID_LIST;

> diff --git a/SecurityPkg/T= cg/Tcg2Config/TpmDetection.c
> b/SecurityPkg/Tcg/Tcg2Config/TpmDete= ction.c
> index 2f220c6c90..eeaadc5e2f&nb= sp;100644
> --- a/SecurityPkg/Tcg/Tcg2Confi= g/TpmDetection.c
> +++ b/SecurityPkg/T= cg/Tcg2Config/TpmDetection.c
> @@ -20,6 +20,7 @@=  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <IndustryStan= dard/Tpm12.h>

>  #include "Tcg2Config= NvData.h"
> +#include "Tcg2Interna= l.h"

>  /**
>    This routine&= nbsp;check both SetupVariable and real TPM de= vice, and return final
> TpmDevice configuration.=
> diff --git a/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigDxe.inf
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Con= figDxe.inf
> index 866e47d23e..6417ab82a1&nb= sp;100644
> --- a/SecurityPkg/Tcg/Tcg2Confi= g/Tcg2ConfigDxe.inf
> +++ b/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigDxe.inf
> @@ -30,6 +30,7 @@=
>    Tcg2Config.vfr
>    Tcg2ConfigStrings.= uni
>    Tcg2ConfigNvData.h=
> +  Tcg2Internal.h

>  [Packages]
>    MdePkg/MdePkg.dec<= /span>
> diff --git a/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigImpl.h
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Con= figImpl.h
> index 4b0e18dfbb..af542d52ef&nb= sp;100644
> --- a/SecurityPkg/Tcg/Tcg2Confi= g/Tcg2ConfigImpl.h
> +++ b/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigImpl.h
> @@ -36,6 +36,9 @@=  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <Guid/MdeModu= leHii.h>

>  #include "Tcg2Config= NvData.h"
> +#include "Tcg2Interna= l.h"
> +
> +#define TCG2_PROTOCOL_VERS= ION_DEFAULT        0x0001
>  //
>  // Tool generated&nb= sp;IFR binary data and String package data
> diff --git a/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigNvData.h
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Con= figNvData.h
> index d0a124684f..a91c052850&nb= sp;100644
> --- a/SecurityPkg/Tcg/Tcg2Confi= g/Tcg2ConfigNvData.h
> +++ b/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigNvData.h
> @@ -13,15 +13,6 @= @ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <Guid/Tcg2Con= figHii.h>
>  #include <IndustryStan= dard/TcgPhysicalPresence.h>

> -//
> -// BUGBUG: In order&= nbsp;to pass VfrCompiler, we have to redefine=  below MACRO,
> which already in <= Protocol/Tcg2Protocol.h>.
> -//
> -#ifndef __TCG2_H__
> -#define EFI_TCG2_EVENT_LOG_FOR= MAT_TCG_1_2       0x00000001
> -#define EFI_TCG2_EVENT_LOG_FOR= MAT_TCG_2         0x00000002
> -#endif
> -#define EFI_TCG2_EVENT_LOG_FOR= MAT_ALL
> (EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2&n= bsp;|
> EFI_TCG2_EVENT_LOG_FORMAT_TCG_2)
> -
>  #define TCG2_CONFIGURATIO= N_VARSTORE_ID  0x0001
>  #define TCG2_CONFIGURATIO= N_INFO_VARSTORE_ID     0x0002
>  #define TCG2_VERSION_VARS= TORE_ID        0x0003
> @@ -55,9 +46,6 @@=  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #define TPM_DEVICE_INTERF= ACE_MAX       TPM_DEVICE_INTERFACE_PTP_F= IFO
>  #define TPM_DEVICE_INTERF= ACE_DEFAULT
> TPM_DEVICE_INTERFACE_PTP_CRB<= br>
> -#define TCG2_PROTOCOL_VERSION_= DEFAULT        0x0001
> -#define EFI_TCG2_EVENT_LOG_FOR= MAT_DEFAULT
> EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2
> -
>  #define TCG2_PPI_VERSION_= 1_2            =         0x322E31  // = ;"1.2"
>  #define TCG2_PPI_VERSION_= 1_3            =         0x332E31  // = ;"1.3"

> @@ -97,27 +85,4 @= @ typedef struct {
>  #define TCG2_DEVICE_DETEC= TION_NAME  L"TCG2_DEVICE_DETECTION"
>  #define TCG2_VERSION_NAME=            L"TC= G2_VERSION"

> -#define TPM_INSTANCE_ID_LIST&n= bsp; { \
> -  {TPM_DEVICE_INTERFACE_N= ONE,           TPM_D= EVICE_NULL},      \
> -  {TPM_DEVICE_INTERFACE_T= PM12,          TPM_DEVICE= _1_2},       \
> -  {TPM_DEVICE_INTERFACE_T= PM20_DTPM,     TPM_DEVICE_2_0_DTPM},  \<= /span>
> -}
> -
> -//
> -// BUGBUG: In order&= nbsp;to pass VfrCompiler, we have to redefine=  GUID here.
> -//
> -#ifndef __BASE_H__
> -typedef struct { > -  UINT32  Data1= ;
> -  UINT16  Data2= ;
> -  UINT16  Data3= ;
> -  UINT8   = Data4[8];
> -} GUID;
> -#endif
> -
> -typedef struct { > -  GUID   &= nbsp;   TpmInstanceGuid;
> -  UINT8   =    TpmDevice;
> -} TPM_INSTANCE_ID;
> -
>  #endif
> diff --git a/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigPei.inf
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Con= figPei.inf
> index 837cbd12f0..f2aa3234ad&nb= sp;100644
> --- a/SecurityPkg/Tcg/Tcg2Confi= g/Tcg2ConfigPei.inf
> +++ b/SecurityPkg/T= cg/Tcg2Config/Tcg2ConfigPei.inf
> @@ -28,6 +28,7 @@=
>  [Sources]
>    Tcg2ConfigPeim.c
>    Tcg2ConfigNvData.h=
> +  Tcg2Internal.h
>    TpmDetection.c

>  [Packages]
> diff --git a/SecurityPkg/T= cg/Tcg2Config/Tcg2Internal.h
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Int= ernal.h
> new file mode 100644<= /span>
> index 0000000000..6ed1015ef2
> --- /dev/null
> +++ b/SecurityPkg/T= cg/Tcg2Config/Tcg2Internal.h
> @@ -0,0 +1,26 @@<= /span>
> +/** @file
> +  The internal&n= bsp;header file defines the common structures = ;for PEI and DXE
> modules.
> +
> +Copyright (c) 2019,&n= bsp;Intel Corporation. All rights reserved.<BR>
> +SPDX-License-Identifier: B= SD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef __TCG2_INTERNAL_H_= _
> +#define __TCG2_INTERNAL_H_= _
> +
> +#define EFI_TCG2_EVENT_LOG= _FORMAT_DEFAULT
> EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2
> +#define EFI_TCG2_EVENT_LOG= _FORMAT_ALL
> (EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2&n= bsp;|
> EFI_TCG2_EVENT_LOG_FORMAT_TCG_2)
> +
> +#define TPM_INSTANCE_ID_LI= ST  { \
> +  {TPM_DEVICE_INTERFA= CE_NONE,           T= PM_DEVICE_NULL},      \
> +  {TPM_DEVICE_INTERFA= CE_TPM12,          TPM_DE= VICE_1_2},       \
> +  {TPM_DEVICE_INTERFA= CE_TPM20_DTPM,     TPM_DEVICE_2_0_DTPM}, &nbs= p;\
> +}
> +
> +typedef struct {
> +  GUID  &nb= sp;    TpmInstanceGuid;
> +  UINT8  &n= bsp;   TpmDevice;
> +} TPM_INSTANCE_ID;<= br> > +
> +#endif
> --
> 2.13.0.windows.1

--_000_FF72C7E4248F3C4E9BDF19D4918E90F24DF25E86shsmsx102ccrcor_--