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