[edk2-devel] [Patch] SecurityPkg Tcg2Dxe: Add Variable Arch protocol dependency

Liming Gao posted 1 patch 4 years, 6 months ago
Failed in applying to current master (apply log)
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[edk2-devel] [Patch] SecurityPkg Tcg2Dxe: Add Variable Arch protocol dependency
Posted by Liming Gao 4 years, 6 months ago
commit a7e2d20193e853020a1415c25b53280955055394 introduces the code to
get PcdTpm2AcpiTableRev in the driver entry point. This PCD is designed as
DynamicHii or DynamicHiiEx PCD. So, this PCD depends on Variable service.
To make sure PcdTpm2AcpiTableRev value be got, add Variable service as Depex.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
index c41c50a7a2..0127a31e97 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
@@ -107,7 +107,11 @@
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableLasa                        ## PRODUCES
 
 [Depex]
-  TRUE
+  # According to PcdTpm2AcpiTableRev definition in SecurityPkg.dec
+  # This PCD should be configured at DynamicHii or DynamicHiiEx.
+  # So, this PCD read operation depends on GetVariable service.
+  # Add VariableArch protocol dependency to make sure PCD read works.
+  gEfiVariableArchProtocolGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   Tcg2DxeExtra.uni
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#49125): https://edk2.groups.io/g/devel/message/49125
Mute This Topic: https://groups.io/mt/34666444/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch] SecurityPkg Tcg2Dxe: Add Variable Arch protocol dependency
Posted by Yao, Jiewen 4 years, 6 months ago
reviewed-by: jiewen Yao <jiewen.yao@intel.com>

thank you!
Yao, Jiewen


> 在 2019年10月17日,上午7:47,Gao, Liming <liming.gao@intel.com> 写道:
> 
> commit a7e2d20193e853020a1415c25b53280955055394 introduces the code to
> get PcdTpm2AcpiTableRev in the driver entry point. This PCD is designed as
> DynamicHii or DynamicHiiEx PCD. So, this PCD depends on Variable service.
> To make sure PcdTpm2AcpiTableRev value be got, add Variable service as Depex.
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
> SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
> index c41c50a7a2..0127a31e97 100644
> --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
> +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
> @@ -107,7 +107,11 @@
>   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableLasa                        ## PRODUCES
> 
> [Depex]
> -  TRUE
> +  # According to PcdTpm2AcpiTableRev definition in SecurityPkg.dec
> +  # This PCD should be configured at DynamicHii or DynamicHiiEx.
> +  # So, this PCD read operation depends on GetVariable service.
> +  # Add VariableArch protocol dependency to make sure PCD read works.
> +  gEfiVariableArchProtocolGuid
> 
> [UserExtensions.TianoCore."ExtraFiles"]
>   Tcg2DxeExtra.uni
> -- 
> 2.13.0.windows.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#49126): https://edk2.groups.io/g/devel/message/49126
Mute This Topic: https://groups.io/mt/34666444/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-