From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.8981.1594826415103636684 for ; Wed, 15 Jul 2020 08:20:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=JHnXA7qb; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: jiewen.yao@intel.com) IronPort-SDR: oMh6KboJcsZp+YOOSoAWHHlLPygbiGx0SrBvnLElC8iEeXDhpoIGkc3wJTP0sqdHXIkFIlqJOa 2bdTnYp9PgeA== X-IronPort-AV: E=McAfee;i="6000,8403,9683"; a="136623114" X-IronPort-AV: E=Sophos;i="5.75,355,1589266800"; d="scan'208,217";a="136623114" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 08:20:14 -0700 IronPort-SDR: NNyqjg9ob6koAu3VGP/HM7plwzNyytj+qUiV2TUhIvtdqpJIZCRVp7Z5kxe78hDGc7Gbty/ak9 ycLJs2QygKYA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,355,1589266800"; d="scan'208,217";a="326211220" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP; 15 Jul 2020 08:20:14 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 15 Jul 2020 08:20:09 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 15 Jul 2020 08:20:09 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Jul 2020 08:20:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QEdlowe/V3wf7FrPjmdssrzNPPXdSajF4xKvV5U1bKqo2ku0EJe73d05iHU7P2uTiWZIKuzaCTUZ7lR9jKpzq9dJZT82QroRLXKdSN8+aD7R14Yklmje+vjJS0XXBGop5ND1yCQAATY8tqbsVRa167fYkG055kzC//jihoEjAX7ulrOaOTsEWrg2xDKOqD9QKSS47Cp+isnljN5Cq07tbIKmMH06MFL4qNZdFeg3fSS6pvS/E1Cn1r/+NeEGObPHeRoFNXY+DEyjW+QRSRM8xiz/Mcy22GbJajirjNoYyjlyATyAnF/trnfd6kNQU0FhISEi4l+ba3Xz7faf/Ix47A== 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=v28g6d3w0QjigqBy97MyWpue4LA9mAFUuRBmm3Gy4q8=; b=ZLKkNE+XJyyh7qZd6wmh/Rt91olkPkv46g4EneWHCw3eCbofFDD9Lwn1LATZ+9DQJOwbdEpJOeBFr0BNbfv1MjcDUmCfRKLE04m8B3ysSwD0IBLwIpcA6yvoA3HFLh87AvfNz4wtydBHJbvsIBuaDiOIuby2rzgLJbBhDkpZ+oU7cNMlazBYU5xCCpT7CFP1O5KVEt/M3LdByE8N16P83eAFOQtoEHngJr3gVMM8ieNsaZYRkx+CWPtI7yVoDAqzRWQWq5cQPy7cw4mClPvkl/+0he5pftemLlBkwM/fjvsZFSXP+RR3zxRqPvQglVL2d437NCF59eLgOt+vJWG2Lg== 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=v28g6d3w0QjigqBy97MyWpue4LA9mAFUuRBmm3Gy4q8=; b=JHnXA7qbFm2DR0fxA/39E/BQA2D6CD/YZDsQV6R2be3kV87yS+84/1IS8XdXqth2uQ9e0FaGBWNvuf2P1Z4EZHAgpjgQn53ci7sJOVBPgAAFkqSd0hAxXr3MC38epYfohCw5icEo22IN63ejyCFSOwT6kMOoRHfVcvwKJbV7Erc= Received: from DM5PR11MB2026.namprd11.prod.outlook.com (2603:10b6:3:10::17) by DM6PR11MB2587.namprd11.prod.outlook.com (2603:10b6:5:c3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Wed, 15 Jul 2020 15:20: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 15:20:04 +0000 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "Yao, Jiewen" , Bret Barkelew , "Zhang, Qi1" CC: "Wang, Jian J" Subject: Re: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. Thread-Topic: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. Thread-Index: AQHWWar5Wq9MxN8Sv02u5OkL57B49akIFgLAgAAPF4CAAJOIMIAAClzQ Date: Wed, 15 Jul 2020 15:20:04 +0000 Message-ID: References: <20200714064922.7025-1-qi1.zhang@intel.com> <20200714064922.7025-2-qi1.zhang@intel.com>, <1621F444E3AD18DD.16458@groups.io> In-Reply-To: <1621F444E3AD18DD.16458@groups.io> 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: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; 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: 776904f5-55cb-432f-6496-08d828d28d0e x-ms-traffictypediagnostic: DM6PR11MB2587: 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: WUTB0wNuHm5k5p0xb/ACDwvBRTEP1m10xYtAJ7TuLuHNWCZ73T72wJ/s5VjaxTpKJDELKI10x8sLLxKLJ16gRMOirHDtMkcIpOXhd5OznZnG+161X0prGduP1jD8Sx5+oITxnpJojgVqf5bQ1it4IAPMSwMqNB9H4rrxYpaKix9kJsTCdytLjSfrYrSN5WbLpUFLpSJ6ttbt6pyZ+Y+dVqjFPOPb4D2GSNRBOwPJd7mxtzNUT/aQCRMHKEfsZ6BPX2xZC7EGA1kHUTFw9JgWJQnogJLH4STdHEq+sonw6ViJNeQ4maOiShjRF3vkgSXHsSDtipE9HkMyr9u903tw7lbcevsz+y4US0bgMsAwLaETlcdSlGHRt/Fwd9swgZZlaNq5oQUOaLLwzOINT6KGMQ== 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)(39860400002)(346002)(376002)(136003)(396003)(366004)(2906002)(7696005)(55016002)(6636002)(86362001)(9686003)(166002)(45080400002)(52536014)(110136005)(478600001)(26005)(76236003)(966005)(186003)(8936002)(53546011)(8676002)(107886003)(5660300002)(33656002)(71200400001)(4326008)(15650500001)(316002)(66556008)(76116006)(66946007)(66476007)(6506007)(66446008)(64756008)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: lxMbf1EV4Ha5TarHqh7PnakV2cbgEQDReS4Due5OKawyiZQqadmNzu3qHScQYRV+iojRn8G805A+wTm1zzaf8qUxmyRCuFVCvu3LznQVWSOWzRR5hAFwbSiixqNgE4O0vrGyaydsDQH00qXilCcCYlLOhloobLYIHf0yLFMXwEYtcK1BXZXcG7WMvz+X90tAKTbtqlTwnrEvFOrFFoi+3tjvh9ucHWJALfG/c0G8Gqds6MoFHXARfyZNjyeADa/tjnsyDVvnM2otBQfqWxwYSzHgOzTIZp57OUACdxMKGUqtPBzu91ZtRH2XLSxT18ORn5pRFOvlEyQcvOwheMIWTNoSdqoHcUfidXxYR7AnY8aO8XewaYqchaPBaso5EsX2ANWAgC7NTGQ7bBjxxYXYGSJYS4rD3flIWbUqehs9JHJiy3XTrUQkbzJn0VzGF49k1UsbmLGwHfw1hc/N2kLvVisbkrjQppwkEuIApzK+E3GgWXCmGgQ0kyFpKw2b4Iks 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: 776904f5-55cb-432f-6496-08d828d28d0e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2020 15:20:04.5889 (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: gvOeB6LZgjuYoB/M+vh5YHN0mVZQRTemJdXcIR1RYAif1Bdf/j3oWFixtcfgUFlKLYo06rZLom4gjP4KddDxlQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2587 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM5PR11MB202682A7EAD73D3855D2BE3E8C7E0DM5PR11MB2026namp_" --_000_DM5PR11MB202682A7EAD73D3855D2BE3E8C7E0DM5PR11MB2026namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Maybe we can let TCG PEIM install the TCG_PPI *before* any measurement reco= rd, then the other PEIM can register a callback to record the HW ROT measur= ement ? Thank you Yao Jiewen From: devel@edk2.groups.io On Behalf Of Yao, Jiewen Sent: Wednesday, July 15, 2020 10:45 PM To: Bret Barkelew ; devel@edk2.groups.io; Zha= ng, Qi1 Cc: Wang, Jian J Subject: Re: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi heade= r file. 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 > 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_DM5PR11MB202682A7EAD73D3855D2BE3E8C7E0DM5PR11MB2026namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Maybe we can let TCG PEIM install the TCG_PPI *b= efore* any measurement record, then the other PEIM can register a callb= ack to record the HW ROT measurement ?

 

Thank you

Yao Jiewen

 

From: de= vel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, Jiewen
Sent: Wednesday, July 15, 2020 10:45 PM
To: Bret Barkelew <Bret.Barkelew@microsoft.com>; devel@edk2.g= roups.io; Zhang, Qi1 <qi1.zhang@intel.com>
Cc: Wang, Jian J <jian.j.wang@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPp= i header file.

 

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: Bret 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.zha= ng@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_DM5PR11MB202682A7EAD73D3855D2BE3E8C7E0DM5PR11MB2026namp_--