]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol
authorZhang, Chao B <chao.b.zhang@intel.com>
Sat, 21 Jul 2018 03:20:24 +0000 (11:20 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Mon, 23 Jul 2018 00:36:12 +0000 (08:36 +0800)
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>
Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com>
SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c

index 8c56a713d8d885d9ccd101e0ee4c39e944f2ee29..3aa034851da70326c1acbe7ca317de9c79ebe626 100644 (file)
@@ -184,21 +184,22 @@ TpmMeasureAndLogData (
   EFI_STATUS  Status;\r
 \r
   //\r
   EFI_STATUS  Status;\r
 \r
   //\r
-  // Try to measure using Tpm1.2 protocol\r
+  // Try to measure using Tpm20 protocol\r
   //\r
   //\r
-  Status = Tpm12MeasureAndLogData(\r
-               PcrIndex,\r
-               EventType,\r
-               EventLog,\r
-               LogLen,\r
-               HashData,\r
-               HashDataLen\r
-               );\r
+  Status = Tpm20MeasureAndLogData(\r
+             PcrIndex,\r
+             EventType,\r
+             EventLog,\r
+             LogLen,\r
+             HashData,\r
+             HashDataLen\r
+             );\r
+\r
   if (EFI_ERROR (Status)) {\r
     //\r
   if (EFI_ERROR (Status)) {\r
     //\r
-    // Try to measure using Tpm20 protocol\r
+    // Try to measure using Tpm1.2 protocol\r
     //\r
     //\r
-    Status = Tpm20MeasureAndLogData(\r
+    Status = Tpm12MeasureAndLogData(\r
                PcrIndex,\r
                EventType,\r
                EventLog,\r
                PcrIndex,\r
                EventType,\r
                EventLog,\r