summaryrefslogtreecommitdiff
path: root/include/tpm-v2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tpm-v2.h')
-rw-r--r--include/tpm-v2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index b73a2d278e..fa3296a7b0 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -243,6 +243,7 @@ enum tpm2_command_codes {
TPM2_CC_NV_DEFINE_SPACE = 0x012a,
TPM2_CC_PCR_SETAUTHPOL = 0x012C,
TPM2_CC_NV_WRITE = 0x0137,
+ TPM2_CC_NV_WRITELOCK = 0x0138,
TPM2_CC_DAM_RESET = 0x0139,
TPM2_CC_DAM_PARAMETERS = 0x013A,
TPM2_CC_NV_READ = 0x014E,
@@ -572,4 +573,15 @@ u32 tpm2_pcr_setauthvalue(struct udevice *dev, const char *pw,
*/
u32 tpm2_get_random(struct udevice *dev, void *data, u32 count);
+/**
+ * Lock data in the TPM
+ *
+ * Once locked the data cannot be written until after a reboot
+ *
+ * @dev TPM device
+ * @index Index of data to lock
+ * @return code of the operation
+ */
+u32 tpm2_write_lock(struct udevice *dev, u32 index);
+
#endif /* __TPM_V2_H */