Jacob Garber | fa8f567 | 2020-05-18 13:18:19 -0600 | [diff] [blame] | 1 | /* SPDX-License-Identifier: BSD-3-Clause */ |
Philipp Deppenwiese | c07f8fb | 2018-02-27 19:40:52 +0100 | [diff] [blame] | 2 | |
Jacob Garber | fa8f567 | 2020-05-18 13:18:19 -0600 | [diff] [blame] | 3 | /* |
| 4 | * TPM error codes. |
Philipp Deppenwiese | c07f8fb | 2018-02-27 19:40:52 +0100 | [diff] [blame] | 5 | * |
| 6 | * Copy-pasted and lightly edited from TCG TPM Main Part 2 TPM Structures |
| 7 | * Version 1.2 Level 2 Revision 103 26 October 2006 Draft. |
| 8 | */ |
| 9 | |
| 10 | #ifndef TSS_ERRORS_H_ |
| 11 | #define TSS_ERRORS_H_ |
| 12 | |
Elyes HAOUAS | c4e4193 | 2018-11-01 11:29:50 +0100 | [diff] [blame] | 13 | #include <stdint.h> |
| 14 | |
Philipp Deppenwiese | c07f8fb | 2018-02-27 19:40:52 +0100 | [diff] [blame] | 15 | #define TPM_E_BASE 0x0 |
| 16 | #define TPM_E_NON_FATAL 0x800 |
| 17 | |
| 18 | #define TPM_E_AREA_LOCKED ((uint32_t)0x0000003c) |
| 19 | #define TPM_E_BADINDEX ((uint32_t)0x00000002) |
| 20 | #define TPM_E_BAD_PRESENCE ((uint32_t)0x0000002d) |
| 21 | #define TPM_E_IOERROR ((uint32_t)0x0000001f) |
| 22 | #define TPM_E_INVALID_POSTINIT ((uint32_t)0x00000026) |
| 23 | #define TPM_E_MAXNVWRITES ((uint32_t)0x00000048) |
| 24 | #define TPM_E_OWNER_SET ((uint32_t)0x00000014) |
| 25 | |
| 26 | #define TPM_E_NEEDS_SELFTEST ((uint32_t)(TPM_E_NON_FATAL + 1)) |
| 27 | #define TPM_E_DOING_SELFTEST ((uint32_t)(TPM_E_NON_FATAL + 2)) |
| 28 | |
| 29 | #define TPM_E_ALREADY_INITIALIZED ((uint32_t)0x00005000) /* vboot local */ |
| 30 | #define TPM_E_INTERNAL_INCONSISTENCY ((uint32_t)0x00005001) /* vboot local */ |
| 31 | #define TPM_E_MUST_REBOOT ((uint32_t)0x00005002) /* vboot local */ |
| 32 | #define TPM_E_CORRUPTED_STATE ((uint32_t)0x00005003) /* vboot local */ |
| 33 | #define TPM_E_COMMUNICATION_ERROR ((uint32_t)0x00005004) /* vboot local */ |
| 34 | #define TPM_E_RESPONSE_TOO_LARGE ((uint32_t)0x00005005) /* vboot local */ |
| 35 | #define TPM_E_NO_DEVICE ((uint32_t)0x00005006) /* vboot local */ |
| 36 | #define TPM_E_INPUT_TOO_SMALL ((uint32_t)0x00005007) /* vboot local */ |
| 37 | #define TPM_E_WRITE_FAILURE ((uint32_t)0x00005008) /* vboot local */ |
| 38 | #define TPM_E_READ_EMPTY ((uint32_t)0x00005009) /* vboot local */ |
| 39 | #define TPM_E_READ_FAILURE ((uint32_t)0x0000500a) /* vboot local */ |
| 40 | #define TPM_E_NV_DEFINED ((uint32_t)0x0000500b) /* vboot local */ |
Werner Zeh | 30cf14f | 2018-10-23 07:40:08 +0200 | [diff] [blame] | 41 | #define TPM_E_INVALID_ARG ((uint32_t)0x0000500c) |
| 42 | #define TPM_E_HASH_ERROR ((uint32_t)0x0000500d) |
Keith Short | e0f3400 | 2019-02-05 16:15:10 -0700 | [diff] [blame] | 43 | #define TPM_E_NO_SUCH_COMMAND ((uint32_t)0x0000500e) |
Karthikeyan Ramasubramanian | 2e445ad | 2021-11-10 17:43:45 -0700 | [diff] [blame] | 44 | #define TPM_E_RANGE ((uint32_t)0x0000500f) |
Philipp Deppenwiese | c07f8fb | 2018-02-27 19:40:52 +0100 | [diff] [blame] | 45 | |
| 46 | #endif /* TSS_ERRORS_H_ */ |