summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/tpm_registers.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/tpm_registers.h b/include/tpm_registers.h
index ed26591791..38cb68ef9e 100644
--- a/include/tpm_registers.h
+++ b/include/tpm_registers.h
@@ -65,6 +65,26 @@ struct tpm_cmd_header {
} __packed;
/*
+ * This function allows to process a TPM command coming from elsewhere, not
+ * from the communications interface.
+ *
+ * A common use case would be making cryptographic calculation on task
+ * contexts where stack the size is not large enough, for instance console
+ * commands. This function will block to let the TPM task a chance to run to
+ * execute the command and return the result in the same buffer.
+ *
+ * @param tpmh pointer to a buffer containing a marshalled TPM command, if it
+ * arrived over the communications channel. One of the header
+ * fields defines the command size.
+ *
+ * @param buffer_size the size of the buffer pointed to by tpmh - tells the
+ * TPM task how much room there is to store the response.
+ *
+ * Command execution result is reported in the response body.
+ */
+void tpm_alt_extension(struct tpm_cmd_header *tpmh, size_t buffer_size);
+
+/*
* The only TPM2 command we care about on the driver level, see
* crosbug.com/p/55667 for detals.
*/