diff options
Diffstat (limited to 'firmware/include/tss_constants.h')
-rw-r--r-- | firmware/include/tss_constants.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/include/tss_constants.h b/firmware/include/tss_constants.h index e85fa817..1fe92b92 100644 --- a/firmware/include/tss_constants.h +++ b/firmware/include/tss_constants.h @@ -24,6 +24,27 @@ #define TPM_E_STRUCT_SIZE ((uint32_t) 0x0000500b) /* vboot local */ #define TPM_E_STRUCT_VERSION ((uint32_t) 0x0000500c) /* vboot local */ +/* + * AP firmware relies on Tlcl returning these exact TPM1.2 error codes + * regardless of the TPM spec version in certain sitautions. So, TPM2.0 should + * map to these errors when necessary. All TPM2.0-spec-defined errors have + * either 0x100 or 0x80 bit set, so there is no confusion with actual error + * codes returned from a TPM2.0 chip. + */ +#define TPM_E_BADINDEX ((uint32_t) 0x00000002) +#define TPM_E_BAD_ORDINAL ((uint32_t) 0x0000000a) +#define TPM_E_OWNER_SET ((uint32_t) 0x00000014) +#define TPM_E_BADTAG ((uint32_t) 0x0000001e) +#define TPM_E_IOERROR ((uint32_t) 0x0000001f) +#define TPM_E_INVALID_POSTINIT ((uint32_t) 0x00000026) +#define TPM_E_BAD_PRESENCE ((uint32_t) 0x0000002d) +#define TPM_E_AREA_LOCKED ((uint32_t) 0x0000003c) +#define TPM_E_MAXNVWRITES ((uint32_t) 0x00000048) + +#define TPM_E_NON_FATAL 0x800 +#define TPM_E_NEEDS_SELFTEST ((uint32_t) (TPM_E_NON_FATAL + 1)) +#define TPM_E_DOING_SELFTEST ((uint32_t) (TPM_E_NON_FATAL + 2)) + #ifdef TPM2_MODE #include "tpm2_tss_constants.h" #else |