summaryrefslogtreecommitdiff
path: root/include/tpm-v2.h
diff options
context:
space:
mode:
authorMasahisa Kojima <masahisa.kojima@linaro.org>2021-11-04 16:59:16 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-11-07 20:36:55 +0300
commit7fc93cae4903c5332b8ae94e1517f7c79f250a4d (patch)
tree4c9216af31059d317ddfdece1970a7ad57a92063 /include/tpm-v2.h
parent14cbb330fe8e2723871926a3806954393da83cce (diff)
downloadu-boot-7fc93cae4903c5332b8ae94e1517f7c79f250a4d.tar.xz
efi_loader: add EFI_TCG2_PROTOCOL.SubmitCommand
This commit adds the EFI_TCG2_PROTOCOL.SubmitCommand required in the TCG PC Client PFP spec. SubmitCommand enables to send the raw command to the TPM device. To implement this api, tpm2_submit_command() is added into tpm-v2.c. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/tpm-v2.h')
-rw-r--r--include/tpm-v2.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index 13b3db67c6..947458b0bd 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -641,4 +641,17 @@ u32 tpm2_write_lock(struct udevice *dev, u32 index);
*/
u32 tpm2_disable_platform_hierarchy(struct udevice *dev);
+/**
+ * submit user specified data to the TPM and get response
+ *
+ * @dev TPM device
+ * @sendbuf: Buffer of the data to send
+ * @recvbuf: Buffer to save the response to
+ * @recv_size: Pointer to the size of the response buffer
+ *
+ * @return code of the operation
+ */
+u32 tpm2_submit_command(struct udevice *dev, const u8 *sendbuf,
+ u8 *recvbuf, size_t *recv_size);
+
#endif /* __TPM_V2_H */