From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.8202.1594824319361067971 for ; Wed, 15 Jul 2020 07:45:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=UWT7BHEp; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: jiewen.yao@intel.com) IronPort-SDR: 9daCHAyT9X/CuZ29rqz/X88i1XFA+xer/ZK+kCkXpUnn6IJw9+fkwCXvClsRU2tZ42BgGLeZss 9XoudPwEzYwg== X-IronPort-AV: E=McAfee;i="6000,8403,9682"; a="147161009" X-IronPort-AV: E=Sophos;i="5.75,355,1589266800"; d="scan'208,217";a="147161009" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 07:45:13 -0700 IronPort-SDR: xuNccD6ZSqKW7w9sBM3ICjLXVtq8CoCUfE2Y4ztLEi35Keb5W4uqw/QgF08pZMqqmmCy9p6mt3 I+INjl5/71pg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,355,1589266800"; d="scan'208,217";a="308270858" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 15 Jul 2020 07:45:13 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Jul 2020 07:45:13 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Jul 2020 07:45:13 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Jul 2020 07:45:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MCZbuwsjRqvYFXcvLCoAuHszwbqDOMv8uy9HlN/h5SraQkV+c4ub8s8E2b0hqgVIOPlFPtwMJoEHH4vg89jLCLxjwpEjiRR19TBRCXEj2NixwUmu/LNgra1iDDjzcDBkhVMmZG2w+CuvMNZR0EwK8rCC4hhOazuHt4SxnSLG/RGMkN2SN4nAY9GxE11wH3Q92rbLM44WHUkyun0n7ktJ3mzUS7K52FWjuxcrxcMM2Oo7DLPvkjSCL5vD8IHfYWCG7TbrMapCXtZ4CFoTOG2xR5zwRgt158C7V0DycTlkhvbllejlzLhcwsvuSFmMcsy+WkoT+B9x+5tD3RQq2wlK9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AdU6x4f7Z7YocEPq5ZoGOKSLoFQOj/j/Zy/sIi6pk4E=; b=NWxTqd+LNAgPd6MR4PifAV+o8AaSUXRuPAjRljcVvoJqbqVKNH4KcXFnd1m2g0wYNnDHSvYP7Pa0n8A+LQ1KS+qpACaHtLRdAFRu6Wk7lDdl8bFODTBnTj2Rq5Jvw0vqjUKRWjXsvWVMZVAWo30DPWXhLKp2LkkFfKGgH1kpHGldC6KlgLzQ/xYCQ1sePtl8D/VUrF8gtDEH+H5JdGEdivnNPKjOZGBOqT4vZHHk8anFz3hrpd/dGboXKEVEm5/ZOlcGwsXM3RTsveAawPVuLlBMMKVGPr01unHKkd1CZ5nkxTG2PGWDEX+P96FMidghvqSrcITiEGZ8mYa6vWzrAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AdU6x4f7Z7YocEPq5ZoGOKSLoFQOj/j/Zy/sIi6pk4E=; b=UWT7BHEpkaE81sHRrQvOwU5L09YRydz9tVqMrWap7toqXRHl4tBZb7gVumw/APfQY7IgYVH5PJBzIkuoB7fpopBHZ1q+690DUeJLTszVCzZY45Snb/Bu28nYqPl8s0r1w47totIjgwDKKwR8X420HMGjtpiM6JhgRWA/pV4UJU4= Received: from DM5PR11MB2026.namprd11.prod.outlook.com (2603:10b6:3:10::17) by DM6PR11MB4060.namprd11.prod.outlook.com (2603:10b6:5:196::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17; Wed, 15 Jul 2020 14:45:04 +0000 Received: from DM5PR11MB2026.namprd11.prod.outlook.com ([fe80::e19d:1de4:c479:da4]) by DM5PR11MB2026.namprd11.prod.outlook.com ([fe80::e19d:1de4:c479:da4%4]) with mapi id 15.20.3174.026; Wed, 15 Jul 2020 14:45:04 +0000 From: "Yao, Jiewen" To: Bret Barkelew , "devel@edk2.groups.io" , "Zhang, Qi1" CC: "Wang, Jian J" Subject: Re: [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. Thread-Topic: [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. Thread-Index: AQHWWar5Wq9MxN8Sv02u5OkL57B49akIFgLAgAAPF4CAAJOIMA== Date: Wed, 15 Jul 2020 14:45:04 +0000 Message-ID: References: <20200714064922.7025-1-qi1.zhang@intel.com> <20200714064922.7025-2-qi1.zhang@intel.com>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-07-15T05:51:07.2935575Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWQxZTU4ZjMtNzk4YS00YmZkLTk0OWQtZDE2ZTBjYzk5NmY4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYWhLM0crajF2bk9lMFhcLzdnbWRmUmtXdUVQbEd1b3BrdXJZK295bGdjWHVqZkNCbjA2ZkVFU3B4R3Y0N2FhOFwvIn0= x-ctpclassification: CTP_NT dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: microsoft.com; dkim=none (message not signed) header.d=none;microsoft.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.216] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 197d7033-c80b-432b-9a4d-08d828cda94c x-ms-traffictypediagnostic: DM6PR11MB4060: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mOGB3Cf9nMgoga4bZTAPaUnwSZqsW9UBp3RsfayerpIsNJgjlDqs30pTRNBuFCNW+jIIv1I3zAsBMo3Y354leDrTvxvggB+QgOQgyQ9ygvAT1cQrxTedL4I+Ec2zyevm55qWvmMg5XoXG2G/MY4n5h4Nceu1APQsW1cl5VxVwJcI235qRKs7rhrelxx8UFZrsjvniRXGrMYSwFLp2xc2iH97MJhvwKBAbjN3aNER0EtBUO8v+qLYhYinzcDFcWOKEvceSNUl5/vaF+votLE9LTXi7a5wuqOawYlYqkJ5YRuzSZL6fRR9UJBrzQRwDYPxUgPyhEUq8xLf5qHbsyywv+4OZYMUQoLmvk5ORH3p1JwaDcGg3XQahP61GCUHeM9M7X9BX3rIk2W34mLoYI637Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR11MB2026.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(366004)(39860400002)(136003)(346002)(396003)(186003)(8676002)(966005)(66446008)(26005)(66946007)(110136005)(5660300002)(66476007)(64756008)(15650500001)(76116006)(66556008)(86362001)(6636002)(45080400002)(7696005)(107886003)(6506007)(8936002)(478600001)(9686003)(2906002)(71200400001)(83380400001)(4326008)(52536014)(55016002)(316002)(53546011)(33656002)(166002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: SWli70OF+jvoCz87JKPilSLj1kMlziT18TR7TBh73rYepIyWNCWUQTzAlKU9Zowe+hHnB6JxObc6sBvWpunYl8rvthBUznqXfKn+dvR6rn2DPXtIKv86A0lwye6JPgPzH82ponOeGVvS5NGIIsiq8udOuoZLJScqP2qHtLz/O9eHIquhQTzItbPFNEzdyS6vY4x8Eb7oXZPzAVLcfSpxiaCRVS17X1b3d+/VZ4fyOJ+8kv/xQMLbs/V6d2Rn/3G8czVN080UN0KR5U5WGvD47pcumbsQghcwByc09uXzQotwbE7ypuLR8eAVX1wEiadUiMmCrt8ecXfvXpkJI3HtaYBGJtLbLU6GZpRImFj0gbdQHGb6HouNYgrU6hVXoSXPX9K9FOqY0SQm+Sy1+RzUD73Bf/pgLW1/uBrd+Y370E6scI65tKZRKueWN7CusHY7NYLLsZ8GsSdX5n1uldBxF8aS+Zf0+JGoiQP9i6Ub1c7inKk/9tEMnE0hd56KJBs0 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR11MB2026.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 197d7033-c80b-432b-9a4d-08d828cda94c X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2020 14:45:04.5382 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oVWV+CR+8xtIXj3nRoqo5xROWgZk6+Uq3c0guvMzGt//bzAAC0rB9J3NT13XcL9AqflKgU+baBsRcSTpeHKllA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4060 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM5PR11MB20260D3D7332BE10228A62118C7E0DM5PR11MB2026namp_" --_000_DM5PR11MB20260D3D7332BE10228A62118C7E0DM5PR11MB2026namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Bret Do you have a full problem statement or Bugzilla? If we are resolving same problem, we can resolve altogether. If we are talking different problem, we can resolve one by one. Thank you Yao Jiewen From: Bret Barkelew Sent: Wednesday, July 15, 2020 1:53 PM To: devel@edk2.groups.io; Yao, Jiewen ; Zhang, Qi1 <= qi1.zhang@intel.com> Cc: Wang, Jian J Subject: Re: [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. Since we're working on early boot TCG interfaces, is this a good time to d= iscuss a standard way to init the log with measurements made by the HW root= of trust prior to Tcg2Pei? We were using a NULL lib and a registration pat= tern on the PEIM, but I'm open to other ideas, too. Thoughts? - Bret ________________________________ From: devel@edk2.groups.io > on behalf of Yao, Jiewen via groups.io > Sent: Tuesday, July 14, 2020 10:08:30 PM To: Zhang, Qi1 >; devel@ed= k2.groups.io > Cc: Wang, Jian J > Subject: [EXTERNAL] Re: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add T= cgPpi header file. Thanks Qi. I just thought one use case that a PEIM may already have a calculated hash= (https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgith= ub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FSecurityPkg%2FTcg%2FTcg2Pei%2FT= cg2Pei.c%23L652&data=3D02%7C01%7CBret.Barkelew%40microsoft.com%7Cbe2bb9= ca3e0c4dd95a0a08d8287d21ec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637= 303865193113145&sdata=3DV3ofX%2Fvs6Pp%2Bc79cQx4iSB6K324Lyptqrj7FtvmDwsc= %3D&reserved=3D0) We may need add a flag to support this pre-hash use case. Such as: > +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)( > > + IN EDKII_TCG_PPI *This, > > + IN UINT64 Flags, // new field. BIT0 =3D 0 mea= ns HashData is the data to be hashed; BIT0 =3D 1 means HashData is the pre-= hash digest. > > + IN UINT8 *HashData, > > + IN UINTN HashDataLen, > > + IN TCG_PCR_EVENT_HDR *NewEventHdr, > > + IN UINT8 *NewEventData > > + ); > -----Original Message----- > From: Zhang, Qi1 > > Sent: Tuesday, July 14, 2020 2:49 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen >; Wan= g, Jian J >; > Zhang, Chao B > > Subject: [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. > > From: Jiewen Yao > > > REF: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2= Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2841&data=3D02%7C01%7CBre= t.Barkelew%40microsoft.com%7Cbe2bb9ca3e0c4dd95a0a08d8287d21ec%7C72f988bf86f= 141af91ab2d7cd011db47%7C1%7C0%7C637303865193113145&sdata=3DVgWc2LNPqJRl= Bisa%2Bvuqq2THVK62f66uzzqh4cle4Rs%3D&reserved=3D0 > > Cc: Jiewen Yao > > Cc: Jian J Wang > > Cc: Chao Zhang > > Signed-off-by: Jiewen Yao > > --- > SecurityPkg/Include/Ppi/Tcg.h | 50 +++++++++++++++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > create mode 100644 SecurityPkg/Include/Ppi/Tcg.h > > diff --git a/SecurityPkg/Include/Ppi/Tcg.h b/SecurityPkg/Include/Ppi/Tcg= .h > new file mode 100644 > index 0000000000..4eacd57166 > --- /dev/null > +++ b/SecurityPkg/Include/Ppi/Tcg.h > @@ -0,0 +1,50 @@ > +/** @file > > + TCG PPI services. > > + > > +Copyright (c) 2020, Intel Corporation. All rights reserved.
> > +SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#ifndef _TCG_PPI_H_ > > +#define _TCG_PPI_H_ > > + > > +#include > > + > > +typedef struct _EDKII_TCG_PPI EDKII_TCG_PPI; > > + > > +/** > > + Tpm measure and log data, and extend the measurement result into a sp= ecific > PCR. > > + > > + @param[in] This Indicates the calling context > > + @param[in] HashData Physical address of the start of the da= ta buffer > > + to be hashed, extended, and logged. > > + @param[in] HashDataLen The length, in bytes, of the buffer ref= erenced by > HashData. > > + @param[in] NewEventHdr Pointer to a TCG_PCR_EVENT_HDR data > structure. > > + @param[in] NewEventData Pointer to the new event data. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +**/ > > +typedef > > +EFI_STATUS > > +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)( > > + IN EDKII_TCG_PPI *This, > > + IN UINT8 *HashData, > > + IN UINTN HashDataLen, > > + IN TCG_PCR_EVENT_HDR *NewEventHdr, > > + IN UINT8 *NewEventData > > + ); > > + > > +/// > > +/// The EFI_TCG Protocol abstracts TCG activity. > > +/// > > +struct _EDKII_TCG_PPI { > > + EDKII_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; > > +}; > > + > > +extern EFI_GUID gEdkiiTcgPpiGuid; > > + > > +#endif > > -- > 2.26.2.windows.1 --_000_DM5PR11MB20260D3D7332BE10228A62118C7E0DM5PR11MB2026namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Bret

Do you have a full problem statement or Bugzilla?

 

If we are resolving same problem, we can resolve al= together.

If we are talking different problem, we can resolve= one by one.

 

Thank you

Yao Jiewen

 

From: Br= et Barkelew <Bret.Barkelew@microsoft.com>
Sent: Wednesday, July 15, 2020 1:53 PM
To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;= Zhang, Qi1 <qi1.zhang@intel.com>
Cc: Wang, Jian J <jian.j.wang@intel.com>
Subject: Re: [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file= .

 

Since we’re working on early boot TCG interfa= ces, is this a good time to discuss a standard way to init the log with mea= surements made by the HW root of trust prior to Tcg2Pei? We were using a NU= LL lib and a registration pattern on the PEIM, but I’m open to other ideas, too. Thoughts?

 

- Bret


From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf o= f Yao, Jiewen via groups.io <jiewen.yao=3Dintel.com@groups.io>
Sent: Tuesday, July 14, 2020 10:08:30 PM
To: Zhang, Qi1 <qi1.zhang= @intel.com>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Wang, Jian J <jian.= j.wang@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi= : Add TcgPpi header file.

 

Thanks Qi.

I just thought one use case that a PEIM may already have a calculated hash=   (https://nam06.safelinks.p= rotection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2F= blob%2Fmaster%2FSecurityPkg%2FTcg%2FTcg2Pei%2FTcg2Pei.c%23L652&amp;data= = =3D02%7C01%7CBret.Barkelew%40microsoft.com%7Cbe2bb9ca3e0c4dd95a0a08d8287d2= 1ec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637303865193113145&amp= ;sdata=3DV3ofX%2Fvs6Pp%2Bc79cQx4iSB6K324Lyptqrj7FtvmDwsc%3D&amp;reserve= d=3D0)
We may need add a flag to support this pre-hash use case. Such as:

> +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)(
>
> +  IN      EDKII_TCG_PPI  = ;           *This,
>
> +  IN      UINT64   =             &nb= sp;   Flags,  // new field. BIT0 =3D 0 means HashData is the= data to be hashed; BIT0 =3D 1 means HashData is the pre-hash digest.
>
> +  IN      UINT8   &= nbsp;           &nbs= p;     *HashData,
>
> +  IN      UINTN   &= nbsp;           &nbs= p;     HashDataLen,
>
> +  IN      TCG_PCR_EVENT_HDR &= nbsp;       *NewEventHdr,
>
> +  IN      UINT8   &= nbsp;           &nbs= p;     *NewEventData
>
> +  );

> -----Original Message-----
> From: Zhang, Qi1 <qi1.zhang= @intel.com>
> Sent: Tuesday, July 14, 2020 2:49 PM
> To: devel@edk2.groups.io<= br> > Cc: Yao, Jiewen <jiewen.ya= o@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Zhang, Chao B <chao.b.zh= ang@intel.com>
> Subject: [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file.
>
> From: Jiewen Yao <jiewen.y= ao@intel.com>
>
> REF: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzil= la.tianocore.org%2Fshow_bug.cgi%3Fid%3D2841&amp;data=3D02%7C01%7CBret.B= arkelew%40microsoft.com%7Cbe2bb9ca3e0c4dd95a0a08d8287d21ec%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637303865193113145&amp;sdata=3DVgWc2LNPqJR= lBisa%2Bvuqq2THVK62f66uzzqh4cle4Rs%3D&amp;reserved=3D0
>
> Cc: Jiewen Yao <jiewen.yao= @intel.com>
> Cc: Jian J Wang <jian.j.w= ang@intel.com>
> Cc: Chao Zhang <chao.b.z= hang@intel.com>
> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
> ---
>  SecurityPkg/Include/Ppi/Tcg.h | 50 +++++= 3;++++++++++++++= 3;++++++++++++++ >  1 file changed, 50 insertions(+)
>  create mode 100644 SecurityPkg/Include/Ppi/Tcg.h
>
> diff --git a/SecurityPkg/Include/Ppi/Tcg.h b/SecurityPkg/Include/Ppi/= Tcg.h
> new file mode 100644
> index 0000000000..4eacd57166
> --- /dev/null
> +++ b/SecurityPkg/Include/Ppi/Tcg.h
> @@ -0,0 +1,50 @@
> +/** @file
>
> +  TCG PPI services.
>
> +
>
> +Copyright (c) 2020, Intel Corporation. All rights reserved.<B= R>
>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
>
> +
>
> +**/
>
> +
>
> +#ifndef _TCG_PPI_H_
>
> +#define _TCG_PPI_H_
>
> +
>
> +#include <IndustryStandard/UefiTcgPlatform.h>
>
> +
>
> +typedef struct _EDKII_TCG_PPI EDKII_TCG_PPI;
>
> +
>
> +/**
>
> +  Tpm measure and log data, and extend the measurement resu= lt into a specific
> PCR.
>
> +
>
> +  @param[in]      This  =         Indicates the calling context >
> +  @param[in]      HashData &n= bsp;    Physical address of the start of the data buffer
>
> +          &nbs= p;            &= nbsp;        to be hashed, extended, and= logged.
>
> +  @param[in]      HashDataLen = ;  The length, in bytes, of the buffer referenced by
> HashData.
>
> +  @param[in]      NewEventHdr = ;  Pointer to a TCG_PCR_EVENT_HDR data
> structure.
>
> +  @param[in]      NewEventData&nbs= p; Pointer to the new event data.
>
> +
>
> +  @retval EFI_SUCCESS      &n= bsp;    Operation completed successfully.
>
> +  @retval EFI_UNSUPPORTED     &nbs= p; TPM device not available.
>
> +  @retval EFI_OUT_OF_RESOURCES  Out of memory.
>
> +  @retval EFI_DEVICE_ERROR      Th= e operation was unsuccessful.
>
> +**/
>
> +typedef
>
> +EFI_STATUS
>
> +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)(
>
> +  IN      EDKII_TCG_PPI  = ;           *This,
>
> +  IN      UINT8   &= nbsp;           &nbs= p;     *HashData,
>
> +  IN      UINTN   &= nbsp;           &nbs= p;     HashDataLen,
>
> +  IN      TCG_PCR_EVENT_HDR &= nbsp;       *NewEventHdr,
>
> +  IN      UINT8   &= nbsp;           &nbs= p;     *NewEventData
>
> +  );
>
> +
>
> +///
>
> +/// The EFI_TCG Protocol abstracts TCG activity.
>
> +///
>
> +struct _EDKII_TCG_PPI {
>
> +  EDKII_TCG_HASH_LOG_EXTEND_EVENT     H= ashLogExtendEvent;
>
> +};
>
> +
>
> +extern EFI_GUID gEdkiiTcgPpiGuid;
>
> +
>
> +#endif
>
> --
> 2.26.2.windows.1


--_000_DM5PR11MB20260D3D7332BE10228A62118C7E0DM5PR11MB2026namp_--