summaryrefslogtreecommitdiff
path: root/include/tpm_registers.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tpm_registers.h')
-rw-r--r--include/tpm_registers.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/tpm_registers.h b/include/tpm_registers.h
index 2bdd87bc25..ea8011bfed 100644
--- a/include/tpm_registers.h
+++ b/include/tpm_registers.h
@@ -14,6 +14,8 @@
#include <stdint.h>
+#include "common.h"
+
/* The SPI master is writing data into a TPM register. */
void tpm_register_put(uint32_t regaddr,
const uint8_t *data, uint32_t data_size);
@@ -24,4 +26,17 @@ void tpm_register_get(uint32_t regaddr, uint8_t *dest, uint32_t data_size);
/* Enable SPS TPM driver. */
void sps_tpm_enable(void);
+/*
+ * This structure describes the header of all commands and responses sent and
+ * received over TPM FIFO.
+ *
+ * Note that all fields are stored in the network (big endian) byte order.
+ */
+
+struct tpm_cmd_header {
+ uint16_t tag;
+ uint32_t size;
+ uint32_t command_code;
+} __packed;
+
#endif /* __CROS_EC_TPM_REGISTERS_H */