Kyösti Mälkki | 0490f74 | 2015-02-04 15:55:06 +0200 | [diff] [blame] | 1 | /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 | * Use of this source code is governed by a BSD-style license that can be |
| 3 | * found in the LICENSE file. |
| 4 | */ |
| 5 | |
| 6 | /* TPM error codes. |
| 7 | * |
| 8 | * Copy-pasted and lightly edited from TCG TPM Main Part 2 TPM Structures |
| 9 | * Version 1.2 Level 2 Revision 103 26 October 2006 Draft. |
| 10 | */ |
| 11 | |
| 12 | #ifndef TPM_ERROR_MESSAGES_H |
| 13 | #define TPM_ERROR_MESSAGES_H |
| 14 | |
| 15 | #define TPM_E_BASE 0x0 |
| 16 | #define TPM_E_NON_FATAL 0x800 |
| 17 | |
| 18 | typedef struct tpm_error_info { |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 19 | const char *name; |
| 20 | uint32_t code; |
| 21 | const char *description; |
Kyösti Mälkki | 0490f74 | 2015-02-04 15:55:06 +0200 | [diff] [blame] | 22 | } tpm_error_info; |
| 23 | |
| 24 | tpm_error_info tpm_error_table[] = { |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 25 | {"TPM_AUTHFAIL", TPM_E_BASE + 1, |
| 26 | "Authentication failed"}, |
| 27 | {"TPM_BADINDEX", TPM_E_BASE + 2, |
| 28 | "The index to a PCR, DIR or other register is incorrect"}, |
| 29 | {"TPM_BAD_PARAMETER", TPM_E_BASE + 3, |
| 30 | "One or more parameter is bad"}, |
| 31 | {"TPM_AUDITFAILURE", TPM_E_BASE + 4, |
| 32 | "An operation completed successfully\n\ |
| 33 | but the auditing of that operation failed"}, |
| 34 | {"TPM_CLEAR_DISABLED", TPM_E_BASE + 5, |
| 35 | "The clear disable flag is set and all clear operations now require\n\ |
| 36 | physical access"}, |
| 37 | {"TPM_DEACTIVATED", TPM_E_BASE + 6, |
| 38 | "The TPM is deactivated"}, |
| 39 | {"TPM_DISABLED", TPM_E_BASE + 7, |
| 40 | "The TPM is disabled"}, |
| 41 | {"TPM_DISABLED_CMD", TPM_E_BASE + 8, |
| 42 | "The target command has been disabled"}, |
| 43 | {"TPM_FAIL", TPM_E_BASE + 9, |
| 44 | "The operation failed"}, |
| 45 | {"TPM_BAD_ORDINAL", TPM_E_BASE + 10, |
| 46 | "The ordinal was unknown or inconsistent"}, |
| 47 | {"TPM_INSTALL_DISABLED", TPM_E_BASE + 11, |
| 48 | "The ability to install an owner is disabled"}, |
| 49 | {"TPM_INVALID_KEYHANDLE", TPM_E_BASE + 12, |
| 50 | "The key handle can not be interpreted"}, |
| 51 | {"TPM_KEYNOTFOUND", TPM_E_BASE + 13, |
| 52 | "The key handle points to an invalid key"}, |
| 53 | {"TPM_INAPPROPRIATE_ENC", TPM_E_BASE + 14, |
| 54 | "Unacceptable encryption scheme"}, |
| 55 | {"TPM_MIGRATEFAIL", TPM_E_BASE + 15, |
| 56 | "Migration authorization failed"}, |
| 57 | {"TPM_INVALID_PCR_INFO", TPM_E_BASE + 16, |
| 58 | "PCR information could not be interpreted"}, |
| 59 | {"TPM_NOSPACE", TPM_E_BASE + 17, |
| 60 | "No room to load key"}, |
| 61 | {"TPM_NOSRK", TPM_E_BASE + 18, |
| 62 | "There is no SRK set"}, |
| 63 | {"TPM_NOTSEALED_BLOB", TPM_E_BASE + 19, |
| 64 | "An encrypted blob is invalid or was not created by this TPM"}, |
| 65 | {"TPM_OWNER_SET", TPM_E_BASE + 20, |
| 66 | "There is already an Owner"}, |
| 67 | {"TPM_RESOURCES", TPM_E_BASE + 21, |
Lee Leahy | 7340217 | 2017-03-10 15:23:24 -0800 | [diff] [blame] | 68 | "The TPM has insufficient internal resources to perform the requested \ |
| 69 | action"}, |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 70 | {"TPM_SHORTRANDOM", TPM_E_BASE + 22, |
| 71 | "A random string was too short"}, |
| 72 | {"TPM_SIZE", TPM_E_BASE + 23, |
| 73 | "The TPM does not have the space to perform the operation"}, |
| 74 | {"TPM_WRONGPCRVAL", TPM_E_BASE + 24, |
| 75 | "The named PCR value does not match the current PCR value"}, |
| 76 | {"TPM_BAD_PARAM_SIZE", TPM_E_BASE + 25, |
| 77 | "The paramSize argument to the command has the incorrect value"}, |
| 78 | {"TPM_SHA_THREAD", TPM_E_BASE + 26, |
| 79 | "There is no existing SHA-1 thread"}, |
| 80 | {"TPM_SHA_ERROR", TPM_E_BASE + 27, |
| 81 | "The calculation is unable to proceed because the existing SHA-1\n\ |
| 82 | thread has already encountered an error"}, |
| 83 | {"TPM_FAILEDSELFTEST", TPM_E_BASE + 28, |
| 84 | "Self-test has failed and the TPM has shutdown"}, |
| 85 | {"TPM_AUTH2FAIL", TPM_E_BASE + 29, |
| 86 | "The authorization for the second key in a 2 key function\n\ |
| 87 | failed authorization"}, |
| 88 | {"TPM_BADTAG", TPM_E_BASE + 30, |
| 89 | "The tag value sent to for a command is invalid"}, |
| 90 | {"TPM_IOERROR", TPM_E_BASE + 31, |
| 91 | "An IO error occurred transmitting information to the TPM"}, |
| 92 | {"TPM_ENCRYPT_ERROR", TPM_E_BASE + 32, |
| 93 | "The encryption process had a problem"}, |
| 94 | {"TPM_DECRYPT_ERROR", TPM_E_BASE + 33, |
| 95 | "The decryption process did not complete"}, |
| 96 | {"TPM_INVALID_AUTHHANDLE", TPM_E_BASE + 34, |
| 97 | "An invalid handle was used"}, |
| 98 | {"TPM_NO_ENDORSEMENT", TPM_E_BASE + 35, |
| 99 | "The TPM does not a EK installed"}, |
| 100 | {"TPM_INVALID_KEYUSAGE", TPM_E_BASE + 36, |
| 101 | "The usage of a key is not allowed"}, |
| 102 | {"TPM_WRONG_ENTITYTYPE", TPM_E_BASE + 37, |
| 103 | "The submitted entity type is not allowed"}, |
| 104 | {"TPM_INVALID_POSTINIT", TPM_E_BASE + 38, |
| 105 | "The command was received in the wrong sequence relative to TPM_Init\n\ |
| 106 | and a subsequent TPM_Startup"}, |
| 107 | {"TPM_INAPPROPRIATE_SIG", TPM_E_BASE + 39, |
| 108 | "Signed data cannot include additional DER information"}, |
| 109 | {"TPM_BAD_KEY_PROPERTY", TPM_E_BASE + 40, |
| 110 | "The key properties in TPM_KEY_PARMs are not supported by this TPM"}, |
| 111 | {"TPM_BAD_MIGRATION", TPM_E_BASE + 41, |
| 112 | "The migration properties of this key are incorrect"}, |
| 113 | {"TPM_BAD_SCHEME", TPM_E_BASE + 42, |
| 114 | "The signature or encryption scheme for this key is incorrect or not\n\ |
| 115 | permitted in this situation"}, |
| 116 | {"TPM_BAD_DATASIZE", TPM_E_BASE + 43, |
| 117 | "The size of the data (or blob) parameter is bad or inconsistent\n\ |
| 118 | with the referenced key"}, |
| 119 | {"TPM_BAD_MODE", TPM_E_BASE + 44, |
| 120 | "A mode parameter is bad, such as capArea or subCapArea for\n\ |
Kyösti Mälkki | 0490f74 | 2015-02-04 15:55:06 +0200 | [diff] [blame] | 121 | TPM_GetCapability, physicalPresence parameter for TPM_PhysicalPresence,\n\ |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 122 | or migrationType for, TPM_CreateMigrationBlob"}, |
| 123 | {"TPM_BAD_PRESENCE", TPM_E_BASE + 45, |
| 124 | "Either the physicalPresence or physicalPresenceLock bits\n\ |
| 125 | have the wrong value"}, |
| 126 | {"TPM_BAD_VERSION", TPM_E_BASE + 46, |
| 127 | "The TPM cannot perform this version of the capability"}, |
| 128 | {"TPM_NO_WRAP_TRANSPORT", TPM_E_BASE + 47, |
| 129 | "The TPM does not allow for wrapped transport sessions"}, |
| 130 | {"TPM_AUDITFAIL_UNSUCCESSFUL", TPM_E_BASE + 48, |
| 131 | "TPM audit construction failed and the underlying command\n\ |
| 132 | was returning a failure code also"}, |
| 133 | {"TPM_AUDITFAIL_SUCCESSFUL", TPM_E_BASE + 49, |
| 134 | "TPM audit construction failed and the underlying command\n\ |
| 135 | was returning success"}, |
| 136 | {"TPM_NOTRESETABLE", TPM_E_BASE + 50, |
Lee Leahy | 7340217 | 2017-03-10 15:23:24 -0800 | [diff] [blame] | 137 | "Attempt to reset a PCR register that does not have the resettable \ |
| 138 | attribute"}, |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 139 | {"TPM_NOTLOCAL", TPM_E_BASE + 51, |
| 140 | "Attempt to reset a PCR register that requires locality\n\ |
| 141 | and locality modifier not part of command transport"}, |
| 142 | {"TPM_BAD_TYPE", TPM_E_BASE + 52, |
| 143 | "Make identity blob not properly typed"}, |
| 144 | {"TPM_INVALID_RESOURCE", TPM_E_BASE + 53, |
Lee Leahy | 7340217 | 2017-03-10 15:23:24 -0800 | [diff] [blame] | 145 | "When saving context identified resource type does not match actual \ |
| 146 | resource"}, |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 147 | {"TPM_NOTFIPS", TPM_E_BASE + 54, |
Lee Leahy | 7340217 | 2017-03-10 15:23:24 -0800 | [diff] [blame] | 148 | "The TPM is attempting to execute a command only available when in \ |
| 149 | FIPS mode"}, |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 150 | {"TPM_INVALID_FAMILY", TPM_E_BASE + 55, |
| 151 | "The command is attempting to use an invalid family ID"}, |
| 152 | {"TPM_NO_NV_PERMISSION", TPM_E_BASE + 56, |
| 153 | "The permission to manipulate the NV storage is not available"}, |
| 154 | {"TPM_REQUIRES_SIGN", TPM_E_BASE + 57, |
| 155 | "The operation requires a signed command"}, |
| 156 | {"TPM_KEY_NOTSUPPORTED", TPM_E_BASE + 58, |
| 157 | "Wrong operation to load an NV key"}, |
| 158 | {"TPM_AUTH_CONFLICT", TPM_E_BASE + 59, |
| 159 | "NV_LoadKey blob requires both owner and blob authorization"}, |
| 160 | {"TPM_AREA_LOCKED", TPM_E_BASE + 60, |
| 161 | "The NV area is locked and not writable"}, |
| 162 | {"TPM_BAD_LOCALITY", TPM_E_BASE + 61, |
| 163 | "The locality is incorrect for the attempted operation"}, |
| 164 | {"TPM_READ_ONLY", TPM_E_BASE + 62, |
| 165 | "The NV area is read only and can't be written to"}, |
| 166 | {"TPM_PER_NOWRITE", TPM_E_BASE + 63, |
| 167 | "There is no protection on the write to the NV area"}, |
| 168 | {"TPM_FAMILYCOUNT", TPM_E_BASE + 64, |
| 169 | "The family count value does not match"}, |
| 170 | {"TPM_WRITE_LOCKED", TPM_E_BASE + 65, |
| 171 | "The NV area has already been written to"}, |
| 172 | {"TPM_BAD_ATTRIBUTES", TPM_E_BASE + 66, |
| 173 | "The NV area attributes conflict"}, |
| 174 | {"TPM_INVALID_STRUCTURE", TPM_E_BASE + 67, |
| 175 | "The structure tag and version are invalid or inconsistent"}, |
| 176 | {"TPM_KEY_OWNER_CONTROL", TPM_E_BASE + 68, |
| 177 | "The key is under control of the TPM Owner and can only be evicted\n\ |
| 178 | by the TPM Owner"}, |
| 179 | {"TPM_BAD_COUNTER", TPM_E_BASE + 69, |
| 180 | "The counter handle is incorrect"}, |
| 181 | {"TPM_NOT_FULLWRITE", TPM_E_BASE + 70, |
| 182 | "The write is not a complete write of the area"}, |
| 183 | {"TPM_CONTEXT_GAP", TPM_E_BASE + 71, |
| 184 | "The gap between saved context counts is too large"}, |
| 185 | {"TPM_MAXNVWRITES", TPM_E_BASE + 72, |
| 186 | "The maximum number of NV writes without an owner has been exceeded"}, |
| 187 | {"TPM_NOOPERATOR", TPM_E_BASE + 73, |
| 188 | "No operator AuthData value is set"}, |
| 189 | {"TPM_RESOURCEMISSING", TPM_E_BASE + 74, |
| 190 | "The resource pointed to by context is not loaded"}, |
| 191 | {"TPM_DELEGATE_LOCK", TPM_E_BASE + 75, |
| 192 | "The delegate administration is locked"}, |
| 193 | {"TPM_DELEGATE_FAMILY", TPM_E_BASE + 76, |
| 194 | "Attempt to manage a family other then the delegated family"}, |
| 195 | {"TPM_DELEGATE_ADMIN", TPM_E_BASE + 77, |
| 196 | "Delegation table management not enabled"}, |
| 197 | {"TPM_TRANSPORT_NOTEXCLUSIVE", TPM_E_BASE + 78, |
Lee Leahy | 7340217 | 2017-03-10 15:23:24 -0800 | [diff] [blame] | 198 | "There was a command executed outside of an exclusive transport \ |
| 199 | session"}, |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 200 | {"TPM_OWNER_CONTROL", TPM_E_BASE + 79, |
| 201 | "Attempt to context save a owner evict controlled key"}, |
| 202 | {"TPM_DAA_RESOURCES", TPM_E_BASE + 80, |
| 203 | "The DAA command has no resources available to execute the command"}, |
| 204 | {"TPM_DAA_INPUT_DATA0", TPM_E_BASE + 81, |
| 205 | "The consistency check on DAA parameter inputData0 has failed"}, |
| 206 | {"TPM_DAA_INPUT_DATA1", TPM_E_BASE + 82, |
| 207 | "The consistency check on DAA parameter inputData1 has failed"}, |
| 208 | {"TPM_DAA_ISSUER_SETTINGS", TPM_E_BASE + 83, |
| 209 | "The consistency check on DAA_issuerSettings has failed"}, |
| 210 | {"TPM_DAA_TPM_SETTINGS", TPM_E_BASE + 84, |
| 211 | "The consistency check on DAA_tpmSpecific has failed"}, |
| 212 | {"TPM_DAA_STAGE", TPM_E_BASE + 85, |
| 213 | "The atomic process indicated by the submitted DAA command is not\n\ |
| 214 | the expected process"}, |
| 215 | {"TPM_DAA_ISSUER_VALIDITY", TPM_E_BASE + 86, |
| 216 | "The issuer's validity check has detected an inconsistency"}, |
| 217 | {"TPM_DAA_WRONG_W", TPM_E_BASE + 87, |
| 218 | "The consistency check on w has failed"}, |
| 219 | {"TPM_BAD_HANDLE", TPM_E_BASE + 88, |
| 220 | "The handle is incorrect"}, |
| 221 | {"TPM_BAD_DELEGATE", TPM_E_BASE + 89, |
| 222 | "Delegation is not correct"}, |
| 223 | {"TPM_BADCONTEXT", TPM_E_BASE + 90, |
| 224 | "The context blob is invalid"}, |
| 225 | {"TPM_TOOMANYCONTEXTS", TPM_E_BASE + 91, |
| 226 | "Too many contexts held by the TPM"}, |
| 227 | {"TPM_MA_TICKET_SIGNATURE", TPM_E_BASE + 92, |
| 228 | "Migration authority signature validation failure"}, |
| 229 | {"TPM_MA_DESTINATION", TPM_E_BASE + 93, |
| 230 | "Migration destination not authenticated"}, |
| 231 | {"TPM_MA_SOURCE", TPM_E_BASE + 94, |
| 232 | "Migration source incorrect"}, |
| 233 | {"TPM_MA_AUTHORITY", TPM_E_BASE + 95, |
| 234 | "Incorrect migration authority"}, |
| 235 | {"TPM_PERMANENTEK", TPM_E_BASE + 97, |
| 236 | "Attempt to revoke the EK and the EK is not revocable"}, |
| 237 | {"TPM_BAD_SIGNATURE", TPM_E_BASE + 98, |
| 238 | "Bad signature of CMK ticket"}, |
| 239 | {"TPM_NOCONTEXTSPACE", TPM_E_BASE + 99, |
| 240 | "There is no room in the context list for additional contexts"}, |
| 241 | {"TPM_RETRY", TPM_E_BASE + TPM_E_NON_FATAL, |
| 242 | "The TPM is too busy to respond to the command immediately, but\n\ |
Kyösti Mälkki | 0490f74 | 2015-02-04 15:55:06 +0200 | [diff] [blame] | 243 | the command could be resubmitted at a later time. The TPM MAY\n\ |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 244 | return TPM_RETRY for any command at any time"}, |
| 245 | {"TPM_NEEDS_SELFTEST", TPM_E_BASE + TPM_E_NON_FATAL + 1, |
| 246 | "TPM_ContinueSelfTest has not been run"}, |
| 247 | {"TPM_DOING_SELFTEST", TPM_E_BASE + TPM_E_NON_FATAL + 2, |
| 248 | "The TPM is currently executing the actions of TPM_ContinueSelfTest\n\ |
| 249 | because the ordinal required resources that have not been tested"}, |
| 250 | {"TPM_DEFEND_LOCK_RUNNING", TPM_E_BASE + TPM_E_NON_FATAL + 3, |
| 251 | "The TPM is defending against dictionary attacks and is in some\n\ |
| 252 | time-out period"}, |
| 253 | }; |
Kyösti Mälkki | 0490f74 | 2015-02-04 15:55:06 +0200 | [diff] [blame] | 254 | |
Stefan Reinauer | cbc0416 | 2016-08-01 12:20:40 -0700 | [diff] [blame] | 255 | #endif /* TPM_ERROR_MESSAGES_H */ |