diff options
author | Qi Zhang <qi1.zhang@intel.com> | 2020-07-28 16:20:40 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-07-28 09:56:25 +0000 |
commit | 3887820e5fecdb9e948f88eb4e92298f6c3dd86f (patch) | |
tree | e90be2f7f5f0a07697d3cf7cf2ae066b8670cc2e /SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | |
parent | 1b0d659e6dc987d27f63da94c9fe3f26ba171d15 (diff) | |
download | edk2-3887820e5fecdb9e948f88eb4e92298f6c3dd86f.tar.gz edk2-3887820e5fecdb9e948f88eb4e92298f6c3dd86f.tar.bz2 edk2-3887820e5fecdb9e948f88eb4e92298f6c3dd86f.zip |
SecurityPkg/Tcg2Config: remove TPM2_ChangEPS if it is not supported.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2793
In current implementation TPM2_ChangeEPS command is always available
in the TPM2 operation pull down list in TCG2 Configuration, which
is confusing when the command is not supported by specific TPM chip.
As a user experience improvement, TPM2_ChangeEPS command should be
removed from the list when it is not supported.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c')
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c index baa8fcd08d..2946f95db0 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c @@ -788,6 +788,7 @@ InstallTcg2ConfigForm ( CHAR16 TempBuffer[1024];
TCG2_CONFIGURATION_INFO Tcg2ConfigInfo;
TPM2_PTP_INTERFACE_TYPE TpmDeviceInterfaceDetected;
+ BOOLEAN IsCmdImp = FALSE;
DriverHandle = NULL;
ConfigAccess = &PrivateData->ConfigAccess;
@@ -870,6 +871,12 @@ InstallTcg2ConfigForm ( HiiSetString (PrivateData->HiiHandle, STRING_TOKEN (STR_TPM2_SUPPORTED_HASH_ALGO_CONTENT), TempBuffer, NULL);
}
+ Status = Tpm2GetCapabilityIsCommandImplemented (TPM_CC_ChangeEPS, &IsCmdImp);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "Tpm2GetCapabilityIsCmdImpl fails %r\n", Status));
+ }
+ Tcg2ConfigInfo.ChangeEPSSupported = IsCmdImp;
+
FillBufferWithBootHashAlg (TempBuffer, sizeof(TempBuffer), PcdGet32 (PcdTcg2HashAlgorithmBitmap));
HiiSetString (PrivateData->HiiHandle, STRING_TOKEN (STR_BIOS_HASH_ALGO_CONTENT), TempBuffer, NULL);
|