public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
       [not found] <20170124075732.27484-1-chao.b.zhang@intel.com>
@ 2017-01-24  7:57 ` Zhang, Chao B
  2017-01-24  8:32   ` Zeng, Star
  2017-01-24  7:57 ` [PATCH 3/3] SecurityPkg: Tcg2Dxe: " Zhang, Chao B
  2017-01-24  8:21 ` [PATCH 1/3] MdePkg: UefiTcgPlatform.h: Add UEFI_VARIABLE_DATA Yao, Jiewen
  2 siblings, 1 reply; 7+ messages in thread
From: Zhang, Chao B @ 2017-01-24  7:57 UTC (permalink / raw)
  To: edk2-devel; +Cc: jiewen.yao, star.zeng, Chao Zhang

Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec
00.21.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
index 309521f..b9febac 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
@@ -96,7 +96,7 @@ MeasureVariable (
 {
   EFI_STATUS                        Status;
   UINTN                             VarNameLength;
-  EFI_VARIABLE_DATA_TREE            *VarLog;
+  UEFI_VARIABLE_DATA                *VarLog;
   UINT32                            VarLogSize;
 
   ASSERT ((VarSize == 0 && VarData == NULL) || (VarSize != 0 && VarData != NULL));
@@ -105,7 +105,7 @@ MeasureVariable (
   VarLogSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName) + VarSize
                         - sizeof (VarLog->UnicodeName) - sizeof (VarLog->VariableData));
 
-  VarLog = (EFI_VARIABLE_DATA_TREE *) AllocateZeroPool (VarLogSize);
+  VarLog = (UEFI_VARIABLE_DATA *) AllocateZeroPool (VarLogSize);
   if (VarLog == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
-- 
1.9.5.msysgit.1



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

* [PATCH 3/3] SecurityPkg: Tcg2Dxe: Use UEFI_VARIABLE_DATA
       [not found] <20170124075732.27484-1-chao.b.zhang@intel.com>
  2017-01-24  7:57 ` [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA Zhang, Chao B
@ 2017-01-24  7:57 ` Zhang, Chao B
  2017-01-24  8:21 ` [PATCH 1/3] MdePkg: UefiTcgPlatform.h: Add UEFI_VARIABLE_DATA Yao, Jiewen
  2 siblings, 0 replies; 7+ messages in thread
From: Zhang, Chao B @ 2017-01-24  7:57 UTC (permalink / raw)
  To: edk2-devel; +Cc: jiewen.yao, star.zeng, Chao Zhang

Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec
00.21.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
 SecurityPkg/Library/DxeImageVerificationLib/Measurement.c | 6 +++---
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c                         | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/SecurityPkg/Library/DxeImageVerificationLib/Measurement.c b/SecurityPkg/Library/DxeImageVerificationLib/Measurement.c
index 1dc2989..2c81ef1 100644
--- a/SecurityPkg/Library/DxeImageVerificationLib/Measurement.c
+++ b/SecurityPkg/Library/DxeImageVerificationLib/Measurement.c
@@ -1,7 +1,7 @@
 /** @file
   Measure TrEE required variable.
 
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2017, 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
@@ -230,7 +230,7 @@ MeasureVariable (
 {
   EFI_STATUS                        Status;
   UINTN                             VarNameLength;
-  EFI_VARIABLE_DATA_TREE            *VarLog;
+  UEFI_VARIABLE_DATA                *VarLog;
   UINT32                            VarLogSize;
 
   //
@@ -241,7 +241,7 @@ MeasureVariable (
   VarLogSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName) + VarSize
                         - sizeof (VarLog->UnicodeName) - sizeof (VarLog->VariableData));
 
-  VarLog = (EFI_VARIABLE_DATA_TREE *) AllocateZeroPool (VarLogSize);
+  VarLog = (UEFI_VARIABLE_DATA *) AllocateZeroPool (VarLogSize);
   if (VarLog == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index 6ea3631..9aa16dc 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1787,7 +1787,7 @@ MeasureVariable (
   EFI_STATUS                        Status;
   TCG_PCR_EVENT_HDR                 TcgEvent;
   UINTN                             VarNameLength;
-  EFI_VARIABLE_DATA_TREE            *VarLog;
+  UEFI_VARIABLE_DATA                *VarLog;
 
   DEBUG ((EFI_D_INFO, "Tcg2Dxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)PCRIndex, (UINTN)EventType));
   DEBUG ((EFI_D_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
@@ -1799,7 +1799,7 @@ MeasureVariable (
   TcgEvent.EventSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName) + VarSize
                         - sizeof (VarLog->UnicodeName) - sizeof (VarLog->VariableData));
 
-  VarLog = (EFI_VARIABLE_DATA_TREE *)AllocatePool (TcgEvent.EventSize);
+  VarLog = (UEFI_VARIABLE_DATA *)AllocatePool (TcgEvent.EventSize);
   if (VarLog == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
@@ -1822,7 +1822,7 @@ MeasureVariable (
 
   if (EventType == EV_EFI_VARIABLE_DRIVER_CONFIG) {
     //
-    // Digest is the event data (EFI_VARIABLE_DATA)
+    // Digest is the event data (UEFI_VARIABLE_DATA)
     //
     Status = TcgDxeHashLogExtendEvent (
                0,
-- 
1.9.5.msysgit.1



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

* Re: [PATCH 1/3] MdePkg: UefiTcgPlatform.h: Add UEFI_VARIABLE_DATA
       [not found] <20170124075732.27484-1-chao.b.zhang@intel.com>
  2017-01-24  7:57 ` [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA Zhang, Chao B
  2017-01-24  7:57 ` [PATCH 3/3] SecurityPkg: Tcg2Dxe: " Zhang, Chao B
@ 2017-01-24  8:21 ` Yao, Jiewen
  2 siblings, 0 replies; 7+ messages in thread
From: Yao, Jiewen @ 2017-01-24  8:21 UTC (permalink / raw)
  To: Zhang, Chao B, edk2-devel@lists.01.org; +Cc: Zhang, Chao B, Zeng, Star

Series 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: Tuesday, January 24, 2017 3:58 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B
> <chao.b.zhang@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [edk2] [PATCH 1/3] MdePkg: UefiTcgPlatform.h: Add
> UEFI_VARIABLE_DATA
> 
> Add UEFI_VARIABLE_DATA according to TCG PC-Client PFP Spec 00.21.
> http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific
> _Platform_Profile_for_TPM_2p0_Systems_v21.pdf
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Yao Jiewen <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
> ---
>  MdePkg/Include/IndustryStandard/UefiTcgPlatform.h | 17
> +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
> b/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
> index 6ce808e..8a3e170 100644
> --- a/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
> +++ b/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
> @@ -151,6 +151,7 @@ typedef struct tdEFI_HANDOFF_TABLE_POINTERS {
>  /// This structure serves as the header for measuring variables. The name of the
>  /// variable (in Unicode format) should immediately follow, then the variable
>  /// data.
> +/// This is defined in TCG EFI Platform Spec for TPM1.1 or 1.2 V1.22
>  ///
>  typedef struct tdEFI_VARIABLE_DATA {
>    EFI_GUID                          VariableName;
> @@ -160,6 +161,22 @@ typedef struct tdEFI_VARIABLE_DATA {
>    INT8                              VariableData[1];  ///< Driver or
> platform-specific data
>  } EFI_VARIABLE_DATA;
> 
> +///
> +/// UEFI_VARIABLE_DATA
> +///
> +/// This structure serves as the header for measuring variables. The name of the
> +/// variable (in Unicode format) should immediately follow, then the variable
> +/// data.
> +/// This is defined in TCG PC Client Firmware Profile Spec 00.21
> +///
> +typedef struct tdUEFI_VARIABLE_DATA {
> +  EFI_GUID                          VariableName;
> +  UINT64                            UnicodeNameLength;
> +  UINT64                            VariableDataLength;
> +  CHAR16                            UnicodeName[1];
> +  INT8                              VariableData[1];  ///< Driver or
> platform-specific data
> +} UEFI_VARIABLE_DATA;
> +
>  //
>  // For TrEE1.0 compatibility
>  //
> --
> 1.9.5.msysgit.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
  2017-01-24  7:57 ` [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA Zhang, Chao B
@ 2017-01-24  8:32   ` Zeng, Star
  2017-01-24  8:36     ` Zeng, Star
  2017-01-25  2:12     ` Zhang, Chao B
  0 siblings, 2 replies; 7+ messages in thread
From: Zeng, Star @ 2017-01-24  8:32 UTC (permalink / raw)
  To: Zhang, Chao B, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Zeng, Star

Could we remove " #include <Protocol/TrEEProtocol.h>" in Measurement.c?

Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhang, Chao B
Sent: Tuesday, January 24, 2017 3:58 PM
To: edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec 00.21.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
index 309521f..b9febac 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
@@ -96,7 +96,7 @@ MeasureVariable (
 {
   EFI_STATUS                        Status;
   UINTN                             VarNameLength;
-  EFI_VARIABLE_DATA_TREE            *VarLog;
+  UEFI_VARIABLE_DATA                *VarLog;
   UINT32                            VarLogSize;
 
   ASSERT ((VarSize == 0 && VarData == NULL) || (VarSize != 0 && VarData != NULL)); @@ -105,7 +105,7 @@ MeasureVariable (
   VarLogSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName) + VarSize
                         - sizeof (VarLog->UnicodeName) - sizeof (VarLog->VariableData));
 
-  VarLog = (EFI_VARIABLE_DATA_TREE *) AllocateZeroPool (VarLogSize);
+  VarLog = (UEFI_VARIABLE_DATA *) AllocateZeroPool (VarLogSize);
   if (VarLog == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
--
1.9.5.msysgit.1

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


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

* Re: [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
  2017-01-24  8:32   ` Zeng, Star
@ 2017-01-24  8:36     ` Zeng, Star
  2017-01-25  2:12     ` Zhang, Chao B
  1 sibling, 0 replies; 7+ messages in thread
From: Zeng, Star @ 2017-01-24  8:36 UTC (permalink / raw)
  To: Zhang, Chao B, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Zeng, Star

Please update "MdePkg" to "MdeModulePkg" in the title.

Thanks,
Star
-----Original Message-----
From: Zeng, Star 
Sent: Tuesday, January 24, 2017 4:33 PM
To: Zhang, Chao B <chao.b.zhang@intel.com>; edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: RE: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

Could we remove " #include <Protocol/TrEEProtocol.h>" in Measurement.c?

Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhang, Chao B
Sent: Tuesday, January 24, 2017 3:58 PM
To: edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec 00.21.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
index 309521f..b9febac 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
@@ -96,7 +96,7 @@ MeasureVariable (
 {
   EFI_STATUS                        Status;
   UINTN                             VarNameLength;
-  EFI_VARIABLE_DATA_TREE            *VarLog;
+  UEFI_VARIABLE_DATA                *VarLog;
   UINT32                            VarLogSize;
 
   ASSERT ((VarSize == 0 && VarData == NULL) || (VarSize != 0 && VarData != NULL)); @@ -105,7 +105,7 @@ MeasureVariable (
   VarLogSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName) + VarSize
                         - sizeof (VarLog->UnicodeName) - sizeof (VarLog->VariableData));
 
-  VarLog = (EFI_VARIABLE_DATA_TREE *) AllocateZeroPool (VarLogSize);
+  VarLog = (UEFI_VARIABLE_DATA *) AllocateZeroPool (VarLogSize);
   if (VarLog == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
--
1.9.5.msysgit.1

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


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

* Re: [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
  2017-01-24  8:32   ` Zeng, Star
  2017-01-24  8:36     ` Zeng, Star
@ 2017-01-25  2:12     ` Zhang, Chao B
  2017-01-25  2:18       ` Yao, Jiewen
  1 sibling, 1 reply; 7+ messages in thread
From: Zhang, Chao B @ 2017-01-25  2:12 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Yao, Jiewen

Star: 
   I agree. I will clean up other TrEEProtocol reference later on.

-----Original Message-----
From: Zeng, Star 
Sent: Tuesday, January 24, 2017 4:33 PM
To: Zhang, Chao B <chao.b.zhang@intel.com>; edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: RE: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

Could we remove " #include <Protocol/TrEEProtocol.h>" in Measurement.c?

Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhang, Chao B
Sent: Tuesday, January 24, 2017 3:58 PM
To: edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec 00.21.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
index 309521f..b9febac 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
@@ -96,7 +96,7 @@ MeasureVariable (
 {
   EFI_STATUS                        Status;
   UINTN                             VarNameLength;
-  EFI_VARIABLE_DATA_TREE            *VarLog;
+  UEFI_VARIABLE_DATA                *VarLog;
   UINT32                            VarLogSize;
 
   ASSERT ((VarSize == 0 && VarData == NULL) || (VarSize != 0 && VarData != NULL)); @@ -105,7 +105,7 @@ MeasureVariable (
   VarLogSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName) + VarSize
                         - sizeof (VarLog->UnicodeName) - sizeof (VarLog->VariableData));
 
-  VarLog = (EFI_VARIABLE_DATA_TREE *) AllocateZeroPool (VarLogSize);
+  VarLog = (UEFI_VARIABLE_DATA *) AllocateZeroPool (VarLogSize);
   if (VarLog == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
--
1.9.5.msysgit.1

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


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

* Re: [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
  2017-01-25  2:12     ` Zhang, Chao B
@ 2017-01-25  2:18       ` Yao, Jiewen
  0 siblings, 0 replies; 7+ messages in thread
From: Yao, Jiewen @ 2017-01-25  2:18 UTC (permalink / raw)
  To: Zhang, Chao B, Zeng, Star, edk2-devel@lists.01.org

Thank you.

I also think this is a right way to go.

One observation I have is that we need use sizeof(TREE_BOOT_SERVICE_CAPABILITY_1_0) in Tcg2Dxe.
I think we can use OFFSET_OF(EFI_TCG2_BOOT_SERVICE_CAPABILITY , NumberOfPCRBanks) to remove TrEE reference in Tcg2.

Thank you
Yao Jiewen


> -----Original Message-----
> From: Zhang, Chao B
> Sent: Wednesday, January 25, 2017 10:13 AM
> To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>
> Subject: RE: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
> 
> Star:
>    I agree. I will clean up other TrEEProtocol reference later on.
> 
> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, January 24, 2017 4:33 PM
> To: Zhang, Chao B <chao.b.zhang@intel.com>; edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: RE: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
> 
> Could we remove " #include <Protocol/TrEEProtocol.h>" in Measurement.c?
> 
> Thanks,
> Star
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhang,
> Chao B
> Sent: Tuesday, January 24, 2017 3:58 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B
> <chao.b.zhang@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA
> 
> Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec
> 00.21.
> http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific
> _Platform_Profile_for_TPM_2p0_Systems_v21.pdf
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Yao Jiewen <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
> ---
>  MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
> index 309521f..b9febac 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
> @@ -96,7 +96,7 @@ MeasureVariable (
>  {
>    EFI_STATUS                        Status;
>    UINTN                             VarNameLength;
> -  EFI_VARIABLE_DATA_TREE            *VarLog;
> +  UEFI_VARIABLE_DATA                *VarLog;
>    UINT32                            VarLogSize;
> 
>    ASSERT ((VarSize == 0 && VarData == NULL) || (VarSize != 0 && VarData !=
> NULL)); @@ -105,7 +105,7 @@ MeasureVariable (
>    VarLogSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName)
> + VarSize
>                          - sizeof (VarLog->UnicodeName) - sizeof
> (VarLog->VariableData));
> 
> -  VarLog = (EFI_VARIABLE_DATA_TREE *) AllocateZeroPool (VarLogSize);
> +  VarLog = (UEFI_VARIABLE_DATA *) AllocateZeroPool (VarLogSize);
>    if (VarLog == NULL) {
>      return EFI_OUT_OF_RESOURCES;
>    }
> --
> 1.9.5.msysgit.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

end of thread, other threads:[~2017-01-25  2:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170124075732.27484-1-chao.b.zhang@intel.com>
2017-01-24  7:57 ` [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA Zhang, Chao B
2017-01-24  8:32   ` Zeng, Star
2017-01-24  8:36     ` Zeng, Star
2017-01-25  2:12     ` Zhang, Chao B
2017-01-25  2:18       ` Yao, Jiewen
2017-01-24  7:57 ` [PATCH 3/3] SecurityPkg: Tcg2Dxe: " Zhang, Chao B
2017-01-24  8:21 ` [PATCH 1/3] MdePkg: UefiTcgPlatform.h: Add UEFI_VARIABLE_DATA Yao, Jiewen

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