aboutsummaryrefslogtreecommitdiff
path: root/drivers/tpm/sandbox_common.h
diff options
context:
space:
mode:
authorSimon Glass2021-07-18 14:17:59 -0600
committerSimon Glass2021-08-01 09:05:24 -0600
commitf9143c12003aabbad3a2485f8ad305f5dff5fae9 (patch)
tree022b47f8b13fe5bb488a3a853ed68850db5a038b /drivers/tpm/sandbox_common.h
parent1db235a186c001a50e5f5db9b587bbaa4e397ee7 (diff)
sandbox: tpm: Support the define-space command
Add support for this command, moving away from the previous approach of hard-coding the initial data in the driver, now that the kernel-space data has to be set up by the higher-level vboot code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/tpm/sandbox_common.h')
-rw-r--r--drivers/tpm/sandbox_common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/tpm/sandbox_common.h b/drivers/tpm/sandbox_common.h
index aa5292d7945..e822a200fd3 100644
--- a/drivers/tpm/sandbox_common.h
+++ b/drivers/tpm/sandbox_common.h
@@ -93,4 +93,16 @@ void sb_tpm_write_data(struct nvdata_state nvdata[NV_SEQ_COUNT],
enum sandbox_nv_space seq, const u8 *buf, int data_ofs,
int length);
+/**
+ * sb_tpm_define_data() - Set up non-volatile data
+ *
+ * If @length is too large, an error is logged and nothing is written.
+ *
+ * @nvdata: Current nvdata state
+ * @seq: Sequence number to set up
+ * @length: Length of space in bytes
+ */
+void sb_tpm_define_data(struct nvdata_state nvdata[NV_SEQ_COUNT],
+ enum sandbox_nv_space seq, int length);
+
#endif