public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 0/2] Re-prioritize TCG/TCG2 protocol
@ 2018-07-21  3:31 Zhang, Chao B
  2018-07-21  3:31 ` [Patch 1/2] MdeModulePkg: Variable: " Zhang, Chao B
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhang, Chao B @ 2018-07-21  3:31 UTC (permalink / raw)
  To: edk2-devel

Re-prioritize TCG/TCG2 protocol

Zhang, Chao B (2):
  MdeModulePkg: Variable: Re-prioritize TCG/TCG2 protocol
  MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol

 .../Universal/Variable/RuntimeDxe/TcgMorLockSmm.c  | 10 +++++-----
 .../DxeTpmMeasurementLib/DxeTpmMeasurementLib.c    | 23 +++++++++++-----------
 2 files changed, 17 insertions(+), 16 deletions(-)

-- 
2.16.2.windows.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Patch 1/2] MdeModulePkg: Variable: Re-prioritize TCG/TCG2 protocol
  2018-07-21  3:31 [Patch 0/2] Re-prioritize TCG/TCG2 protocol Zhang, Chao B
@ 2018-07-21  3:31 ` Zhang, Chao B
  2018-07-21  3:31 ` [Patch 2/2] MdeModulePkg: TpmMeasureLib: " Zhang, Chao B
  2018-07-21  6:16 ` [Patch 0/2] " Yao, Jiewen
  2 siblings, 0 replies; 4+ messages in thread
From: Zhang, Chao B @ 2018-07-21  3:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Long, Qin, Yao, Jiewen

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>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
index c26616ecfe..28aa2893c6 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
@@ -2,11 +2,11 @@
   TCG MOR (Memory Overwrite Request) Lock Control support (SMM version).
 
   This module initilizes MemoryOverwriteRequestControlLock variable.
   This module adds Variable Hook and check MemoryOverwriteRequestControlLock.
 
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
 which accompanies this distribution.  The full text of the license may be found at
 http://opensource.org/licenses/bsd-license.php
 
@@ -457,18 +457,18 @@ MorLockInitAtEndOfDxe (
     // does not produce it. Whether this is the case (from the last OS boot)
     // can be deduced from the absence of the TCG / TCG2 protocols, as edk2's
     // MOR implementation depends on (one of) those protocols.
     //
     TcgStatus = gBS->LocateProtocol (
-                       &gEfiTcgProtocolGuid,
-                       NULL,                 // Registration
+                       &gEfiTcg2ProtocolGuid,
+                       NULL,                     // Registration
                        &TcgInterface
                        );
     if (EFI_ERROR (TcgStatus)) {
       TcgStatus = gBS->LocateProtocol (
-                         &gEfiTcg2ProtocolGuid,
-                         NULL,                  // Registration
+                         &gEfiTcgProtocolGuid,
+                         NULL,                   // Registration
                          &TcgInterface
                          );
     }
 
     if (!EFI_ERROR (TcgStatus)) {
-- 
2.16.2.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Patch 2/2] MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol
  2018-07-21  3:31 [Patch 0/2] Re-prioritize TCG/TCG2 protocol Zhang, Chao B
  2018-07-21  3:31 ` [Patch 1/2] MdeModulePkg: Variable: " Zhang, Chao B
@ 2018-07-21  3:31 ` Zhang, Chao B
  2018-07-21  6:16 ` [Patch 0/2] " Yao, Jiewen
  2 siblings, 0 replies; 4+ messages in thread
From: Zhang, Chao B @ 2018-07-21  3:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Long, Qin, Yao, Jiewen

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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Patch 0/2] Re-prioritize TCG/TCG2 protocol
  2018-07-21  3:31 [Patch 0/2] Re-prioritize TCG/TCG2 protocol Zhang, Chao B
  2018-07-21  3:31 ` [Patch 1/2] MdeModulePkg: Variable: " Zhang, Chao B
  2018-07-21  3:31 ` [Patch 2/2] MdeModulePkg: TpmMeasureLib: " Zhang, Chao B
@ 2018-07-21  6:16 ` Yao, Jiewen
  2 siblings, 0 replies; 4+ messages in thread
From: Yao, Jiewen @ 2018-07-21  6:16 UTC (permalink / raw)
  To: Zhang, Chao B, edk2-devel@lists.01.org

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Zhang, Chao B
> Sent: Saturday, July 21, 2018 11:32 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 0/2] Re-prioritize TCG/TCG2 protocol
> 
> Re-prioritize TCG/TCG2 protocol
> 
> Zhang, Chao B (2):
>   MdeModulePkg: Variable: Re-prioritize TCG/TCG2 protocol
>   MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol
> 
>  .../Universal/Variable/RuntimeDxe/TcgMorLockSmm.c  | 10 +++++-----
>  .../DxeTpmMeasurementLib/DxeTpmMeasurementLib.c    | 23
> +++++++++++-----------
>  2 files changed, 17 insertions(+), 16 deletions(-)
> 
> --
> 2.16.2.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-21  6:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-21  3:31 [Patch 0/2] Re-prioritize TCG/TCG2 protocol Zhang, Chao B
2018-07-21  3:31 ` [Patch 1/2] MdeModulePkg: Variable: " Zhang, Chao B
2018-07-21  3:31 ` [Patch 2/2] MdeModulePkg: TpmMeasureLib: " Zhang, Chao B
2018-07-21  6:16 ` [Patch 0/2] " Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox