diff options
author | Simon Glass <sjg@chromium.org> | 2018-11-23 21:29:34 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-12-05 06:01:34 -0700 |
commit | be8a025ed750edde0207ea7d75a73cb12313d288 (patch) | |
tree | 86f59329a083b07738a5639c1c747ef4b71afcd5 /include/tpm-v2.h | |
parent | 5e69b8bc049cbc357c3d13a6e83e43161642de57 (diff) | |
download | u-boot-be8a025ed750edde0207ea7d75a73cb12313d288.tar.gz |
tpm: Add non-volatile index attributes needed for v2
Version-2 TPMs support attributes for nvdata. Add definitions to the
header file so that clients can use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/tpm-v2.h')
-rw-r--r-- | include/tpm-v2.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 2f2e66de19..ae00803f6d 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -128,6 +128,39 @@ enum tpm2_algorithms { TPM2_ALG_NULL = 0x10, }; +/* NV index attributes */ +enum tpm_index_attrs { + TPMA_NV_PPWRITE = 1UL << 0, + TPMA_NV_OWNERWRITE = 1UL << 1, + TPMA_NV_AUTHWRITE = 1UL << 2, + TPMA_NV_POLICYWRITE = 1UL << 3, + TPMA_NV_COUNTER = 1UL << 4, + TPMA_NV_BITS = 1UL << 5, + TPMA_NV_EXTEND = 1UL << 6, + TPMA_NV_POLICY_DELETE = 1UL << 10, + TPMA_NV_WRITELOCKED = 1UL << 11, + TPMA_NV_WRITEALL = 1UL << 12, + TPMA_NV_WRITEDEFINE = 1UL << 13, + TPMA_NV_WRITE_STCLEAR = 1UL << 14, + TPMA_NV_GLOBALLOCK = 1UL << 15, + TPMA_NV_PPREAD = 1UL << 16, + TPMA_NV_OWNERREAD = 1UL << 17, + TPMA_NV_AUTHREAD = 1UL << 18, + TPMA_NV_POLICYREAD = 1UL << 19, + TPMA_NV_NO_DA = 1UL << 25, + TPMA_NV_ORDERLY = 1UL << 26, + TPMA_NV_CLEAR_STCLEAR = 1UL << 27, + TPMA_NV_READLOCKED = 1UL << 28, + TPMA_NV_WRITTEN = 1UL << 29, + TPMA_NV_PLATFORMCREATE = 1UL << 30, + TPMA_NV_READ_STCLEAR = 1UL << 31, + + TPMA_NV_MASK_READ = TPMA_NV_PPREAD | TPMA_NV_OWNERREAD | + TPMA_NV_AUTHREAD | TPMA_NV_POLICYREAD, + TPMA_NV_MASK_WRITE = TPMA_NV_PPWRITE | TPMA_NV_OWNERWRITE | + TPMA_NV_AUTHWRITE | TPMA_NV_POLICYWRITE, +}; + /** * Issue a TPM2_Startup command. * |