diff options
author | Simon Glass | 2018-10-01 11:55:17 -0600 |
---|---|---|
committer | Simon Glass | 2018-10-09 04:40:27 -0600 |
commit | 998af319031f9c5ac89228e532a6802455c0f65b (patch) | |
tree | c2a349ec36400d673c753f71a6d40e6f2d4b4ace /include/tpm-v1.h | |
parent | 114b60a7e62db25bcf26d5dddcfabecbc0160086 (diff) |
sandbox: tpm: Tidy up enums and return values
Use an enum for command values instead of open-coding them. This removes
the need for comments. Also make sure the driver returns proper error
numbers instead of -1.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/tpm-v1.h')
-rw-r--r-- | include/tpm-v1.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/tpm-v1.h b/include/tpm-v1.h index 6b4941ef9a2..29788b5390f 100644 --- a/include/tpm-v1.h +++ b/include/tpm-v1.h @@ -81,6 +81,12 @@ enum tpm_capability_areas { TPM_CAP_VERSION_VAL = 0x0000001A, }; +enum tmp_cap_flag { + TPM_CAP_FLAG_PERMANENT = 0x108, +}; + +#define TPM_TAG_PERMANENT_FLAGS 0x001f + #define TPM_NV_PER_GLOBALLOCK BIT(15) #define TPM_NV_PER_PPREAD BIT(16) #define TPM_NV_PER_PPWRITE BIT(0) @@ -93,6 +99,14 @@ enum { TPM_PUBEK_SIZE = 256, }; +enum { + TPM_CMD_EXTEND = 0x14, + TPM_CMD_GET_CAPABILITY = 0x65, + TPM_CMD_NV_DEFINE_SPACE = 0xcc, + TPM_CMD_NV_WRITE_VALUE = 0xcd, + TPM_CMD_NV_READ_VALUE = 0xcf, +}; + /** * TPM return codes as defined in the TCG Main specification * (TPM Main Part 2 Structures; Specification version 1.2) |