3
TPM error return codes basically extracted from TCPA Main Specification V1.1b
7
#ifndef __TCPA_ERROR_H__
8
#define __TCPA_ERROR_H__
11
//////////////////////////////////////////////////////////////////////
15
#define TCPA_E_BASE 0x00000000L
18
#ifndef TCPA_E_NON_FATAL
19
#define TCPA_E_NON_FATAL 0x00000800L
23
// Successful completion of the TCPA operation.
24
#define TCPA_SUCCESS TCPA_E_BASE
27
// MessageId: TCPA_E_AUTHFAIL
31
// Authentication failed.
33
#define TCPA_E_AUTHFAIL (UINT32)(TCPA_E_BASE + 0x1)
36
// MessageId: TCPA_E_BADINDEX
40
// The index to a PCR, DIR or other register is incorrect.
42
#define TCPA_E_BADINDEX (UINT32)(TCPA_E_BASE + 0x2)
45
// MessageId: TCPA_E_BAD_PARAMETER
49
// One or more TCPA command parameter is bad.
51
#define TCPA_E_BAD_PARAMETER (UINT32)(TCPA_E_BASE + 0x3)
54
// MessageId: TCPA_E_AUDITFAILURE
58
// An operation completed successfully but the auditing of that operation failed.
60
#define TCPA_E_AUDITFAILURE (UINT32)(TCPA_E_BASE + 0x4)
63
// MessageId: TCPA_E_CLEAR_DISABLED
67
// The clear disable flag is set and all clear operations now require physical access.
69
#define TCPA_E_CLEAR_DISABLED (UINT32)(TCPA_E_BASE + 0x5)
72
// MessageId: TCPA_E_DEACTIVATED
76
// The TCPA is deactivated.
78
#define TCPA_E_DEACTIVATED (UINT32)(TCPA_E_BASE + 0x6)
81
// MessageId: TCPA_E_DISABLED
85
// The TCPA is disabled.
87
#define TCPA_E_DISABLED (UINT32)(TCPA_E_BASE + 0x7)
90
// MessageId: TCPA_E_DISABLED_CMD
94
// The target TCPA command has been disabled.
96
#define TCPA_E_DISABLED_CMD (UINT32)(TCPA_E_BASE + 0x8)
99
// MessageId: TCPA_E_FAIL
103
// The TCPA operation failed.
105
#define TCPA_E_FAIL (UINT32)(TCPA_E_BASE + 0x9)
108
// MessageId: TCPA_E_INACTIVE
112
// The TCPA is inactive.
114
#define TCPA_E_INACTIVE (UINT32)(TCPA_E_BASE + 0xA)
117
// MessageId: TCPA_E_INSTALL_DISABLED
121
// The ability to install an owner is disabled.
123
#define TCPA_E_INSTALL_DISABLED (UINT32)(TCPA_E_BASE + 0xB)
126
// MessageId: TCPA_E_INVALID_HANDLE
130
// The TCPA key handle presented was invalid.
132
#define TCPA_E_INVALID_KEYHANDLE (UINT32)(TCPA_E_BASE + 0xC)
135
// MessageId: TCPA_E_KEYNOTFOUND
139
// The target key was not found in the TCPA.
141
#define TCPA_E_KEYNOTFOUND (UINT32)(TCPA_E_BASE + 0xD)
144
// MessageId: TCPA_E_NEED_SELFTEST
148
// The capability requires an untested function,
149
// additional self-test is required before the capability may execute.
151
#define TCPA_E_NEED_SELFTEST (UINT32)(TCPA_E_BASE + 0xE)
154
// MessageId: TCPA_E_MIGRATEFAIL
158
// Migration authorization failed.
160
#define TCPA_E_MIGRATEFAIL (UINT32)(TCPA_E_BASE + 0xF)
163
// MessageId: TCPA_E_NO_PCR_INFO
167
// A list of PCR values was not supplied.
169
#define TCPA_E_NO_PCR_INFO (UINT32)(TCPA_E_BASE + 0x10)
172
// MessageId: TCPA_E_NOSPACE
176
// No room in the TCPA to load a key.
178
#define TCPA_E_NOSPACE (UINT32)(TCPA_E_BASE + 0x11)
181
// MessageId: TCPA_E_NOSRK
185
// There is no SRK set.
187
#define TCPA_E_NOSRK (UINT32)(TCPA_E_BASE + 0x12)
190
// MessageId: TCPA_E_NOTSEALED_BLOB
194
// An encrypted blob is invalid or was not created by this TCPA.
196
#define TCPA_E_NOTSEALED_BLOB (UINT32)(TCPA_E_BASE + 0x13)
199
// MessageId: TCPA_E_OWNER_SET
203
// An Owner is already set in the TCPA.
205
#define TCPA_E_OWNER_SET (UINT32)(TCPA_E_BASE + 0x14)
208
// MessageId: TCPA_E_RESOURCES
212
// The TPM has insufficient internal resources to perform the requested action.
214
#define TCPA_E_RESOURCES (UINT32)(TCPA_E_BASE + 0x15)
217
// MessageId: TCPA_E_SHORTRANDOM
221
// A random string supplied to the TPM was too short.
223
#define TCPA_E_SHORTRANDOM (UINT32)(TCPA_E_BASE + 0x16)
226
// MessageId: TCPA_E_SIZE
230
// The TPM does not have the space to perform the operation.
232
#define TCPA_E_SIZE (UINT32)(TCPA_E_BASE + 0x17)
235
// MessageId: TCPA_E_WRONGPCRVAL
239
// The named PCR value does not match the current PCR value.
241
#define TCPA_E_WRONGPCRVAL (UINT32)(TCPA_E_BASE + 0x18)
244
// MessageId: TCPA_E_BUSY
248
// The TPM is too busy to respond to the command.
250
//#define TCPA_E_BUSY (UINT32)(TCPA_E_BASE + 0x19)
253
// MessageId: TCPA_E_BAD_PARAM_SIZE
257
// The paramSize argument to the command has the incorrect value
259
#define TCPA_E_BAD_PARAM_SIZE (UINT32)(TCPA_E_BASE + 0x19)
262
// MessageId: TCPA_E_SHA_THREAD
266
// There is no existing SHA-1 thread in the TPM.
268
#define TCPA_E_SHA_THREAD (UINT32)(TCPA_E_BASE + 0x1A)
271
// MessageId: TCPA_E_SHA_ERROR
275
// The calculation is unable to proceed because the existing SHA-1
276
// thread has already encountered an error.
278
#define TCPA_E_SHA_ERROR (UINT32)(TCPA_E_BASE + 0x1B)
281
// MessageId: TCPA_E_FAILEDSELFTEST
285
// Self-test has failed and the TPM has shutdown.
287
#define TCPA_E_FAILEDSELFTEST (UINT32)(TCPA_E_BASE + 0x1C)
290
// MessageId: TCPA_E_AUTH2FAIL
294
// The authorization for the second key in a 2 key function failed authorization.
296
#define TCPA_E_AUTH2FAIL (UINT32)(TCPA_E_BASE + 0x1D)
299
// MessageId: TCPA_E_BADTAG
303
// The tag value sent to the TPM for a command is invalid.
305
#define TCPA_E_BADTAG (UINT32)(TCPA_E_BASE + 0x1E)
308
// MessageId: TCPA_E_IOERROR
312
// An IO error occurred transmitting information to the TPM.
314
#define TCPA_E_IOERROR (UINT32)(TCPA_E_BASE + 0x1F)
317
// MessageId: TCPA_E_ENCRYPT_ERROR
321
// The TPM encryption process had a problem.
323
#define TCPA_E_ENCRYPT_ERROR (UINT32)(TCPA_E_BASE + 0x20)
326
// MessageId: TCPA_E_DECRYPT_ERROR
330
// The TPM decryption process did not complete.
332
#define TCPA_E_DECRYPT_ERROR (UINT32)(TCPA_E_BASE + 0x21)
335
// MessageId: TCPA_E_INVALID_AUTHHANDLE
339
// The TPM auth handle was invalid.
341
#define TCPA_E_INVALID_AUTHHANDLE (UINT32)(TCPA_E_BASE + 0x22)
344
// MessageId: TCPA_E_NO_ENDORSEMENT
348
// The TPM does not have an Endorsement Key installed.
350
#define TCPA_E_NO_ENDORSEMENT (UINT32)(TCPA_E_BASE + 0x23)
353
// MessageId: TCPA_E_INVALID_KEYUSAGE
357
// The usage of a key is not allowed.
359
#define TCPA_E_INVALID_KEYUSAGE (UINT32)(TCPA_E_BASE + 0x24)
362
// MessageId: TCPA_E_WRONG_ENTITYTYPE
366
// The submitted entity type is not allowed.
368
#define TCPA_E_WRONG_ENTITYTYPE (UINT32)(TCPA_E_BASE + 0x25)
371
// MessageId: TCPA_INVALID_POSTINIT
375
// The command was received in the wrong sequence relative to TPM_Init and a subsequent TPM_Startup.
377
#define TCPA_E_INVALID_POSTINIT (UINT32)(TCPA_E_BASE + 0x26)
380
// MessageId: TCPA_E_INAPPROPRIATE_SIG
384
// Signed data cannot include additional DER information.
386
#define TCPA_E_INAPPROPRIATE_SIG (UINT32)(TCPA_E_BASE + 0x27)
389
// MessageId: TCPA_E_BAD_KEY_PROPERTY
393
// The key properties in TCPA_KEY_PARMs are not supported by this TPM.
395
#define TCPA_E_BAD_KEY_PROPERTY (UINT32)(TCPA_E_BASE + 0x28)
398
// MessageId: TCPA_E_BAD_MIGRATION
402
// The migration properties of this key are incorrect.
404
#define TCPA_E_BAD_MIGRATION (UINT32)(TCPA_E_BASE + 0x29)
407
// MessageId: TCPA_E_BAD_SCHEME
411
// The signature or encryption scheme for this key is incorrect or not permitted in this situation.
413
#define TCPA_E_BAD_SCHEME (UINT32)(TCPA_E_BASE + 0x2A)
416
// MessageId: TCPA_E_BAD_DATASIZE
420
// The size of the data (or blob) parameter is bad or inconsistent with the referenced key.
422
#define TCPA_E_BAD_DATASIZE (UINT32)(TCPA_E_BASE + 0x2B)
425
// MessageId: TCPA_E_BAD_MODE
429
// A mode parameter is bad, such as capArea or subCapArea for TPM_GetCapability,
430
// phsicalPresence parameter for TPM_PhysicalPresence,
431
// or migrationType for TPM_CreateMigrationBlob.
433
#define TCPA_E_BAD_MODE (UINT32)(TCPA_E_BASE + 0x2C)
436
// MessageId: TCPA_E_BAD_PRESENCE
440
// Either the physicalPresence or physicalPresenceLock bits have the wrong value.
442
#define TCPA_E_BAD_PRESENCE (UINT32)(TCPA_E_BASE + 0x2D)
445
// MessageId: TCPA_E_BAD_VERSION
449
// The TPM cannot perform this version of the capability.
451
#define TCPA_E_BAD_VERSION (UINT32)(TCPA_E_BASE + 0x2E)
454
//////////////////////////////////////////////////////////////////////
458
// MessageId: TCPA_E_RETRY
462
// The TPM is too busy to respond to the command immediately,
463
// but the command could be resubmitted at a later time.
465
#define TCPA_E_RETRY (UINT32)(TCPA_E_BASE + TCPA_E_NON_FATAL)
467
#endif // __TCPA_ERROR_H__