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