aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/security/tpm/tis.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/security/tpm/tis.h b/src/security/tpm/tis.h
index 5b2c001070..3b65134d27 100644
--- a/src/security/tpm/tis.h
+++ b/src/security/tpm/tis.h
@@ -5,6 +5,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <types.h>
enum tis_access {
TPM_ACCESS_VALID = (1 << 7),
@@ -84,4 +85,31 @@ int tis_sendrecv(const u8 *sendbuf, size_t send_size, u8 *recvbuf,
*/
int tis_plat_irq_status(void);
+/*
+ * tis_vendor_write()
+ *
+ * Vendor-specific function to send the requested data to the TPM.
+ *
+ * @addr - address of the register to write to
+ * @sendbuf - buffer of the data to send
+ * @send_size - size of the data to send
+ *
+ * Returns CB_SUCCESS 0 on success, CB_ERR on failure.
+ */
+cb_err_t tis_vendor_write(unsigned int addr, const void *sendbuf, size_t send_size);
+
+/*
+ * tis_vendor_read()
+ *
+ * Vendor-specific function to read the requested data from the TPM.
+ *
+ * @addr - address of the register to read from
+ * @recvbuf - buffer of the data to read
+ * @recv_size - size of the output buffer
+ *
+ * Returns CB_SUCCESS on success or -1 on failure.
+ */
+cb_err_t tis_vendor_read(unsigned int addr, void *recvbuf, size_t recv_size);
+
+
#endif /* TIS_H_ */