1 // Copyright 2015 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 // THIS CODE IS GENERATED - DO NOT MODIFY! 6 7 #include "GetCommandCodeString_fp.h" 8 9 const char* GetCommandCodeString(TPM_CC command_code) { 10 switch (command_code) { 11 #ifdef TPM_CC_ActivateCredential 12 case TPM_CC_ActivateCredential: 13 return "ActivateCredential"; 14 #endif 15 #ifdef TPM_CC_Certify 16 case TPM_CC_Certify: 17 return "Certify"; 18 #endif 19 #ifdef TPM_CC_CertifyCreation 20 case TPM_CC_CertifyCreation: 21 return "CertifyCreation"; 22 #endif 23 #ifdef TPM_CC_ChangeEPS 24 case TPM_CC_ChangeEPS: 25 return "ChangeEPS"; 26 #endif 27 #ifdef TPM_CC_ChangePPS 28 case TPM_CC_ChangePPS: 29 return "ChangePPS"; 30 #endif 31 #ifdef TPM_CC_Clear 32 case TPM_CC_Clear: 33 return "Clear"; 34 #endif 35 #ifdef TPM_CC_ClearControl 36 case TPM_CC_ClearControl: 37 return "ClearControl"; 38 #endif 39 #ifdef TPM_CC_ClockRateAdjust 40 case TPM_CC_ClockRateAdjust: 41 return "ClockRateAdjust"; 42 #endif 43 #ifdef TPM_CC_ClockSet 44 case TPM_CC_ClockSet: 45 return "ClockSet"; 46 #endif 47 #ifdef TPM_CC_Commit 48 case TPM_CC_Commit: 49 return "Commit"; 50 #endif 51 #ifdef TPM_CC_ContextLoad 52 case TPM_CC_ContextLoad: 53 return "ContextLoad"; 54 #endif 55 #ifdef TPM_CC_ContextSave 56 case TPM_CC_ContextSave: 57 return "ContextSave"; 58 #endif 59 #ifdef TPM_CC_Create 60 case TPM_CC_Create: 61 return "Create"; 62 #endif 63 #ifdef TPM_CC_CreatePrimary 64 case TPM_CC_CreatePrimary: 65 return "CreatePrimary"; 66 #endif 67 #ifdef TPM_CC_DictionaryAttackLockReset 68 case TPM_CC_DictionaryAttackLockReset: 69 return "DictionaryAttackLockReset"; 70 #endif 71 #ifdef TPM_CC_DictionaryAttackParameters 72 case TPM_CC_DictionaryAttackParameters: 73 return "DictionaryAttackParameters"; 74 #endif 75 #ifdef TPM_CC_Duplicate 76 case TPM_CC_Duplicate: 77 return "Duplicate"; 78 #endif 79 #ifdef TPM_CC_ECC_Parameters 80 case TPM_CC_ECC_Parameters: 81 return "ECC_Parameters"; 82 #endif 83 #ifdef TPM_CC_ECDH_KeyGen 84 case TPM_CC_ECDH_KeyGen: 85 return "ECDH_KeyGen"; 86 #endif 87 #ifdef TPM_CC_ECDH_ZGen 88 case TPM_CC_ECDH_ZGen: 89 return "ECDH_ZGen"; 90 #endif 91 #ifdef TPM_CC_EC_Ephemeral 92 case TPM_CC_EC_Ephemeral: 93 return "EC_Ephemeral"; 94 #endif 95 #ifdef TPM_CC_EncryptDecrypt 96 case TPM_CC_EncryptDecrypt: 97 return "EncryptDecrypt"; 98 #endif 99 #ifdef TPM_CC_EventSequenceComplete 100 case TPM_CC_EventSequenceComplete: 101 return "EventSequenceComplete"; 102 #endif 103 #ifdef TPM_CC_EvictControl 104 case TPM_CC_EvictControl: 105 return "EvictControl"; 106 #endif 107 #ifdef TPM_CC_FieldUpgradeData 108 case TPM_CC_FieldUpgradeData: 109 return "FieldUpgradeData"; 110 #endif 111 #ifdef TPM_CC_FieldUpgradeStart 112 case TPM_CC_FieldUpgradeStart: 113 return "FieldUpgradeStart"; 114 #endif 115 #ifdef TPM_CC_FirmwareRead 116 case TPM_CC_FirmwareRead: 117 return "FirmwareRead"; 118 #endif 119 #ifdef TPM_CC_FlushContext 120 case TPM_CC_FlushContext: 121 return "FlushContext"; 122 #endif 123 #ifdef TPM_CC_GetCapability 124 case TPM_CC_GetCapability: 125 return "GetCapability"; 126 #endif 127 #ifdef TPM_CC_GetCommandAuditDigest 128 case TPM_CC_GetCommandAuditDigest: 129 return "GetCommandAuditDigest"; 130 #endif 131 #ifdef TPM_CC_GetRandom 132 case TPM_CC_GetRandom: 133 return "GetRandom"; 134 #endif 135 #ifdef TPM_CC_GetSessionAuditDigest 136 case TPM_CC_GetSessionAuditDigest: 137 return "GetSessionAuditDigest"; 138 #endif 139 #ifdef TPM_CC_GetTestResult 140 case TPM_CC_GetTestResult: 141 return "GetTestResult"; 142 #endif 143 #ifdef TPM_CC_GetTime 144 case TPM_CC_GetTime: 145 return "GetTime"; 146 #endif 147 #ifdef TPM_CC_HMAC 148 case TPM_CC_HMAC: 149 return "HMAC"; 150 #endif 151 #ifdef TPM_CC_HMAC_Start 152 case TPM_CC_HMAC_Start: 153 return "HMAC_Start"; 154 #endif 155 #ifdef TPM_CC_Hash 156 case TPM_CC_Hash: 157 return "Hash"; 158 #endif 159 #ifdef TPM_CC_HashSequenceStart 160 case TPM_CC_HashSequenceStart: 161 return "HashSequenceStart"; 162 #endif 163 #ifdef TPM_CC_HierarchyChangeAuth 164 case TPM_CC_HierarchyChangeAuth: 165 return "HierarchyChangeAuth"; 166 #endif 167 #ifdef TPM_CC_HierarchyControl 168 case TPM_CC_HierarchyControl: 169 return "HierarchyControl"; 170 #endif 171 #ifdef TPM_CC_Import 172 case TPM_CC_Import: 173 return "Import"; 174 #endif 175 #ifdef TPM_CC_IncrementalSelfTest 176 case TPM_CC_IncrementalSelfTest: 177 return "IncrementalSelfTest"; 178 #endif 179 #ifdef TPM_CC_Load 180 case TPM_CC_Load: 181 return "Load"; 182 #endif 183 #ifdef TPM_CC_LoadExternal 184 case TPM_CC_LoadExternal: 185 return "LoadExternal"; 186 #endif 187 #ifdef TPM_CC_MakeCredential 188 case TPM_CC_MakeCredential: 189 return "MakeCredential"; 190 #endif 191 #ifdef TPM_CC_NV_Certify 192 case TPM_CC_NV_Certify: 193 return "NV_Certify"; 194 #endif 195 #ifdef TPM_CC_NV_ChangeAuth 196 case TPM_CC_NV_ChangeAuth: 197 return "NV_ChangeAuth"; 198 #endif 199 #ifdef TPM_CC_NV_DefineSpace 200 case TPM_CC_NV_DefineSpace: 201 return "NV_DefineSpace"; 202 #endif 203 #ifdef TPM_CC_NV_Extend 204 case TPM_CC_NV_Extend: 205 return "NV_Extend"; 206 #endif 207 #ifdef TPM_CC_NV_GlobalWriteLock 208 case TPM_CC_NV_GlobalWriteLock: 209 return "NV_GlobalWriteLock"; 210 #endif 211 #ifdef TPM_CC_NV_Increment 212 case TPM_CC_NV_Increment: 213 return "NV_Increment"; 214 #endif 215 #ifdef TPM_CC_NV_Read 216 case TPM_CC_NV_Read: 217 return "NV_Read"; 218 #endif 219 #ifdef TPM_CC_NV_ReadLock 220 case TPM_CC_NV_ReadLock: 221 return "NV_ReadLock"; 222 #endif 223 #ifdef TPM_CC_NV_ReadPublic 224 case TPM_CC_NV_ReadPublic: 225 return "NV_ReadPublic"; 226 #endif 227 #ifdef TPM_CC_NV_SetBits 228 case TPM_CC_NV_SetBits: 229 return "NV_SetBits"; 230 #endif 231 #ifdef TPM_CC_NV_UndefineSpace 232 case TPM_CC_NV_UndefineSpace: 233 return "NV_UndefineSpace"; 234 #endif 235 #ifdef TPM_CC_NV_UndefineSpaceSpecial 236 case TPM_CC_NV_UndefineSpaceSpecial: 237 return "NV_UndefineSpaceSpecial"; 238 #endif 239 #ifdef TPM_CC_NV_Write 240 case TPM_CC_NV_Write: 241 return "NV_Write"; 242 #endif 243 #ifdef TPM_CC_NV_WriteLock 244 case TPM_CC_NV_WriteLock: 245 return "NV_WriteLock"; 246 #endif 247 #ifdef TPM_CC_ObjectChangeAuth 248 case TPM_CC_ObjectChangeAuth: 249 return "ObjectChangeAuth"; 250 #endif 251 #ifdef TPM_CC_PCR_Allocate 252 case TPM_CC_PCR_Allocate: 253 return "PCR_Allocate"; 254 #endif 255 #ifdef TPM_CC_PCR_Event 256 case TPM_CC_PCR_Event: 257 return "PCR_Event"; 258 #endif 259 #ifdef TPM_CC_PCR_Extend 260 case TPM_CC_PCR_Extend: 261 return "PCR_Extend"; 262 #endif 263 #ifdef TPM_CC_PCR_Read 264 case TPM_CC_PCR_Read: 265 return "PCR_Read"; 266 #endif 267 #ifdef TPM_CC_PCR_Reset 268 case TPM_CC_PCR_Reset: 269 return "PCR_Reset"; 270 #endif 271 #ifdef TPM_CC_PCR_SetAuthPolicy 272 case TPM_CC_PCR_SetAuthPolicy: 273 return "PCR_SetAuthPolicy"; 274 #endif 275 #ifdef TPM_CC_PCR_SetAuthValue 276 case TPM_CC_PCR_SetAuthValue: 277 return "PCR_SetAuthValue"; 278 #endif 279 #ifdef TPM_CC_PP_Commands 280 case TPM_CC_PP_Commands: 281 return "PP_Commands"; 282 #endif 283 #ifdef TPM_CC_PolicyAuthValue 284 case TPM_CC_PolicyAuthValue: 285 return "PolicyAuthValue"; 286 #endif 287 #ifdef TPM_CC_PolicyAuthorize 288 case TPM_CC_PolicyAuthorize: 289 return "PolicyAuthorize"; 290 #endif 291 #ifdef TPM_CC_PolicyCommandCode 292 case TPM_CC_PolicyCommandCode: 293 return "PolicyCommandCode"; 294 #endif 295 #ifdef TPM_CC_PolicyCounterTimer 296 case TPM_CC_PolicyCounterTimer: 297 return "PolicyCounterTimer"; 298 #endif 299 #ifdef TPM_CC_PolicyCpHash 300 case TPM_CC_PolicyCpHash: 301 return "PolicyCpHash"; 302 #endif 303 #ifdef TPM_CC_PolicyDuplicationSelect 304 case TPM_CC_PolicyDuplicationSelect: 305 return "PolicyDuplicationSelect"; 306 #endif 307 #ifdef TPM_CC_PolicyGetDigest 308 case TPM_CC_PolicyGetDigest: 309 return "PolicyGetDigest"; 310 #endif 311 #ifdef TPM_CC_PolicyLocality 312 case TPM_CC_PolicyLocality: 313 return "PolicyLocality"; 314 #endif 315 #ifdef TPM_CC_PolicyNV 316 case TPM_CC_PolicyNV: 317 return "PolicyNV"; 318 #endif 319 #ifdef TPM_CC_PolicyNameHash 320 case TPM_CC_PolicyNameHash: 321 return "PolicyNameHash"; 322 #endif 323 #ifdef TPM_CC_PolicyNvWritten 324 case TPM_CC_PolicyNvWritten: 325 return "PolicyNvWritten"; 326 #endif 327 #ifdef TPM_CC_PolicyOR 328 case TPM_CC_PolicyOR: 329 return "PolicyOR"; 330 #endif 331 #ifdef TPM_CC_PolicyPCR 332 case TPM_CC_PolicyPCR: 333 return "PolicyPCR"; 334 #endif 335 #ifdef TPM_CC_PolicyPassword 336 case TPM_CC_PolicyPassword: 337 return "PolicyPassword"; 338 #endif 339 #ifdef TPM_CC_PolicyPhysicalPresence 340 case TPM_CC_PolicyPhysicalPresence: 341 return "PolicyPhysicalPresence"; 342 #endif 343 #ifdef TPM_CC_PolicyRestart 344 case TPM_CC_PolicyRestart: 345 return "PolicyRestart"; 346 #endif 347 #ifdef TPM_CC_PolicySecret 348 case TPM_CC_PolicySecret: 349 return "PolicySecret"; 350 #endif 351 #ifdef TPM_CC_PolicySigned 352 case TPM_CC_PolicySigned: 353 return "PolicySigned"; 354 #endif 355 #ifdef TPM_CC_PolicyTicket 356 case TPM_CC_PolicyTicket: 357 return "PolicyTicket"; 358 #endif 359 #ifdef TPM_CC_Quote 360 case TPM_CC_Quote: 361 return "Quote"; 362 #endif 363 #ifdef TPM_CC_RSA_Decrypt 364 case TPM_CC_RSA_Decrypt: 365 return "RSA_Decrypt"; 366 #endif 367 #ifdef TPM_CC_RSA_Encrypt 368 case TPM_CC_RSA_Encrypt: 369 return "RSA_Encrypt"; 370 #endif 371 #ifdef TPM_CC_ReadClock 372 case TPM_CC_ReadClock: 373 return "ReadClock"; 374 #endif 375 #ifdef TPM_CC_ReadPublic 376 case TPM_CC_ReadPublic: 377 return "ReadPublic"; 378 #endif 379 #ifdef TPM_CC_Rewrap 380 case TPM_CC_Rewrap: 381 return "Rewrap"; 382 #endif 383 #ifdef TPM_CC_SelfTest 384 case TPM_CC_SelfTest: 385 return "SelfTest"; 386 #endif 387 #ifdef TPM_CC_SequenceComplete 388 case TPM_CC_SequenceComplete: 389 return "SequenceComplete"; 390 #endif 391 #ifdef TPM_CC_SequenceUpdate 392 case TPM_CC_SequenceUpdate: 393 return "SequenceUpdate"; 394 #endif 395 #ifdef TPM_CC_SetAlgorithmSet 396 case TPM_CC_SetAlgorithmSet: 397 return "SetAlgorithmSet"; 398 #endif 399 #ifdef TPM_CC_SetCommandCodeAuditStatus 400 case TPM_CC_SetCommandCodeAuditStatus: 401 return "SetCommandCodeAuditStatus"; 402 #endif 403 #ifdef TPM_CC_SetPrimaryPolicy 404 case TPM_CC_SetPrimaryPolicy: 405 return "SetPrimaryPolicy"; 406 #endif 407 #ifdef TPM_CC_Shutdown 408 case TPM_CC_Shutdown: 409 return "Shutdown"; 410 #endif 411 #ifdef TPM_CC_Sign 412 case TPM_CC_Sign: 413 return "Sign"; 414 #endif 415 #ifdef TPM_CC_StartAuthSession 416 case TPM_CC_StartAuthSession: 417 return "StartAuthSession"; 418 #endif 419 #ifdef TPM_CC_Startup 420 case TPM_CC_Startup: 421 return "Startup"; 422 #endif 423 #ifdef TPM_CC_StirRandom 424 case TPM_CC_StirRandom: 425 return "StirRandom"; 426 #endif 427 #ifdef TPM_CC_TestParms 428 case TPM_CC_TestParms: 429 return "TestParms"; 430 #endif 431 #ifdef TPM_CC_Unseal 432 case TPM_CC_Unseal: 433 return "Unseal"; 434 #endif 435 #ifdef TPM_CC_VerifySignature 436 case TPM_CC_VerifySignature: 437 return "VerifySignature"; 438 #endif 439 #ifdef TPM_CC_ZGen_2Phase 440 case TPM_CC_ZGen_2Phase: 441 return "ZGen_2Phase"; 442 #endif 443 default: 444 return "Unknown command"; 445 } 446 }