From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.96]) by mx.groups.io with SMTP id smtpd.web10.9255.1594827176918166101 for ; Wed, 15 Jul 2020 08:32:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=gO6hUJqW; spf=pass (domain: microsoft.com, ip: 40.107.243.96, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DBN9VZRq/cCJBXwRiHIX2MC1YvsqA05fv26buxX5LmocSPYu4EW+6JoMMcKP3upuA+xLoOpz6YaISpQ9IVuaDyv6RtEwQO3LbDcO6lD3eTgSulwotSGGWo8okWG/LlpR5u4VchT9Xqv01JzhzeBwqyEwze5re6/hITeRDFcgtocLYgljLZug3yvQUg9vYf7OwKHfqV+vcmfTlWSGswjI4F8ZE8kTQxpncMa+K6QXUc87Snz01dAcOdUp+JrWKvaUaenRSAbwIGxRmF2AKKdpW7U9TB+0lnEvyIjhMPJgJykBSBPzQmIHXVp6q33n6N0AM6s6W3Np9cMBW6KhV2NdLw== 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=zuLZtQ486ekTIYJEq7DoonkCYG5nyH3Avk3i/N+fF3I=; b=lkPNeIJiJWOWOr+ZXxXaLnadu5m0ReGdyBq8QTs1ueN+fKPTNlgp5638Ecav9B8CJ1OdCQiH7nVeSUdkI4San9HYH3M8lqMkwjpkvgZRDQvetgPYRm87cjf/DZ6B2g48zG6uGR25LbNTZ2Ojw80aBRGELJaDJgw85YGxHmSMa2S7UFr/E6orkgrjSNJDFuCwt5k6bqIAkWc8XV3EPgXTowj+ogyLFZhnYxqKonAUbwc8kVOzCOjM7tV4k0Sv5lQIu8i+vzd6yeveT8gle6fshepef52NSk/4MRmKizI16i0lvvOmBeRK/SLIlht8AkdoueeYgNJs5CmEan0d8KAqBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zuLZtQ486ekTIYJEq7DoonkCYG5nyH3Avk3i/N+fF3I=; b=gO6hUJqWCp/omjjgfk14gP82t6XqccyR/PJ9NqUXXGMA7epFXHC1DOnSNF6pBKU+SCPM/1fn2MsyegqBabIIZZHcGedFV8QMyQM52CDSQIISQScA2fdvBXunxFHqRXvxveoQb11X/gEIHmQ391DGPxM5KqT4Zupq+7WMvN/1mxM= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4PR21MB0776.namprd21.prod.outlook.com (2603:10b6:903:b8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.5; Wed, 15 Jul 2020 15:32:55 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::f112:82fb:d4fd:f7dd]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::f112:82fb:d4fd:f7dd%10]) with mapi id 15.20.3216.010; Wed, 15 Jul 2020 15:32:55 +0000 From: "Bret Barkelew" To: "Yao, Jiewen" , "devel@edk2.groups.io" , "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: AQHWWmYAxetJOuwOX0KyQ1AKacXqKakIFgLAgAAPF4CAAJOIMIAAClzQgAACVz4= Date: Wed, 15 Jul 2020 15:32:55 +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: Accept-Language: en-US X-MS-Has-Attach: yes 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 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [174.21.66.92] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 5b3fc910-9718-45b2-ac9b-08d828d4585a x-ms-traffictypediagnostic: CY4PR21MB0776: x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SPXi+DgZs+lazTi+Yrv3X/u2YG7GL+aL8RoI4eSIvSSeynCY/AtCsWjlxKZm7NcmZWrmGZSm/NRY5L1roan1u19E59n2Moup9X/BNOokm88xD0t0Yop0ghJyNkO9YDh9RgCxnX3L+23mi0oIF99VmfZ2/NeO3cvDdjoXSG+/XBCViu+hUyueHSod4S+HWHQSueJ4en75brdfkQRJOBaKZswpwo7akIYnp82eH+gYDTrcJr/iJgVTSbRmPRs8EYRmA5Nc8aBVtu3i/SjjncDFeRMsrDtVesdZc3NXIDpI/sXrGqbxwdIupie9Px0Nr6CZL7D0XFHKerMinvuw7GdK0SBQVAChkl91+dHkNobBAR50UqTDvd38vnOEXejR+CvGvir9oo+GyQryretoDxdTQA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR21MB0743.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(33656002)(166002)(186003)(91956017)(15650500001)(2906002)(5660300002)(76116006)(8936002)(4326008)(110136005)(71200400001)(7696005)(55016002)(6506007)(52536014)(8990500004)(498600001)(66946007)(966005)(66556008)(86362001)(66446008)(9686003)(64756008)(10290500003)(66476007)(76236003)(66576008)(83380400001)(26005)(53546011)(99936003)(8676002)(82950400001)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: CtTEmJb7JedDCzl9uGGQ8sxodHljnXTkIE8NGqrwDqIGhbNP60ASVMCFdUzRBlMed9nm8QZTzwm/dz1p6PayTkpntXVa9qAJQWDUAWTfU4JQ3CvKaElLMo/vg7k4tJsh59AqXMJXM+Ld4LBzt+tJs7cMKW0XwbiiGkBO4uxGDCKSKNagdbEcovWmplCCppxArDp4QxeIjzx3dNeHoaSGCHdud4olLTyqo8j/vuBCtqFBAuNe3dkRFHCftsf+XsQUrXRmhooxx0UE3bB/9eXLeezKUIIv/MFm66atEUR+Ep+szfEbT2Hi1ydslUR4cgXr++O9NurLHCmF5xMw1QipRvRPYSvce54MOhDkNHeGKMK1nksUD6z/Q1nmPm8atLqX3EjYuYMMpM2GA/FrlgJHv404Gmt73sm6435yWPQpKikYi/Ila72wi4DlBjImofJZ4wFZMwai46JfPDrKsXj/p7XxcEr/aXwMDzq4dp6C5Yo= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR21MB0743.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b3fc910-9718-45b2-ac9b-08d828d4585a X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2020 15:32:55.2740 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TAmPpBip/ELaQusKwxsketIbcTvvkUqDUcF2Sc21sfRKuPJoeFDnY+PuQ0dCu4LQAp/4DcDyjTqUk85aNy8xcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0776 X-Groupsio-MsgNum: 62615 Content-Language: en-US Content-Type: multipart/related; boundary="_005_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_"; type="multipart/alternative" --_005_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_ Content-Type: multipart/alternative; boundary="_000_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_" --_000_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Yeah, that=92s kinda what I was thinking. It seemed like there was a little= of overlap that might eliminate the need for the extra libs (in our curren= t solution). I=92ll try to get a more detailed problem statement today, but I think you= = =92ve got the right idea there. - Bret From: Yao, Jiewen Sent: Wednesday, July 15, 2020 8:20 AM To: devel@edk2.groups.io; Yao, Jiewen; Bret Barkelew; Z= hang, Qi1 Cc: Wang, Jian J Subject: [EXTERNAL] RE: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add T= cgPpi header file. Maybe we can let TCG PEIM install the TCG_PPI *before* any measurement rec= ord, then the other PEIM can register a callback to record the HW ROT measu= rement ? 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=92re working on early boot TCG interfaces, is this a good time to= discuss a standard way to init the log with measurements made by the HW ro= ot of trust prior to Tcg2Pei? We were using a NULL lib and a registration p= attern on the PEIM, but I=92m 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_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

Yeah, that=92s kinda what I was thinking. It seemed= like there was a little of overlap that might eliminate the need for the e= xtra libs (in our current solution).

 

I=92ll try to get a more detailed problem statement= today, but I think you=92ve got the right idea there.

 

- Bret

 

From: Yao, Jiewen
Sent: Wednesday, July 15, 2020 8:20 AM
To: devel@edk2.groups.io; Yao, Jiewen; Bret Barke= lew; Zhang, Qi1
Cc: Wang, Jian J
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi= : Add TcgPpi header file.

 

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=92re working on early boot TCG interfaces,= is this a good time to discuss a standard way to init the log with measure= ments made by the HW root of trust prior to Tcg2Pei? We were using a NULL l= ib and a registration pattern on the PEIM, but I=92m 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.protection.outl= ook.com/?url=3Dhttps%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%= 2FSecurityPkg%2FTcg%2FTcg2Pei%2FTcg2Pei.c%23L652&amp;data=3D02%7C01%7CB= ret.Barkelew%40microsoft.com%7Cbe2bb9ca3e0c4dd95a0a08d8287d21ec%7C72f988bf8= 6f141af91ab2d7cd011db47%7C1%7C0%7C637303865193113145&amp;sdata=3DV3ofX%= 2Fvs6Pp%2Bc79cQx4iSB6K324Lyptqrj7FtvmDwsc%3D&amp;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  &nb= sp;          *This,
>
> +  IN      UINT64   &nbs= p;            &= nbsp;  Flags,  // new field. BIT0 =3D 0 means HashData is the dat= a to be hashed; BIT0 =3D 1 means HashData is the pre-hash digest.
>
> +  IN      UINT8    = ;            &n= bsp;    *HashData,
>
> +  IN      UINTN    = ;            &n= bsp;    HashDataLen,
>
> +  IN      TCG_PCR_EVENT_HDR  = ;       *NewEventHdr,
>
> +  IN      UINT8    = ;            &n= bsp;    *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 ++++++++++++++++++++++++++++= +++++++
>  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.<BR>= ;
>
> +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 result i= nto a specific
> PCR.
>
> +
>
> +  @param[in]      This  &nbs= p;       Indicates the calling context
>
> +  @param[in]      HashData  =     Physical address of the start of the data buffer
>
> +           &n= bsp;            = ;        to be hashed, extended, and log= ged.
>
> +  @param[in]      HashDataLen &nb= sp; The length, in bytes, of the buffer referenced by
> HashData.
>
> +  @param[in]      NewEventHdr &nb= sp; Pointer to a TCG_PCR_EVENT_HDR data
> structure.
>
> +  @param[in]      NewEventData  P= ointer to the new event data.
>
> +
>
> +  @retval EFI_SUCCESS       =     Operation completed successfully.
>
> +  @retval EFI_UNSUPPORTED       T= PM device not available.
>
> +  @retval EFI_OUT_OF_RESOURCES  Out of memory.
>
> +  @retval EFI_DEVICE_ERROR      The op= eration was unsuccessful.
>
> +**/
>
> +typedef
>
> +EFI_STATUS
>
> +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)(
>
> +  IN      EDKII_TCG_PPI  &nb= sp;          *This,
>
> +  IN      UINT8    = ;            &n= bsp;    *HashData,
>
> +  IN      UINTN    = ;            &n= bsp;    HashDataLen,
>
> +  IN      TCG_PCR_EVENT_HDR  = ;       *NewEventHdr,
>
> +  IN      UINT8    = ;            &n= bsp;    *NewEventData
>
> +  );
>
> +
>
> +///
>
> +/// The EFI_TCG Protocol abstracts TCG activity.
>
> +///
>
> +struct _EDKII_TCG_PPI {
>
> +  EDKII_TCG_HASH_LOG_EXTEND_EVENT     HashL= ogExtendEvent;
>
> +};
>
> +
>
> +extern EFI_GUID gEdkiiTcgPpiGuid;
>
> +
>
> +#endif
>
> --
> 2.26.2.windows.1

 

--_000_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_-- --_005_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_ Content-Type: image/png; name="76AE0D9036A443C7808A55E592A91C3C.png" Content-Description: 76AE0D9036A443C7808A55E592A91C3C.png Content-Disposition: inline; filename="76AE0D9036A443C7808A55E592A91C3C.png"; size=146; creation-date="Wed, 15 Jul 2020 15:32:53 GMT"; modification-date="Wed, 15 Jul 2020 15:32:53 GMT" Content-ID: Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAArYAAAACCAYAAACtx5+mAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAnSURBVFhH7dZBEQAABAAw/UtJIIEw5OD2WIdF Vg8AAFwntgAAPNCzWbxuF8ybYOQAAAAASUVORK5CYII= --_005_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_ Content-Type: image/png; name="3004F414C7B14A0FB160EDFAE258936F.png" Content-Description: 3004F414C7B14A0FB160EDFAE258936F.png Content-Disposition: inline; filename="3004F414C7B14A0FB160EDFAE258936F.png"; size=146; creation-date="Wed, 15 Jul 2020 15:32:54 GMT"; modification-date="Wed, 15 Jul 2020 15:32:54 GMT" Content-ID: Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAsUAAAACCAYAAACwuaE9AAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAnSURBVFhH7dbBAAAACASw/KUiiOBgCqQ95rDq yQIAwGdSDADAc9kDOArUC1b5xc8AAAAASUVORK5CYII= --_005_CY4PR21MB074365F6A3D87ADDC1004446EF7E0CY4PR21MB0743namp_--