Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol
Browse files Browse the repository at this point in the history
TPM1.2 is obsoleted by TPM2.0. switch TCG/TCG2 protocol check to apply this
trend

Cc: Long, Qin <[email protected]>
Cc: Yao, Jiewen <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhang, Chao B <[email protected]>
Reviewed-by: Yao, Jiewen <[email protected]>
  • Loading branch information
zhangchaointel committed Jul 23, 2018
1 parent 5da2c9b commit d9e206d
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,21 +184,22 @@ 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,
Expand Down

0 comments on commit d9e206d

Please sign in to comment.