Reporting Issues
Bug 2940 - change TpmMeasurementLibNull to BASE library
Summary: change TpmMeasurementLibNull to BASE library
Status: RESOLVED FIXED
Alias: None
Product: EDK2
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: qi1.zhang@intel.com
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-28 02:07 UTC by qi1.zhang@intel.com
Modified: 2020-09-02 08:32 UTC (History)
2 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed:
The OS the target platform is running: ---
Package: MdeModulePkg
Release(s) the issues must be fixed:
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qi1.zhang@intel.com 2020-08-28 02:07:37 UTC
TpmMeasurementLib has included DxeTpmMeasurementLib and PeiTpmMeasurementLib. So need to change TpmMeasurementLibNull to BASE library to avoid build error in some platform.
Comment 1 qi1.zhang@intel.com 2020-08-28 02:08:17 UTC
change TpmMeasurementLibNull to BASE library
Comment 2 qi1.zhang@intel.com 2020-08-28 03:29:48 UTC
https://edk2.groups.io/g/devel/message/64728
Comment 3 Laszlo Ersek 2020-09-02 07:54:48 UTC
More precisely, the goal is to allow SEC and PEIM to consume
TpmMeasurementLibNull. The platform that needs this change is
OpenBoardPkg in the edk2-platforms tree:

https://edk2.groups.io/g/devel/message/64736
http://mid.mail-archive.com/SN6PR11MB27977EB7627981921CF1A9EAB2520@SN6PR11MB2797.namprd11.prod.outlook.com

v2 patch from Qi Zhang:

* [edk2-devel] [PATCH v2]
  MdeModulePkg/Library: add PEIM and SEC module type to TpmMeasurementLibNull

  https://edk2.groups.io/g/devel/message/64867
  http://mid.mail-archive.com/20200901013557.9249-1-qi1.zhang@intel.com

v3 patch from Qi Zhang:

* [edk2-devel] [PATCH v3]
  MdeModulePkg/Library: add PEIM and SEC module type to TpmMeasurementLibNull

  http://mid.mail-archive.com/20200901072622.9391-1-qi1.zhang@intel.com
  https://edk2.groups.io/g/devel/message/64873
Comment 4 Laszlo Ersek 2020-09-02 08:02:04 UTC
The change qualifies as a bugfix because Null instances (of any library classes) should be as widely usable as possible, out of the box (regardless of known or expected use cases).
Comment 5 Laszlo Ersek 2020-09-02 08:32:40 UTC
(In reply to Laszlo Ersek from comment #3)

> v3 patch from Qi Zhang:
> 
> * [edk2-devel] [PATCH v3]
>   MdeModulePkg/Library: add PEIM and SEC module type to TpmMeasurementLibNull
> 
>   http://mid.mail-archive.com/20200901072622.9391-1-qi1.zhang@intel.com
>   https://edk2.groups.io/g/devel/message/64873

Merged as commit e8453aa373e9, via <https://github.com/tianocore/edk2/pull/912>.