[edk2] [PATCH 03/15] Vlv2TbltDevicePkg/Tcg2PhysicalPresenceLib: use Tcg2 instead of TrEE.

Zhang, Chao B posted 15 patches 6 years, 9 months ago
[edk2] [PATCH 03/15] Vlv2TbltDevicePkg/Tcg2PhysicalPresenceLib: use Tcg2 instead of TrEE.
Posted by Zhang, Chao B 6 years, 9 months ago
From: Jiewen Yao <jiewen.yao@intel.com>

TrEE is deprecated. We need use Tcg2.

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
 Vlv2TbltDevicePkg/Library/{DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c => DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.c}     | 28 ++++++++++----------
 Vlv2TbltDevicePkg/Library/{DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf => DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.inf} |  8 +++---
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.c
similarity index 90%
rename from Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c
rename to Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.c
index 9aebf528fb..96fad05527 100644
--- a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c
+++ b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.c
@@ -5,7 +5,7 @@
   This driver will have external input - variable.
   This external input must be validated carefully to avoid security issue.
 
-  TrEEExecutePendingTpmRequest() will receive untrusted input and do validation.
+  Tcg2ExecutePendingTpmRequest() will receive untrusted input and do validation.
 
 Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials 
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 #include <PiDxe.h>
 
-#include <Protocol/TrEEProtocol.h>
+#include <Protocol/Tcg2Protocol.h>
 #include <Protocol/VariableLock.h>
 #include <Library/DebugLib.h>
 #include <Library/BaseMemoryLib.h>
@@ -32,9 +32,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PrintLib.h>
 #include <Library/HiiLib.h>
 #include <Guid/EventGroup.h>
-#include <Guid/TrEEPhysicalPresenceData.h>
+#include <Guid/Tcg2PhysicalPresenceData.h>
 #include <Library/Tpm2CommandLib.h>
-#include <Library/TrEEPpVendorLib.h>
+#include <Library/Tcg2PpVendorLib.h>
 
 
 /**
@@ -47,7 +47,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 CHAR16 *
-TrEEPhysicalPresenceGetStringById (
+Tcg2PhysicalPresenceGetStringById (
   IN  EFI_STRING_ID   Id
   )
 {
@@ -87,7 +87,7 @@ TpmCommandClear (
   @retval Others                                   Return code from the TPM device after command execution.
 **/
 UINT32
-TrEEExecutePhysicalPresence (
+Tcg2ExecutePhysicalPresence (
   IN      TPM2B_AUTH                       *PlatformAuth,  OPTIONAL
   IN      UINT32                           CommandCode,
   IN OUT  EFI_TREE_PHYSICAL_PRESENCE_FLAGS *PpiFlags
@@ -107,7 +107,7 @@ TrEEExecutePhysicalPresence (
   @retval     FALSE       User discarded the changes.
 **/
 BOOLEAN
-TrEEReadUserKey (
+Tcg2ReadUserKey (
   IN     BOOLEAN                    CautionKey
   )
 {
@@ -127,7 +127,7 @@ TrEEReadUserKey (
 **/
 EFI_STATUS
 EFIAPI
-TrEEPhysicalPresenceLibConstructor (
+Tcg2PhysicalPresenceLibConstructor (
   IN EFI_HANDLE        ImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
   )
@@ -144,7 +144,7 @@ TrEEPhysicalPresenceLibConstructor (
   @retval    FALSE         The user doesn't confirm the changes.
 **/
 BOOLEAN
-TrEEUserConfirm (
+Tcg2UserConfirm (
   IN      UINT32                    TpmPpCommand
   )
 {
@@ -155,7 +155,7 @@ TrEEUserConfirm (
   Check if there is a valid physical presence command request. Also updates parameter value 
   to whether the requested physical presence command already confirmed by user
  
-   @param[in]  TcgPpData                 EFI TrEE Physical Presence request data. 
+   @param[in]  TcgPpData                 EFI Tcg2 Physical Presence request data. 
    @param[in]  Flags                     The physical presence interface flags.
    @param[out] RequestConfirmed            If the physical presence operation command required user confirm from UI.
                                              True, it indicates the command doesn't require user confirm, or already confirmed 
@@ -167,7 +167,7 @@ TrEEUserConfirm (
 
 **/
 BOOLEAN
-TrEEHaveValidTpmRequest  (
+Tcg2HaveValidTpmRequest  (
   IN      EFI_TREE_PHYSICAL_PRESENCE       *TcgPpData,
   IN      EFI_TREE_PHYSICAL_PRESENCE_FLAGS Flags,
   OUT     BOOLEAN                          *RequestConfirmed
@@ -189,7 +189,7 @@ TrEEHaveValidTpmRequest  (
   @param[in] Flags                The physical presence interface flags.
 **/
 VOID
-TrEEExecutePendingTpmRequest (
+Tcg2ExecutePendingTpmRequest (
   IN      TPM2B_AUTH                       *PlatformAuth,  OPTIONAL
   IN      EFI_TREE_PHYSICAL_PRESENCE       *TcgPpData,
   IN      EFI_TREE_PHYSICAL_PRESENCE_FLAGS Flags
@@ -213,7 +213,7 @@ TrEEExecutePendingTpmRequest (
 **/
 VOID
 EFIAPI
-TrEEPhysicalPresenceLibProcessRequest (
+Tcg2PhysicalPresenceLibProcessRequest (
   IN      TPM2B_AUTH                     *PlatformAuth  OPTIONAL
   )
 {
@@ -232,7 +232,7 @@ TrEEPhysicalPresenceLibProcessRequest (
 **/
 BOOLEAN
 EFIAPI
-TrEEPhysicalPresenceLibNeedUserConfirm(
+Tcg2PhysicalPresenceLibNeedUserConfirm(
   VOID
   )
 {
diff --git a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.inf
similarity index 84%
rename from Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf
rename to Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.inf
index 64c17c63d1..b67fd13893 100644
--- a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf
+++ b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.inf
@@ -1,5 +1,5 @@
 ## @file
-# Null instance of DxeTrEEPhysicalPresenceLib
+# Null instance of DxeTcg2PhysicalPresenceLib
 #
 #  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
 #                                                                                  
@@ -16,11 +16,11 @@
 
 [Defines]
   INF_VERSION                    = 0x00010005
-  BASE_NAME                      = DxeTrEEPhysicalPresenceLib
+  BASE_NAME                      = DxeTcg2PhysicalPresenceLib
   FILE_GUID                      = B41B3DB3-ACC5-4fcd-9992-891F3F9C0DA5
   MODULE_TYPE                    = DXE_DRIVER
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = TrEEPhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER 
+  LIBRARY_CLASS                  = Tcg2PhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER 
   
 #
 # The following information is for reference only and not required by the build tools.
@@ -29,7 +29,7 @@
 #
 
 [Sources]
-  DxeTrEEPhysicalPresenceLibNull.c
+  DxeTcg2PhysicalPresenceLibNull.c
 
 [Packages]
   MdePkg/MdePkg.dec
-- 
2.16.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 03/15] Vlv2TbltDevicePkg/Tcg2PhysicalPresenceLib: use Tcg2 instead of TrEE.
Posted by Guo, Mang 6 years, 9 months ago
Reviewed-by:  Guo  Mang <mang.guo@intel.com>



-----Original Message-----
From: Zhang, Chao B 
Sent: Thursday, March 15, 2018 3:35 PM
To: edk2-devel@lists.01.org
Cc: Yao, Jiewen; Wei, David; Guo, Mang; Zhang, Chao B
Subject: [PATCH 03/15] Vlv2TbltDevicePkg/Tcg2PhysicalPresenceLib: use Tcg2 instead of TrEE.

From: Jiewen Yao <jiewen.yao@intel.com>

TrEE is deprecated. We need use Tcg2.

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
 Vlv2TbltDevicePkg/Library/{DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c => DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.c}     | 28 ++++++++++----------
 Vlv2TbltDevicePkg/Library/{DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf => DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.inf} |  8 +++---
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.c
similarity index 90%
rename from Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c
rename to Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.c
index 9aebf528fb..96fad05527 100644
--- a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.c
+++ b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2Ph
+++ ysicalPresenceLibNull.c
@@ -5,7 +5,7 @@
   This driver will have external input - variable.
   This external input must be validated carefully to avoid security issue.
 
-  TrEEExecutePendingTpmRequest() will receive untrusted input and do validation.
+  Tcg2ExecutePendingTpmRequest() will receive untrusted input and do validation.
 
 Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>  This program and the accompanying materials @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 #include <PiDxe.h>
 
-#include <Protocol/TrEEProtocol.h>
+#include <Protocol/Tcg2Protocol.h>
 #include <Protocol/VariableLock.h>
 #include <Library/DebugLib.h>
 #include <Library/BaseMemoryLib.h>
@@ -32,9 +32,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PrintLib.h>
 #include <Library/HiiLib.h>
 #include <Guid/EventGroup.h>
-#include <Guid/TrEEPhysicalPresenceData.h>
+#include <Guid/Tcg2PhysicalPresenceData.h>
 #include <Library/Tpm2CommandLib.h>
-#include <Library/TrEEPpVendorLib.h>
+#include <Library/Tcg2PpVendorLib.h>
 
 
 /**
@@ -47,7 +47,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 CHAR16 *
-TrEEPhysicalPresenceGetStringById (
+Tcg2PhysicalPresenceGetStringById (
   IN  EFI_STRING_ID   Id
   )
 {
@@ -87,7 +87,7 @@ TpmCommandClear (
   @retval Others                                   Return code from the TPM device after command execution.
 **/
 UINT32
-TrEEExecutePhysicalPresence (
+Tcg2ExecutePhysicalPresence (
   IN      TPM2B_AUTH                       *PlatformAuth,  OPTIONAL
   IN      UINT32                           CommandCode,
   IN OUT  EFI_TREE_PHYSICAL_PRESENCE_FLAGS *PpiFlags @@ -107,7 +107,7 @@ TrEEExecutePhysicalPresence (
   @retval     FALSE       User discarded the changes.
 **/
 BOOLEAN
-TrEEReadUserKey (
+Tcg2ReadUserKey (
   IN     BOOLEAN                    CautionKey
   )
 {
@@ -127,7 +127,7 @@ TrEEReadUserKey (
 **/
 EFI_STATUS
 EFIAPI
-TrEEPhysicalPresenceLibConstructor (
+Tcg2PhysicalPresenceLibConstructor (
   IN EFI_HANDLE        ImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
   )
@@ -144,7 +144,7 @@ TrEEPhysicalPresenceLibConstructor (
   @retval    FALSE         The user doesn't confirm the changes.
 **/
 BOOLEAN
-TrEEUserConfirm (
+Tcg2UserConfirm (
   IN      UINT32                    TpmPpCommand
   )
 {
@@ -155,7 +155,7 @@ TrEEUserConfirm (
   Check if there is a valid physical presence command request. Also updates parameter value 
   to whether the requested physical presence command already confirmed by user
  
-   @param[in]  TcgPpData                 EFI TrEE Physical Presence request data. 
+   @param[in]  TcgPpData                 EFI Tcg2 Physical Presence request data. 
    @param[in]  Flags                     The physical presence interface flags.
    @param[out] RequestConfirmed            If the physical presence operation command required user confirm from UI.
                                              True, it indicates the command doesn't require user confirm, or already confirmed @@ -167,7 +167,7 @@ TrEEUserConfirm (
 
 **/
 BOOLEAN
-TrEEHaveValidTpmRequest  (
+Tcg2HaveValidTpmRequest  (
   IN      EFI_TREE_PHYSICAL_PRESENCE       *TcgPpData,
   IN      EFI_TREE_PHYSICAL_PRESENCE_FLAGS Flags,
   OUT     BOOLEAN                          *RequestConfirmed
@@ -189,7 +189,7 @@ TrEEHaveValidTpmRequest  (
   @param[in] Flags                The physical presence interface flags.
 **/
 VOID
-TrEEExecutePendingTpmRequest (
+Tcg2ExecutePendingTpmRequest (
   IN      TPM2B_AUTH                       *PlatformAuth,  OPTIONAL
   IN      EFI_TREE_PHYSICAL_PRESENCE       *TcgPpData,
   IN      EFI_TREE_PHYSICAL_PRESENCE_FLAGS Flags
@@ -213,7 +213,7 @@ TrEEExecutePendingTpmRequest (  **/  VOID  EFIAPI -TrEEPhysicalPresenceLibProcessRequest (
+Tcg2PhysicalPresenceLibProcessRequest (
   IN      TPM2B_AUTH                     *PlatformAuth  OPTIONAL
   )
 {
@@ -232,7 +232,7 @@ TrEEPhysicalPresenceLibProcessRequest (  **/  BOOLEAN  EFIAPI -TrEEPhysicalPresenceLibNeedUserConfirm(
+Tcg2PhysicalPresenceLibNeedUserConfirm(
   VOID
   )
 {
diff --git a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.inf
similarity index 84%
rename from Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf
rename to Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLibNull.inf
index 64c17c63d1..b67fd13893 100644
--- a/Vlv2TbltDevicePkg/Library/DxeTrEEPhysicalPresenceLibNull/DxeTrEEPhysicalPresenceLibNull.inf
+++ b/Vlv2TbltDevicePkg/Library/DxeTcg2PhysicalPresenceLibNull/DxeTcg2Ph
+++ ysicalPresenceLibNull.inf
@@ -1,5 +1,5 @@
 ## @file
-# Null instance of DxeTrEEPhysicalPresenceLib
+# Null instance of DxeTcg2PhysicalPresenceLib
 #
 #  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
 #                                                                                  
@@ -16,11 +16,11 @@
 
 [Defines]
   INF_VERSION                    = 0x00010005
-  BASE_NAME                      = DxeTrEEPhysicalPresenceLib
+  BASE_NAME                      = DxeTcg2PhysicalPresenceLib
   FILE_GUID                      = B41B3DB3-ACC5-4fcd-9992-891F3F9C0DA5
   MODULE_TYPE                    = DXE_DRIVER
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = TrEEPhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER 
+  LIBRARY_CLASS                  = Tcg2PhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER 
   
 #
 # The following information is for reference only and not required by the build tools.
@@ -29,7 +29,7 @@
 #
 
 [Sources]
-  DxeTrEEPhysicalPresenceLibNull.c
+  DxeTcg2PhysicalPresenceLibNull.c
 
 [Packages]
   MdePkg/MdePkg.dec
--
2.16.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel