public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "Sukerkar, Amol N" <amol.n.sukerkar@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Agrawal, Sachin" <sachin.agrawal@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib
Date: Sat, 15 Feb 2020 19:43:51 +0000	[thread overview]
Message-ID: <E92EE9817A31E24EB0585FDF735412F5B9EBA8E0@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <SN6PR11MB2893FC79255912C6CE17E954AC140@SN6PR11MB2893.namprd11.prod.outlook.com>

Amol,

FixedPcdGet32() does not apply to this use case.

FixedPcdGet32() is usually only used when a PCD value 
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 
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 <amol.n.sukerkar@intel.com>
> Sent: Saturday, February 15, 2020 11:40 AM
> To: Kinney, Michael D <michael.d.kinney@intel.com>;
> devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Agrawal, Sachin
> <sachin.agrawal@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Sukerkar, Amol N
> <amol.n.sukerkar@intel.com>
> Subject: RE: [PATCH v4 0/2] Enhancement and Fixes to
> BaseHashApiLib
> 
> Hi Mike,
> 
> 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.
> 
> Question: There is a call FixedPcdGet32 as well. Would
> it be applicable in BaseHashApiLib?
> 
> Thanks,
> Amol
> 
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Saturday, February 15, 2020 12:28 PM
> To: Sukerkar, Amol N <amol.n.sukerkar@intel.com>;
> devel@edk2.groups.io; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Agrawal, Sachin
> <sachin.agrawal@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: RE: [PATCH v4 0/2] Enhancement and Fixes to
> BaseHashApiLib
> 
> Hi Amol,
> 
> Thanks for the updates:
> 
> There are a couple items remaining:
> 
> 1) BaseHashApiLib needs to use PcdGet32() instead of
> PcdGet16()
> 2) The extra [PcdsFixedAtBuild] line needs to be
> removed from CryptoPkg.dec
> 
> Thanks,
> 
> Mike
> 
> > -----Original Message-----
> > From: Sukerkar, Amol N <amol.n.sukerkar@intel.com>
> > Sent: Friday, February 14, 2020 4:19 PM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> Yao, Jiewen
> > <jiewen.yao@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Agrawal,
> > Sachin <sachin.agrawal@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> > 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=2511.
> >
> > 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
> 
> 


  reply	other threads:[~2020-02-15 19:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15  0:19 [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib Sukerkar, Amol N
2020-02-15  0:19 ` [PATCH v4 1/2] CryptoPkg/BaseHashApiLib: Align BaseHashApiLib with TPM 2.0 Implementation Sukerkar, Amol N
2020-02-15  0:19 ` [PATCH v4 2/2] CryptoPkg/BaseHashApiLib: Change PcdHashApiLibPolicy type to FixedAtBuild Sukerkar, Amol N
2020-02-15 19:27 ` [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib Michael D Kinney
2020-02-15 19:39   ` Sukerkar, Amol N
2020-02-15 19:43     ` Michael D Kinney [this message]
2020-02-15 19:50       ` Sukerkar, Amol N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E92EE9817A31E24EB0585FDF735412F5B9EBA8E0@ORSMSX113.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox