diff options
author | Simon Glass <sjg@chromium.org> | 2018-10-01 11:55:18 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-10-09 04:40:27 -0600 |
commit | ef8a25006df35cafbd47a574681901d9b8f23000 (patch) | |
tree | cfcd644de64b32174c30f9a88e8d946acfc3db8d /include/tpm-v1.h | |
parent | 998af319031f9c5ac89228e532a6802455c0f65b (diff) | |
download | u-boot-ef8a25006df35cafbd47a574681901d9b8f23000.tar.gz |
sandbox: tpm: Enhance to support the latest Chromium OS
This driver was originally written against Chromium OS circa 2012. A few
new features have been added. Enhance the TPM driver to match. This mostly
includes a few new messages and properly modelling whether a particular
'space' is present or not.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/tpm-v1.h')
-rw-r--r-- | include/tpm-v1.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/tpm-v1.h b/include/tpm-v1.h index 29788b5390..f9ffbb2656 100644 --- a/include/tpm-v1.h +++ b/include/tpm-v1.h @@ -245,6 +245,40 @@ struct tpm_permanent_flags { u8 disable_full_da_logic_info; } __packed; +#define TPM_SHA1_160_HASH_LEN 0x14 + +struct __packed tpm_composite_hash { + u8 digest[TPM_SHA1_160_HASH_LEN]; +}; + +struct __packed tpm_pcr_selection { + __be16 size_of_select; + u8 pcr_select[3]; /* matches vboot's struct */ +}; + +struct __packed tpm_pcr_info_short { + struct tpm_pcr_selection pcr_selection; + u8 locality_at_release; + struct tpm_composite_hash digest_at_release; +}; + +struct __packed tpm_nv_attributes { + __be16 tag; + __be32 attributes; +}; + +struct __packed tpm_nv_data_public { + __be16 tag; + __be32 nv_index; + struct tpm_pcr_info_short pcr_info_read; + struct tpm_pcr_info_short pcr_info_write; + struct tpm_nv_attributes permission; + u8 read_st_clear; + u8 write_st_clear; + u8 write_define; + __be32 data_size; +}; + /** * Issue a TPM_Startup command. * |