From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.6262.1597195837965464922 for ; Tue, 11 Aug 2020 18:30:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=H+80W8Ji; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: jian.j.wang@intel.com) IronPort-SDR: Ed3aZhw/tiE82ycgrT+eV0imFNnJ3qSPpf+ktYmPvdZoztFIOOuVXc6eyOPx9TL4yEN43ZeMbX cDeRia6Oawlg== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="151293976" X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="151293976" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 18:30:33 -0700 IronPort-SDR: oYK36+1ZpeU2Xojdg4jEZLri1YkwEY/KA2se3CEF05KGEOXzrfnBbHx4oBfARLJ01n0gKBprzw tRsM2QGv4Vzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="290874661" Received: from orsmsx604-2.jf.intel.com (HELO ORSMSX604.amr.corp.intel.com) ([10.22.229.84]) by orsmga003.jf.intel.com with ESMTP; 11 Aug 2020 18:30:35 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 11 Aug 2020 18:30:34 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 11 Aug 2020 18:30:34 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Aug 2020 18:30:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h5E7ZaAcVfJzQfCeVY/UfNPLkmirC/JSKnhRe9prGS+Y2k2z0fJiIBS8rvS1+y+65MBxvKr7yBG7LXk57/0Cv/+yJw1yBbLL5X6WcSHTNGksc+j+Z518IDBe8b6s9DBp0QEnqCQ1h95yavTIsMFPGc7PWEcx3c3H7KST8x6JVtqF/Lf79+zgf0X//oUW1NOJfClh8xsaA70nDLO/Xq3uMsYBVkWWN7LyfP/Waf9KE6JjhqN2QNci1hAXMMs3Zqn81EhijZyj45liuE7kwSffqIUlWGMcbcEFdPgf98GNLzcw+yA/g43ofE1hrbow9cpNnYFz21fWmuDOILlNnvKlgA== 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=XS3chC1nDzEeYuqndq959RrczU2obqCKm9wAmu0pGdo=; b=fC5jBeBnOj1nqEbeC1cRPYlcTPWmQauRWD6lRH2dSaEjzphqf31ozsL9pGRvROzduyZgh6afe8sqN7Mc44cZaTQDMJZRG80hktGuW8XG4ZwXzgQBcsElc5Sa7osH7R5S+xyERoEqFSzT6Z2/GiwlfQocnivEEznBjZwyTEaXuzxxqRg6pmxq5djq3eAClB2pQc0xDW9zWQxeS4sIg6z4kd8lTEDUwuVdjzu65GyMooVhLx6jP/yN6wxnFT3on1pRUN0uE5frqd9HsmBH3X2+GxsyQySnrRK/QhNOqYpyrFVKw/i54/lLAz3Qnr6bciS9QqfQ5tL5hAhDGob3OEsIuQ== 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=XS3chC1nDzEeYuqndq959RrczU2obqCKm9wAmu0pGdo=; b=H+80W8JiJjZqOcK+okaSkwB9BSVho/E6Ce036ANgimDQ1A1F9SctNLtth5aVtzVTXrlC83STbfYk8sqCMn8fuigr7fzirHZNxc0SJDTxPohns/Jhtbq/m+DdzIBlmvmQJfImSFMmkXHyuOukVOjMq8D6jDxWy01EVJnGbyev8hA= Received: from SN6PR11MB3312.namprd11.prod.outlook.com (2603:10b6:805:c8::14) by SN6PR11MB3311.namprd11.prod.outlook.com (2603:10b6:805:c1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15; Wed, 12 Aug 2020 01:30:23 +0000 Received: from SN6PR11MB3312.namprd11.prod.outlook.com ([fe80::bc48:4db0:9666:124e]) by SN6PR11MB3312.namprd11.prod.outlook.com ([fe80::bc48:4db0:9666:124e%7]) with mapi id 15.20.3261.024; Wed, 12 Aug 2020 01:30:23 +0000 From: "Wang, Jian J" To: "Zhang, Qi1" , "devel@edk2.groups.io" CC: "Yao, Jiewen" , "Wu, Hao A" Subject: Re: [PATCH v2 1/9] MdeModulePkg/TpmMeasurementLib: Add new API to TpmMeasurmentLib. Thread-Topic: [PATCH v2 1/9] MdeModulePkg/TpmMeasurementLib: Add new API to TpmMeasurmentLib. Thread-Index: AQHWa4lMCcUSaPMiZke+KRW05cbUbqkzty7w Date: Wed, 12 Aug 2020 01:30:23 +0000 Message-ID: References: <20200806003342.17866-1-qi1.zhang@intel.com> <20200806003342.17866-2-qi1.zhang@intel.com> In-Reply-To: <20200806003342.17866-2-qi1.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2E2ODBmNDktYTc0Yi00YzFkLWJkNGYtMDY0MjA2NzVjZThkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN3NmWDVzcHVxRFgrOGxsYnJUTmR2YlwvbmVrMVwvYWFnSDQ1TkVhUU1jQUFQU3I4VmRscnd1YXVqUUpzZERvcmQ4In0= dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-ctpclassification: CTP_NT 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.203] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8736a35e-0a92-4e30-45ba-08d83e5f4898 x-ms-traffictypediagnostic: SN6PR11MB3311: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1303; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB3312.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(136003)(396003)(376002)(346002)(366004)(7696005)(8936002)(66446008)(64756008)(66556008)(8676002)(26005)(54906003)(110136005)(71200400001)(107886003)(316002)(66476007)(2906002)(52536014)(186003)(6506007)(53546011)(66946007)(76116006)(4326008)(83380400001)(33656002)(5660300002)(9686003)(86362001)(55016002)(478600001)(966005);DIR:OUT;SFP:1102; MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB3312.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8736a35e-0a92-4e30-45ba-08d83e5f4898 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2020 01:30:23.2320 (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: ujmy3GN/keUQRkSNeIYUD0ojlVAsXUUvbIjM5JM8QAFXRSY4eR+y/8RH/dhltk0YiP2qCr91Lyz11UkrMC2VUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3311 Return-Path: jian.j.wang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Qi, Some typos. See inline comments below. > -----Original Message----- > From: Zhang, Qi1 > Sent: Thursday, August 06, 2020 8:34 AM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J ; > Wu, Hao A ; Zhang, Qi1 > Subject: [PATCH v2 1/9] MdeModulePkg/TpmMeasurementLib: Add new API to > TpmMeasurmentLib. >=20 > From: Jiewen Yao >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2376 >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Qi Zhang > Signed-off-by: Jiewen Yao > --- > .../Include/Library/TpmMeasurementLib.h | 48 ++++++++++++++++++- > 1 file changed, 47 insertions(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Include/Library/TpmMeasurementLib.h > b/MdeModulePkg/Include/Library/TpmMeasurementLib.h > index ddf6723f03..5a0f97d208 100644 > --- a/MdeModulePkg/Include/Library/TpmMeasurementLib.h > +++ b/MdeModulePkg/Include/Library/TpmMeasurementLib.h > @@ -1,7 +1,7 @@ > /** @file >=20 > This library is used by other modules to measure data to TPM. >=20 >=20 >=20 > -Copyright (c) 2012, Intel Corporation. All rights reserved.
>=20 > +Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 >=20 >=20 > **/ >=20 > @@ -35,4 +35,50 @@ TpmMeasureAndLogData ( > IN UINT64 HashDataLen >=20 > ); >=20 >=20 >=20 > +/** >=20 > + Mesure a FirmwareBlob. 'Mesure' -> 'Measure' >=20 > + >=20 > + @param[in] PcrIndex PCR Index. >=20 > + @param[in] Descrption Description for this FirmwareBlob. 'Descrption' -> 'Description' >=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 > +MeasureFirmwareBlob ( >=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 HandoffTable. 'Mesure' -> 'Measure' >=20 > + >=20 > + @param[in] PcrIndex PcrIndex of the measurment. 'measurment' -> 'measurement' >=20 > + @param[in] Descrption Description for this HandoffTable. 'Descrption' -> 'Description' >=20 > + @param[in] TableGuid GUID of this HandoffTable. >=20 > + @param[in] TableAddress Base address of this HandoffTable. >=20 > + @param[in] TableLength Size in bytes of this HandoffTable= . >=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 > +MeasureHandoffTable ( >=20 > + IN UINT32 PcrIndex, >=20 > + IN CHAR8 *Description OPTIONAL, >=20 > + IN EFI_GUID *TableGuid, >=20 > + IN VOID *TableAddress, >=20 > + IN UINTN TableLength >=20 > + ); >=20 > + >=20 > #endif >=20 > -- > 2.26.2.windows.1