From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.3374.1581795832674092695 for ; Sat, 15 Feb 2020 11:43:52 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: michael.d.kinney@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2020 11:43:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,445,1574150400"; d="scan'208";a="267943679" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga002.fm.intel.com with ESMTP; 15 Feb 2020 11:43:52 -0800 Received: from orsmsx158.amr.corp.intel.com (10.22.240.20) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 15 Feb 2020 11:43:52 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.183]) by ORSMSX158.amr.corp.intel.com ([169.254.10.89]) with mapi id 14.03.0439.000; Sat, 15 Feb 2020 11:43:51 -0800 From: "Michael D Kinney" To: "Sukerkar, Amol N" , "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Yao, Jiewen" , "Wang, Jian J" , "Agrawal, Sachin" , "Gao, Liming" Subject: Re: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib Thread-Topic: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib Thread-Index: AQHV45WQr3UR/dgvxEynctWBfAfr1qgco5oAgAAD1JCAAADrIA== Date: Sat, 15 Feb 2020 19:43:51 +0000 Message-ID: References: <20200215001903.15024-1-amol.n.sukerkar@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Return-Path: michael.d.kinney@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Amol, FixedPcdGet32() does not apply to this use case. FixedPcdGet32() is usually only used when a PCD value=20 is used to fill in a field of a structure in a global variable where the compiler requires a value instead of a variable or a function call. The general rule is to use PcdGet/Setxx() everywhere=20 possible to maximize compatibility with different PCD types and only use FixedPcdGet/Setxx() if the compiler cannot build the component when PcdGet/Setxx() is used. Thanks, Mike > -----Original Message----- > From: Sukerkar, Amol N > Sent: Saturday, February 15, 2020 11:40 AM > To: Kinney, Michael D ; > devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J > ; Agrawal, Sachin > ; Gao, Liming > ; Sukerkar, Amol N > > Subject: RE: [PATCH v4 0/2] Enhancement and Fixes to > BaseHashApiLib >=20 > Hi Mike, >=20 > Yes, I just noticed and sent the patch with update 1 > (build passed and worked with PcdGet16). I didn't > notice the second change so I will make it as well in > version 6. >=20 > Question: There is a call FixedPcdGet32 as well. Would > it be applicable in BaseHashApiLib? >=20 > Thanks, > Amol >=20 > -----Original Message----- > From: Kinney, Michael D > Sent: Saturday, February 15, 2020 12:28 PM > To: Sukerkar, Amol N ; > devel@edk2.groups.io; Kinney, Michael D > > Cc: Yao, Jiewen ; Wang, Jian J > ; Agrawal, Sachin > ; Gao, Liming > > Subject: RE: [PATCH v4 0/2] Enhancement and Fixes to > BaseHashApiLib >=20 > Hi Amol, >=20 > Thanks for the updates: >=20 > There are a couple items remaining: >=20 > 1) BaseHashApiLib needs to use PcdGet32() instead of > PcdGet16() > 2) The extra [PcdsFixedAtBuild] line needs to be > removed from CryptoPkg.dec >=20 > Thanks, >=20 > Mike >=20 > > -----Original Message----- > > From: Sukerkar, Amol N > > Sent: Friday, February 14, 2020 4:19 PM > > To: devel@edk2.groups.io > > Cc: Kinney, Michael D ; > Yao, Jiewen > > ; Wang, Jian J > ; Agrawal, > > Sachin ; Gao, Liming > > > Subject: [PATCH v4 0/2] Enhancement and Fixes to > BaseHashApiLib > > > > This patch implements the fixes and enhancement to > BaseHashApiLib in > > the following manner: > > - Remove reference to MD4 and MD5 hashing algorithms > as they are > > deprecated; > > - Align the enumeration for hashing algorithmswith > the one used in > > TPM 2.0 implementation defined in > > IndustryStandard/Tpm20.h; > > - Change the type of PcdHashApiLibPolicy to > PcdsFixedAtBuild to > > optimize away the unused hashing algorithms for a > particular > > instance of HashApiLib. > > > > More information can be found at Bugzilla ticket, > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2511. > > > > Amol N Sukerkar (2): > > CryptoPkg/BaseHashApiLib: Align BaseHashApiLib with > TPM 2.0 > > Implementation > > CryptoPkg/BaseHashApiLib: Change > PcdHashApiLibPolicy type to > > FixedAtBuild > > > > CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | > > 121 ++++++-------------- > > CryptoPkg/CryptoPkg.dec | > > 18 ++- > > CryptoPkg/CryptoPkg.uni | > > 12 +- > > CryptoPkg/Include/Library/HashApiLib.h | > > 16 +-- > > 4 files changed, 52 insertions(+), 115 deletions(-) > > > > -- > > 2.16.2.windows.1 >=20 >=20