TPM1.2 is obsoleted by TPM2.0. switch TCG/TCG2 protocol check to apply this
trend
Cc: Long, Qin <qin.long@intel.com>
Cc: Yao, Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com>
---
.../DxeTpmMeasurementLib/DxeTpmMeasurementLib.c | 23 +++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
index 8c56a713d8..3aa034851d 100644
--- a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
+++ b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
@@ -182,25 +182,26 @@ TpmMeasureAndLogData (
)
{
EFI_STATUS Status;
//
- // Try to measure using Tpm1.2 protocol
+ // Try to measure using Tpm20 protocol
//
- Status = Tpm12MeasureAndLogData(
- PcrIndex,
- EventType,
- EventLog,
- LogLen,
- HashData,
- HashDataLen
- );
+ Status = Tpm20MeasureAndLogData(
+ PcrIndex,
+ EventType,
+ EventLog,
+ LogLen,
+ HashData,
+ HashDataLen
+ );
+
if (EFI_ERROR (Status)) {
//
- // Try to measure using Tpm20 protocol
+ // Try to measure using Tpm1.2 protocol
//
- Status = Tpm20MeasureAndLogData(
+ Status = Tpm12MeasureAndLogData(
PcrIndex,
EventType,
EventLog,
LogLen,
HashData,
--
2.16.2.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel