summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Include
diff options
context:
space:
mode:
authorZhang, Qi <qi1.zhang@intel.com>2020-07-28 16:20:39 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-07-28 09:56:25 +0000
commit1b0d659e6dc987d27f63da94c9fe3f26ba171d15 (patch)
tree5e38e76840da380fea19f019f7aeb08898834fc9 /SecurityPkg/Include
parentffde22468e2f0e93b51f97b801e6c7a181088c61 (diff)
downloadedk2-1b0d659e6dc987d27f63da94c9fe3f26ba171d15.tar.gz
edk2-1b0d659e6dc987d27f63da94c9fe3f26ba171d15.tar.bz2
edk2-1b0d659e6dc987d27f63da94c9fe3f26ba171d15.zip
SecurityPkg/Tpm2CommandLib: add a new function
Tpm2GetCapabilityIsCommandImplemented REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2793 check if the commad is supported by comparing the command code with command index. 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/Include')
-rw-r--r--SecurityPkg/Include/Library/Tpm2CommandLib.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h b/SecurityPkg/Include/Library/Tpm2CommandLib.h
index ce381e786b..ee8eb62295 100644
--- a/SecurityPkg/Include/Library/Tpm2CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h
@@ -791,6 +791,22 @@ Tpm2GetCapabilityAlgorithmSet (
);
/**
+ This function will query if the command is supported.
+
+ @param[In] Command TPM_CC command starts from TPM_CC_FIRST.
+ @param[out] IsCmdImpl The command is supported or not.
+
+ @retval EFI_SUCCESS Operation completed successfully.
+ @retval EFI_DEVICE_ERROR The command was unsuccessful.
+**/
+EFI_STATUS
+EFIAPI
+Tpm2GetCapabilityIsCommandImplemented (
+ IN TPM_CC Command,
+ OUT BOOLEAN *IsCmdImpl
+ );
+
+/**
This command is used to check to see if specific combinations of algorithm parameters are supported.
@param[in] Parameters Algorithm parameters to be validated