diff options
| author | Simon Glass <[email protected]> | 2021-02-06 14:23:41 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-03-02 15:53:37 -0500 |
| commit | 7785bc1d5f94d28497bef6935ecbaa1b0ddd3e26 (patch) | |
| tree | 27f83962679608c05adcb0ee964b6bf6f28c6177 /include | |
| parent | 6719cbe31afef2cba4bc10b33350b38c4a51c3ac (diff) | |
tpm: Add TPM2 support for write_lock
Implement this API function for TPM2.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/tpm-v2.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h index b73a2d278e7..fa3296a7b0e 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 */ |
