audk/SecurityPkg/Library/HashLibBaseCryptoRouter
Star Zeng 9fe9cf9acb SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=244

Currently, when software HashLib (HashLibBaseCryptoRouter) and related
HashInstanceLib instances are used, PcdTcg2HashAlgorithmBitmap is
expected to be configured to 0 in platform dsc.
But PcdTcg2HashAlgorithmBitmap has default value 0xFFFFFFFF in
SecurityPkg.dec, and some platforms forget to configure it to 0 or
still configure it to 0xFFFFFFFF in platform dsc, that will make final
PcdTcg2HashAlgorithmBitmap value incorrect.

This patch is to add CONSTRUCTOR in HashLib (HashLibBaseCryptoRouter)
and PcdTcg2HashAlgorithmBitmap will be set to 0 in the CONSTRUCTOR.

Current HASH_LIB_PEI_ROUTER_GUID HOB created in
HashLibBaseCryptoRouterPei is shared between modules that link
HashLibBaseCryptoRouterPei.
To avoid mutual interference, separated HASH_LIB_PEI_ROUTER_GUID HOBs
with gEfiCallerIdGuid Identifier will be created for those modules.

This patch is also to add check in HashLib (HashLibBaseCryptoRouter)
for the mismatch of supported HashMask between modules that may link
different HashInstanceLib instances, warning will be reported if
mismatch is found.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
2017-02-08 18:52:07 +08:00
..
HashLibBaseCryptoRouterCommon.c SecurityPkg: Fix typo 'Ihis' with 'This' in codes 2016-10-18 09:41:56 +08:00
HashLibBaseCryptoRouterCommon.h SecurityPkg: Fix typo 'Ihis' with 'This' in codes 2016-10-18 09:41:56 +08:00
HashLibBaseCryptoRouterDxe.c SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap 2017-02-08 18:52:07 +08:00
HashLibBaseCryptoRouterDxe.inf SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap 2017-02-08 18:52:07 +08:00
HashLibBaseCryptoRouterDxe.uni SecurityPkg: Fix typo 'Ihis' with 'This' in codes 2016-10-18 09:41:56 +08:00
HashLibBaseCryptoRouterPei.c SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap 2017-02-08 18:52:07 +08:00
HashLibBaseCryptoRouterPei.inf SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap 2017-02-08 18:52:07 +08:00
HashLibBaseCryptoRouterPei.uni SecurityPkg: Fix typo 'Ihis' with 'This' in codes 2016-10-18 09:41:56 +08:00