diff options
author | Zhang, Chao B <chao.b.zhang@intel.com> | 2016-12-27 16:47:06 +0800 |
---|---|---|
committer | Zhang, Chao B <chao.b.zhang@intel.com> | 2017-03-02 09:53:34 +0800 |
commit | d646d1a927c2931be19d229388699dcae71a40d1 (patch) | |
tree | 1cc59215a06d6a73589328d552c94258001c6b5e | |
parent | 7889b8da610a43ecfd8dd084400a20c935f697ea (diff) | |
download | edk2-d646d1a927c2931be19d229388699dcae71a40d1.zip edk2-d646d1a927c2931be19d229388699dcae71a40d1.tar.gz edk2-d646d1a927c2931be19d229388699dcae71a40d1.tar.bz2 |
SecurityPkg: Tcg2PhysicalPresence: Define TCG2 PP Flags Initial Pcd
Define PcdTcg2PhysicalPresenceFlags to initialize TCG2 PP Flags setting.
Cc: Yao Jiewen <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Conflicts:
SecurityPkg/SecurityPkg.dec
3 files changed, 12 insertions, 2 deletions
diff --git a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.c index cb3cfe3..78f2859 100644 --- a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.c +++ b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.c @@ -1081,7 +1081,7 @@ Tcg2PhysicalPresenceLibProcessRequest ( &PpiFlags
);
if (EFI_ERROR (Status)) {
- PpiFlags.PPFlags = TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT | TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT;
+ PpiFlags.PPFlags = PcdGet32(PcdTcg2PhysicalPresenceFlags);
Status = gRT->SetVariable (
TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE,
&gEfiTcg2PhysicalPresenceGuid,
@@ -1093,6 +1093,7 @@ Tcg2PhysicalPresenceLibProcessRequest ( DEBUG ((EFI_D_ERROR, "[TPM2] Set physical presence flag failed, Status = %r\n", Status));
return ;
}
+ DEBUG((DEBUG_INFO, "[TPM2] Initial physical presence flags value is 0x%x\n", PpiFlags.PPFlags));
}
//
diff --git a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf index bad4fe4..de87971 100644 --- a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf +++ b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf @@ -8,7 +8,7 @@ # This driver will have external input - variable.
# This external input must be validated carefully to avoid security issue.
#
-# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2013 - 2016, 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
@@ -60,6 +60,9 @@ gEfiTcg2ProtocolGuid ## CONSUMES
gEdkiiVariableLockProtocolGuid ## CONSUMES
+[Pcd]
+ gEfiSecurityPkgTokenSpaceGuid.PcdTcg2PhysicalPresenceFlags ## SOMETIMES_CONSUMES
+
[Guids]
## CONSUMES ## HII
## SOMETIMES_PRODUCES ## Variable:L"Tcg2PhysicalPresence"
diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec index b4eabc4..8a453fc 100644 --- a/SecurityPkg/SecurityPkg.dec +++ b/SecurityPkg/SecurityPkg.dec @@ -414,6 +414,12 @@ # @Prompt Length(in bytes) of the TCG2 Final event log area.
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2FinalLogAreaLen|0x8000|UINT32|0x00010018
+ ## This PCD defines initial setting of TCG2 Persistent Firmware Management Flags
+ # PCD can be configured for different settings in different scenarios
+ # Default setting is TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT | TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT
+ # @Prompt Inital setting of TCG2 Persistent Firmware Management Flags
+ gEfiSecurityPkgTokenSpaceGuid.PcdTcg2PhysicalPresenceFlags|0x300E3|UINT32|0x0001001B
+
[PcdsDynamic, PcdsDynamicEx]
## This PCD indicates Hash mask for TPM 2.0.<BR><BR>
|