From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.5766.1596357595386810355 for ; Sun, 02 Aug 2020 01:39:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=O0Z2ogTP; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: jiewen.yao@intel.com) IronPort-SDR: S3nhuBM+9cIIHyYPhFe9jBkqTEMQLqGy/mWi+55hs4iGvR62bTpRt/QxpLI1PFRFn73it+DkLP XtKmRNOqCW0g== X-IronPort-AV: E=McAfee;i="6000,8403,9700"; a="151951921" X-IronPort-AV: E=Sophos;i="5.75,425,1589266800"; d="scan'208";a="151951921" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2020 01:39:54 -0700 IronPort-SDR: 3qo+C6buq7PJP8ENjZyqqP6qYnOP1IkvesnanFzJh6AipQ975dOG8bcZzRHECiAcFk4KMS0rsm uArLv23Lf46A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,425,1589266800"; d="scan'208";a="273649416" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga007.fm.intel.com with ESMTP; 02 Aug 2020 01:39:54 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 2 Aug 2020 01:39:53 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 2 Aug 2020 01:39:53 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX111.amr.corp.intel.com (10.22.240.12) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 2 Aug 2020 01:39:52 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 2 Aug 2020 01:39:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X01r0mRBU1xuqbVPAHXPNJtCCd7TOz755u2cnDEfKAlhhJxhRq7jKnnpA+sG/QkgUqUXo1ekCv6J5CX4nfnWQk1+69gIGxU1AYlR67pDE7vafgdP1GpWJE+ytoDG96yX0But2KyT7FjIJKgwXKYaUstz4/ymQqNS4TrdABGwWX93ciqyHFnoPG11o2U28N+v/AnPnSNggupWYrhqCXbqO94rVcIr5SFWeq2zQykiQYDfP1VwMPz/fjR0pSVWpZQCPWo51mK5KG4Wxeiivy0zZqyFfVJk7J/BwXgaK10pBNX25fYlgbfinUZlaYHU8HD0BwuATNOyAICRNfmqAmMfpw== 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=Zs1GP91nZfJLnPSW8cUAH4ip4LVM8Wdx+CqZhxBmTj8=; b=ib6zQ/qDTsU+Q8tRjcU2I/R9dcCtMT+ygeoK4ttvDl1pf14SYLOy8CFNYyx0TeujVujpMjeSLqcGLO60xXJi0lNS3aC9FZcmSW9N4U1Tp2ZntQiCj33bZ3500C2T9Z7Il3vYST+Zk2uwnuZVVY8DvEp12s3tDn/y4ojlxnLyjKR94He1TR0eq9SuOFBg95/6IO+h6PqFeoVBx0u+YclqnHir9ojw6/yRP1kU3Zr9i+puiIfSHMjcPwfpMX/Gl32RWhsGKKsGawWghilNSUcNvCMMFSTTCWuznSuQ7vnrcmAFwDwFi/DrR0VmbShNtkVxOT2l6tndnEfT0pZ9kDHLaA== 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=Zs1GP91nZfJLnPSW8cUAH4ip4LVM8Wdx+CqZhxBmTj8=; b=O0Z2ogTPphR44mQ2aLka7ZuWwLQFnGmHas6oc7MyRy+/YY1oo1oUrxnW0z7PjA7cg6z590EG9XpwpA/Wm8wixciXJRWYzuxT1dL8Pk7LdL6bzV2de8zJbw237w3sXlg7MDF4vfvbXI6AggnmJFQI0FyaAuQqH3rddfSaUfLZuRE= Received: from CY4PR11MB1288.namprd11.prod.outlook.com (2603:10b6:903:23::8) by CY4PR11MB1478.namprd11.prod.outlook.com (2603:10b6:910:8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.19; Sun, 2 Aug 2020 08:39:51 +0000 Received: from CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::8cfa:f914:1ef2:9bbf]) by CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::8cfa:f914:1ef2:9bbf%7]) with mapi id 15.20.3239.021; Sun, 2 Aug 2020 08:39:51 +0000 From: "Yao, Jiewen" To: "Zhang, Qi1" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" , "Zeng, Star" Subject: Re: [PATCH 5/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add header file. Thread-Topic: [PATCH 5/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add header file. Thread-Index: AQHWZxhK9NYW9ywMS0uaU4KVB/FAnKkkgnCw Date: Sun, 2 Aug 2020 08:39:51 +0000 Message-ID: References: <20200731085437.16070-1-qi1.zhang@intel.com> <20200731085437.16070-6-qi1.zhang@intel.com> In-Reply-To: <20200731085437.16070-6-qi1.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTlkNjgwZDUtNDMzMS00ZDMzLWFlNWQtMTJiNzI3OTQ5M2RmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidzN3MmhYSGM0dTVTb09KelRcLzYxTGp5YVY0ZXRoSGFkUDZyYVQxSUFMbG9oWUVcL3hwbEk0R2dwNUVyb2dlT0N3In0= x-ctpclassification: CTP_NT dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.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: af328a6b-fa1a-44ae-b446-08d836bf9fb9 x-ms-traffictypediagnostic: CY4PR11MB1478: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1hrDqWGkH60nGaYHMgYnP9mdRhlxLk4IOyob7T24+y2zTop+PuenCeWCaQ8GqBIEmJlTf/eEtGCcCFI+0FIpQI2n35VnOpDJ3RAwOjqMS7zi3nrfXG+mGQDGRDuIUP2j82bgzQyM6aDta2N2YSD4tvj4DPWBlpOuko7+3aycnUBOTI59/deVZRd7T11CkIHOZGUHZgjJHZOQt47ML2L+u3bvu/ihJ7cpUlrb7HsQeTHsIfFhxvTz8rsaMco39UJyw6/RPHUgtK6gtbLn6vH4izEraMDX2bRMVdyA2Hx8imez0lTbJKgUxlH9FZKA9dpbzS7o76mw688S++S1TUrJotyYRD/pzQcvzsKVdqBZ7cEcW5NwdYokJt+HYwLBC5yHs6EvUYfRHgvNUT5H+lKVpw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1288.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(376002)(136003)(396003)(39860400002)(366004)(66556008)(33656002)(4326008)(52536014)(66946007)(55016002)(8676002)(66446008)(71200400001)(107886003)(76116006)(2906002)(8936002)(64756008)(9686003)(66476007)(26005)(5660300002)(54906003)(83380400001)(110136005)(86362001)(7696005)(478600001)(966005)(316002)(186003)(53546011)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: /GYqp/s6flL2rhfzmgZMY0Ze8Uh0yw9QUqtUJp+/orz1aU0YyEtdjDV09bu1yETLvd2kclU+SXGnSpy4kYZZ2nCgO/MGZqZPqLomFu3bCT1XzCxbhaQgfJ5G4M3cstEcscC0Obxg6LTmRlYkXAcoENGr57bCbK+Se0ygRSmv+sb11UIhxBbBhXsH16XMVrhO5HLxj1wMs6URfbM0pYnYL4EACaqI/2sLw383MrYC0OnHhVlsdy2wUsifM1taH5EF78gPlmnu9MqxWkz09AgaqJe5E77TZ30i1YZxMAzZaRqLBE6D+wJ0jZH6Cr2uhgpKCFvJNoxVW+ywhVcLz7Plo0V+S1NaqloSzZjEXiJVSNU2G7xmFf4M5ZwqOgYsy3zPAMb1H93Dxq2V/3KkT+OfuQylhq+Tcvh83L2N1aP/iNOZRxMRLY3YU+WevUpDa6LzCGMe4mImnjzIWJ5aBBWoLwlaq6RFfxKSZcic67A/4xO3TYCLaYXem+BYqurDmKiqZWpsoKeJj91pefAjTEvOTvTj5pd0EbNvdML/Alfb/ETikU7Hv4PFT5KWixFlgpYhDKbTQOUZzXJKwQ0s+YU3YvYEsg6qqhnc5B9WswW8XUnuKVLtTy6AUzFWUbwuP4U1AChZm9OqCwgUPAHsgvFqig== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1288.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: af328a6b-fa1a-44ae-b446-08d836bf9fb9 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2020 08:39:51.7367 (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: t81DJFOGt/HWxbxLWVGNOqCIMR4kE5oadXhcAf01AJ/k46Uy1oARU7KuIOJzog47rLGpIWzc7A0DGGQRpCZVWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1478 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Qi We should hide MeasureFspFirmwareBlobWithCfg() as an internal function. The MeasureFspFirmwareBlob() should decide hash FV with or without CFG base= d upon PCD. > -----Original Message----- > From: Zhang, Qi1 > Sent: Friday, July 31, 2020 4:55 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Chiu, Chasel ; > Desimone, Nathaniel L ; Zeng, Star > ; Zhang, Qi1 > Subject: [PATCH 5/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add header fi= le. >=20 > From: Jiewen Yao >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2376 >=20 > Cc: Jiewen Yao > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Star Zeng > Cc: Qi Zhang > Signed-off-by: Jiewen Yao > --- > .../Include/Library/FspMeasurementLib.h | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 > IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h >=20 > diff --git a/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h > b/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h > new file mode 100644 > index 0000000000..ca02ecdf1f > --- /dev/null > +++ b/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h > @@ -0,0 +1,65 @@ > +/** @file >=20 > + This library is used by FSP modules to measure data to TPM. >=20 > + >=20 > +Copyright (c) 2020, Intel Corporation. All rights reserved.
>=20 > +SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef _FSP_MEASUREMENT_LIB_H_ >=20 > +#define _FSP_MEASUREMENT_LIB_H_ >=20 > + >=20 > +#define FSP_MEASURE_FSP BIT0 >=20 > +#define FSP_MEASURE_FSPT BIT1 >=20 > +#define FSP_MEASURE_FSPM BIT2 >=20 > +#define FSP_MEASURE_FSPS BIT3 >=20 > +#define FSP_MEASURE_FSPUPD BIT31 >=20 > + >=20 > +/** >=20 > + Mesure a FSP FirmwareBlob. >=20 > + >=20 > + @param[in] PcrIndex PCR Index. >=20 > + @param[in] Descrption Description for this FirmwareBlob. >=20 > + @param[in] FirmwareBlobBase Base address of this FirmwareBlob. >=20 > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob= . >=20 > + >=20 > + @retval EFI_SUCCESS Operation completed successfully. >=20 > + @retval EFI_UNSUPPORTED TPM device not available. >=20 > + @retval EFI_OUT_OF_RESOURCES Out of memory. >=20 > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. >=20 > +*/ >=20 > +EFI_STATUS >=20 > +EFIAPI >=20 > +MeasureFspFirmwareBlob ( >=20 > + IN UINT32 PcrIndex, >=20 > + IN CHAR8 *Description OPTIONAL, >=20 > + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, >=20 > + IN UINT64 FirmwareBlobLength >=20 > + ); >=20 > + >=20 > +/** >=20 > + Mesure a FSP FirmwareBlob. >=20 > + >=20 > + @param[in] PcrIndex PCR Index. >=20 > + @param[in] Descrption Description for this FirmwareBlob. >=20 > + @param[in] FirmwareBlobBase Base address of this FirmwareBlob. >=20 > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob= . >=20 > + @param[in] CfgRegionOffset Configuration region offset in byt= es. >=20 > + @param[in] CfgRegionSize Configuration region in bytes. >=20 > + >=20 > + @retval EFI_SUCCESS Operation completed successfully. >=20 > + @retval EFI_UNSUPPORTED TPM device not available. >=20 > + @retval EFI_OUT_OF_RESOURCES Out of memory. >=20 > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. >=20 > +*/ >=20 > +EFI_STATUS >=20 > +EFIAPI >=20 > +MeasureFspFirmwareBlobWithCfg ( >=20 > + IN CHAR8 *Description OPTIONAL, >=20 > + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, >=20 > + IN UINT64 FirmwareBlobLength, >=20 > + IN UINT32 CfgRegionOffset, >=20 > + IN UINT32 CfgRegionSize >=20 > + ); >=20 > + >=20 > +#endif >=20 > -- > 2.26.2.windows.1