• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "ActivateCredential_fp.h"
7 #include "Certify_fp.h"
8 #include "CertifyCreation_fp.h"
9 #include "ChangeEPS_fp.h"
10 #include "ChangePPS_fp.h"
11 #include "Clear_fp.h"
12 #include "ClearControl_fp.h"
13 #include "ClockRateAdjust_fp.h"
14 #include "ClockSet_fp.h"
15 #include "Commit_fp.h"
16 #include "ContextLoad_fp.h"
17 #include "ContextSave_fp.h"
18 #include "Create_fp.h"
19 #include "CreatePrimary_fp.h"
20 #include "DictionaryAttackLockReset_fp.h"
21 #include "DictionaryAttackParameters_fp.h"
22 #include "Duplicate_fp.h"
23 #include "ECC_Parameters_fp.h"
24 #include "ECDH_KeyGen_fp.h"
25 #include "ECDH_ZGen_fp.h"
26 #include "EC_Ephemeral_fp.h"
27 #include "EncryptDecrypt_fp.h"
28 #include "EventSequenceComplete_fp.h"
29 #include "EvictControl_fp.h"
30 #include "FieldUpgradeData_fp.h"
31 #include "FieldUpgradeStart_fp.h"
32 #include "FirmwareRead_fp.h"
33 #include "FlushContext_fp.h"
34 #include "GetCapability_fp.h"
35 #include "GetCommandAuditDigest_fp.h"
36 #include "GetRandom_fp.h"
37 #include "GetSessionAuditDigest_fp.h"
38 #include "GetTestResult_fp.h"
39 #include "GetTime_fp.h"
40 #include "HMAC_fp.h"
41 #include "HMAC_Start_fp.h"
42 #include "Hash_fp.h"
43 #include "HashSequenceStart_fp.h"
44 #include "HierarchyChangeAuth_fp.h"
45 #include "HierarchyControl_fp.h"
46 #include "Import_fp.h"
47 #include "IncrementalSelfTest_fp.h"
48 #include "Load_fp.h"
49 #include "LoadExternal_fp.h"
50 #include "MakeCredential_fp.h"
51 #include "NV_Certify_fp.h"
52 #include "NV_ChangeAuth_fp.h"
53 #include "NV_DefineSpace_fp.h"
54 #include "NV_Extend_fp.h"
55 #include "NV_GlobalWriteLock_fp.h"
56 #include "NV_Increment_fp.h"
57 #include "NV_Read_fp.h"
58 #include "NV_ReadLock_fp.h"
59 #include "NV_ReadPublic_fp.h"
60 #include "NV_SetBits_fp.h"
61 #include "NV_UndefineSpace_fp.h"
62 #include "NV_UndefineSpaceSpecial_fp.h"
63 #include "NV_Write_fp.h"
64 #include "NV_WriteLock_fp.h"
65 #include "ObjectChangeAuth_fp.h"
66 #include "PCR_Allocate_fp.h"
67 #include "PCR_Event_fp.h"
68 #include "PCR_Extend_fp.h"
69 #include "PCR_Read_fp.h"
70 #include "PCR_Reset_fp.h"
71 #include "PCR_SetAuthPolicy_fp.h"
72 #include "PCR_SetAuthValue_fp.h"
73 #include "PP_Commands_fp.h"
74 #include "PolicyAuthValue_fp.h"
75 #include "PolicyAuthorize_fp.h"
76 #include "PolicyCommandCode_fp.h"
77 #include "PolicyCounterTimer_fp.h"
78 #include "PolicyCpHash_fp.h"
79 #include "PolicyDuplicationSelect_fp.h"
80 #include "PolicyGetDigest_fp.h"
81 #include "PolicyLocality_fp.h"
82 #include "PolicyNV_fp.h"
83 #include "PolicyNameHash_fp.h"
84 #include "PolicyNvWritten_fp.h"
85 #include "PolicyOR_fp.h"
86 #include "PolicyPCR_fp.h"
87 #include "PolicyPassword_fp.h"
88 #include "PolicyPhysicalPresence_fp.h"
89 #include "PolicyRestart_fp.h"
90 #include "PolicySecret_fp.h"
91 #include "PolicySigned_fp.h"
92 #include "PolicyTicket_fp.h"
93 #include "Quote_fp.h"
94 #include "RSA_Decrypt_fp.h"
95 #include "RSA_Encrypt_fp.h"
96 #include "ReadClock_fp.h"
97 #include "ReadPublic_fp.h"
98 #include "Rewrap_fp.h"
99 #include "SelfTest_fp.h"
100 #include "SequenceComplete_fp.h"
101 #include "SequenceUpdate_fp.h"
102 #include "SetAlgorithmSet_fp.h"
103 #include "SetCommandCodeAuditStatus_fp.h"
104 #include "SetPrimaryPolicy_fp.h"
105 #include "Shutdown_fp.h"
106 #include "Sign_fp.h"
107 #include "StartAuthSession_fp.h"
108 #include "Startup_fp.h"
109 #include "StirRandom_fp.h"
110 #include "TestParms_fp.h"
111 #include "Unseal_fp.h"
112 #include "VerifySignature_fp.h"
113 #include "ZGen_2Phase_fp.h"
114 
115 #include "Implementation.h"
116 #include "CommandDispatcher_fp.h"
117 
CommandDispatcher(TPMI_ST_COMMAND_TAG tag,TPM_CC command_code,INT32 * request_parameter_buffer_size,BYTE * request_parameter_buffer_start,TPM_HANDLE request_handles[],UINT32 * response_handle_buffer_size,UINT32 * response_parameter_buffer_size)118 TPM_RC CommandDispatcher(TPMI_ST_COMMAND_TAG tag,
119                          TPM_CC command_code,
120                          INT32* request_parameter_buffer_size,
121                          BYTE* request_parameter_buffer_start,
122                          TPM_HANDLE request_handles[],
123                          UINT32* response_handle_buffer_size,
124                          UINT32* response_parameter_buffer_size) {
125   BYTE* request_parameter_buffer = request_parameter_buffer_start;
126   switch (command_code) {
127 #ifdef TPM_CC_ActivateCredential
128     case TPM_CC_ActivateCredential:
129       return Exec_ActivateCredential(
130           tag, &request_parameter_buffer, request_parameter_buffer_size,
131           request_handles, response_handle_buffer_size,
132           response_parameter_buffer_size);
133 #endif
134 #ifdef TPM_CC_Certify
135     case TPM_CC_Certify:
136       return Exec_Certify(tag, &request_parameter_buffer,
137                           request_parameter_buffer_size, request_handles,
138                           response_handle_buffer_size,
139                           response_parameter_buffer_size);
140 #endif
141 #ifdef TPM_CC_CertifyCreation
142     case TPM_CC_CertifyCreation:
143       return Exec_CertifyCreation(tag, &request_parameter_buffer,
144                                   request_parameter_buffer_size,
145                                   request_handles, response_handle_buffer_size,
146                                   response_parameter_buffer_size);
147 #endif
148 #ifdef TPM_CC_ChangeEPS
149     case TPM_CC_ChangeEPS:
150       return Exec_ChangeEPS(tag, &request_parameter_buffer,
151                             request_parameter_buffer_size, request_handles,
152                             response_handle_buffer_size,
153                             response_parameter_buffer_size);
154 #endif
155 #ifdef TPM_CC_ChangePPS
156     case TPM_CC_ChangePPS:
157       return Exec_ChangePPS(tag, &request_parameter_buffer,
158                             request_parameter_buffer_size, request_handles,
159                             response_handle_buffer_size,
160                             response_parameter_buffer_size);
161 #endif
162 #ifdef TPM_CC_Clear
163     case TPM_CC_Clear:
164       return Exec_Clear(tag, &request_parameter_buffer,
165                         request_parameter_buffer_size, request_handles,
166                         response_handle_buffer_size,
167                         response_parameter_buffer_size);
168 #endif
169 #ifdef TPM_CC_ClearControl
170     case TPM_CC_ClearControl:
171       return Exec_ClearControl(tag, &request_parameter_buffer,
172                                request_parameter_buffer_size, request_handles,
173                                response_handle_buffer_size,
174                                response_parameter_buffer_size);
175 #endif
176 #ifdef TPM_CC_ClockRateAdjust
177     case TPM_CC_ClockRateAdjust:
178       return Exec_ClockRateAdjust(tag, &request_parameter_buffer,
179                                   request_parameter_buffer_size,
180                                   request_handles, response_handle_buffer_size,
181                                   response_parameter_buffer_size);
182 #endif
183 #ifdef TPM_CC_ClockSet
184     case TPM_CC_ClockSet:
185       return Exec_ClockSet(tag, &request_parameter_buffer,
186                            request_parameter_buffer_size, request_handles,
187                            response_handle_buffer_size,
188                            response_parameter_buffer_size);
189 #endif
190 #ifdef TPM_CC_Commit
191     case TPM_CC_Commit:
192       return Exec_Commit(tag, &request_parameter_buffer,
193                          request_parameter_buffer_size, request_handles,
194                          response_handle_buffer_size,
195                          response_parameter_buffer_size);
196 #endif
197 #ifdef TPM_CC_ContextLoad
198     case TPM_CC_ContextLoad:
199       return Exec_ContextLoad(tag, &request_parameter_buffer,
200                               request_parameter_buffer_size, request_handles,
201                               response_handle_buffer_size,
202                               response_parameter_buffer_size);
203 #endif
204 #ifdef TPM_CC_ContextSave
205     case TPM_CC_ContextSave:
206       return Exec_ContextSave(tag, &request_parameter_buffer,
207                               request_parameter_buffer_size, request_handles,
208                               response_handle_buffer_size,
209                               response_parameter_buffer_size);
210 #endif
211 #ifdef TPM_CC_Create
212     case TPM_CC_Create:
213       return Exec_Create(tag, &request_parameter_buffer,
214                          request_parameter_buffer_size, request_handles,
215                          response_handle_buffer_size,
216                          response_parameter_buffer_size);
217 #endif
218 #ifdef TPM_CC_CreatePrimary
219     case TPM_CC_CreatePrimary:
220       return Exec_CreatePrimary(tag, &request_parameter_buffer,
221                                 request_parameter_buffer_size, request_handles,
222                                 response_handle_buffer_size,
223                                 response_parameter_buffer_size);
224 #endif
225 #ifdef TPM_CC_DictionaryAttackLockReset
226     case TPM_CC_DictionaryAttackLockReset:
227       return Exec_DictionaryAttackLockReset(
228           tag, &request_parameter_buffer, request_parameter_buffer_size,
229           request_handles, response_handle_buffer_size,
230           response_parameter_buffer_size);
231 #endif
232 #ifdef TPM_CC_DictionaryAttackParameters
233     case TPM_CC_DictionaryAttackParameters:
234       return Exec_DictionaryAttackParameters(
235           tag, &request_parameter_buffer, request_parameter_buffer_size,
236           request_handles, response_handle_buffer_size,
237           response_parameter_buffer_size);
238 #endif
239 #ifdef TPM_CC_Duplicate
240     case TPM_CC_Duplicate:
241       return Exec_Duplicate(tag, &request_parameter_buffer,
242                             request_parameter_buffer_size, request_handles,
243                             response_handle_buffer_size,
244                             response_parameter_buffer_size);
245 #endif
246 #ifdef TPM_CC_ECC_Parameters
247     case TPM_CC_ECC_Parameters:
248       return Exec_ECC_Parameters(tag, &request_parameter_buffer,
249                                  request_parameter_buffer_size, request_handles,
250                                  response_handle_buffer_size,
251                                  response_parameter_buffer_size);
252 #endif
253 #ifdef TPM_CC_ECDH_KeyGen
254     case TPM_CC_ECDH_KeyGen:
255       return Exec_ECDH_KeyGen(tag, &request_parameter_buffer,
256                               request_parameter_buffer_size, request_handles,
257                               response_handle_buffer_size,
258                               response_parameter_buffer_size);
259 #endif
260 #ifdef TPM_CC_ECDH_ZGen
261     case TPM_CC_ECDH_ZGen:
262       return Exec_ECDH_ZGen(tag, &request_parameter_buffer,
263                             request_parameter_buffer_size, request_handles,
264                             response_handle_buffer_size,
265                             response_parameter_buffer_size);
266 #endif
267 #ifdef TPM_CC_EC_Ephemeral
268     case TPM_CC_EC_Ephemeral:
269       return Exec_EC_Ephemeral(tag, &request_parameter_buffer,
270                                request_parameter_buffer_size, request_handles,
271                                response_handle_buffer_size,
272                                response_parameter_buffer_size);
273 #endif
274 #ifdef TPM_CC_EncryptDecrypt
275     case TPM_CC_EncryptDecrypt:
276       return Exec_EncryptDecrypt(tag, &request_parameter_buffer,
277                                  request_parameter_buffer_size, request_handles,
278                                  response_handle_buffer_size,
279                                  response_parameter_buffer_size);
280 #endif
281 #ifdef TPM_CC_EventSequenceComplete
282     case TPM_CC_EventSequenceComplete:
283       return Exec_EventSequenceComplete(
284           tag, &request_parameter_buffer, request_parameter_buffer_size,
285           request_handles, response_handle_buffer_size,
286           response_parameter_buffer_size);
287 #endif
288 #ifdef TPM_CC_EvictControl
289     case TPM_CC_EvictControl:
290       return Exec_EvictControl(tag, &request_parameter_buffer,
291                                request_parameter_buffer_size, request_handles,
292                                response_handle_buffer_size,
293                                response_parameter_buffer_size);
294 #endif
295 #ifdef TPM_CC_FieldUpgradeData
296     case TPM_CC_FieldUpgradeData:
297       return Exec_FieldUpgradeData(tag, &request_parameter_buffer,
298                                    request_parameter_buffer_size,
299                                    request_handles, response_handle_buffer_size,
300                                    response_parameter_buffer_size);
301 #endif
302 #ifdef TPM_CC_FieldUpgradeStart
303     case TPM_CC_FieldUpgradeStart:
304       return Exec_FieldUpgradeStart(
305           tag, &request_parameter_buffer, request_parameter_buffer_size,
306           request_handles, response_handle_buffer_size,
307           response_parameter_buffer_size);
308 #endif
309 #ifdef TPM_CC_FirmwareRead
310     case TPM_CC_FirmwareRead:
311       return Exec_FirmwareRead(tag, &request_parameter_buffer,
312                                request_parameter_buffer_size, request_handles,
313                                response_handle_buffer_size,
314                                response_parameter_buffer_size);
315 #endif
316 #ifdef TPM_CC_FlushContext
317     case TPM_CC_FlushContext:
318       return Exec_FlushContext(tag, &request_parameter_buffer,
319                                request_parameter_buffer_size, request_handles,
320                                response_handle_buffer_size,
321                                response_parameter_buffer_size);
322 #endif
323 #ifdef TPM_CC_GetCapability
324     case TPM_CC_GetCapability:
325       return Exec_GetCapability(tag, &request_parameter_buffer,
326                                 request_parameter_buffer_size, request_handles,
327                                 response_handle_buffer_size,
328                                 response_parameter_buffer_size);
329 #endif
330 #ifdef TPM_CC_GetCommandAuditDigest
331     case TPM_CC_GetCommandAuditDigest:
332       return Exec_GetCommandAuditDigest(
333           tag, &request_parameter_buffer, request_parameter_buffer_size,
334           request_handles, response_handle_buffer_size,
335           response_parameter_buffer_size);
336 #endif
337 #ifdef TPM_CC_GetRandom
338     case TPM_CC_GetRandom:
339       return Exec_GetRandom(tag, &request_parameter_buffer,
340                             request_parameter_buffer_size, request_handles,
341                             response_handle_buffer_size,
342                             response_parameter_buffer_size);
343 #endif
344 #ifdef TPM_CC_GetSessionAuditDigest
345     case TPM_CC_GetSessionAuditDigest:
346       return Exec_GetSessionAuditDigest(
347           tag, &request_parameter_buffer, request_parameter_buffer_size,
348           request_handles, response_handle_buffer_size,
349           response_parameter_buffer_size);
350 #endif
351 #ifdef TPM_CC_GetTestResult
352     case TPM_CC_GetTestResult:
353       return Exec_GetTestResult(tag, &request_parameter_buffer,
354                                 request_parameter_buffer_size, request_handles,
355                                 response_handle_buffer_size,
356                                 response_parameter_buffer_size);
357 #endif
358 #ifdef TPM_CC_GetTime
359     case TPM_CC_GetTime:
360       return Exec_GetTime(tag, &request_parameter_buffer,
361                           request_parameter_buffer_size, request_handles,
362                           response_handle_buffer_size,
363                           response_parameter_buffer_size);
364 #endif
365 #ifdef TPM_CC_HMAC
366     case TPM_CC_HMAC:
367       return Exec_HMAC(tag, &request_parameter_buffer,
368                        request_parameter_buffer_size, request_handles,
369                        response_handle_buffer_size,
370                        response_parameter_buffer_size);
371 #endif
372 #ifdef TPM_CC_HMAC_Start
373     case TPM_CC_HMAC_Start:
374       return Exec_HMAC_Start(tag, &request_parameter_buffer,
375                              request_parameter_buffer_size, request_handles,
376                              response_handle_buffer_size,
377                              response_parameter_buffer_size);
378 #endif
379 #ifdef TPM_CC_Hash
380     case TPM_CC_Hash:
381       return Exec_Hash(tag, &request_parameter_buffer,
382                        request_parameter_buffer_size, request_handles,
383                        response_handle_buffer_size,
384                        response_parameter_buffer_size);
385 #endif
386 #ifdef TPM_CC_HashSequenceStart
387     case TPM_CC_HashSequenceStart:
388       return Exec_HashSequenceStart(
389           tag, &request_parameter_buffer, request_parameter_buffer_size,
390           request_handles, response_handle_buffer_size,
391           response_parameter_buffer_size);
392 #endif
393 #ifdef TPM_CC_HierarchyChangeAuth
394     case TPM_CC_HierarchyChangeAuth:
395       return Exec_HierarchyChangeAuth(
396           tag, &request_parameter_buffer, request_parameter_buffer_size,
397           request_handles, response_handle_buffer_size,
398           response_parameter_buffer_size);
399 #endif
400 #ifdef TPM_CC_HierarchyControl
401     case TPM_CC_HierarchyControl:
402       return Exec_HierarchyControl(tag, &request_parameter_buffer,
403                                    request_parameter_buffer_size,
404                                    request_handles, response_handle_buffer_size,
405                                    response_parameter_buffer_size);
406 #endif
407 #ifdef TPM_CC_Import
408     case TPM_CC_Import:
409       return Exec_Import(tag, &request_parameter_buffer,
410                          request_parameter_buffer_size, request_handles,
411                          response_handle_buffer_size,
412                          response_parameter_buffer_size);
413 #endif
414 #ifdef TPM_CC_IncrementalSelfTest
415     case TPM_CC_IncrementalSelfTest:
416       return Exec_IncrementalSelfTest(
417           tag, &request_parameter_buffer, request_parameter_buffer_size,
418           request_handles, response_handle_buffer_size,
419           response_parameter_buffer_size);
420 #endif
421 #ifdef TPM_CC_Load
422     case TPM_CC_Load:
423       return Exec_Load(tag, &request_parameter_buffer,
424                        request_parameter_buffer_size, request_handles,
425                        response_handle_buffer_size,
426                        response_parameter_buffer_size);
427 #endif
428 #ifdef TPM_CC_LoadExternal
429     case TPM_CC_LoadExternal:
430       return Exec_LoadExternal(tag, &request_parameter_buffer,
431                                request_parameter_buffer_size, request_handles,
432                                response_handle_buffer_size,
433                                response_parameter_buffer_size);
434 #endif
435 #ifdef TPM_CC_MakeCredential
436     case TPM_CC_MakeCredential:
437       return Exec_MakeCredential(tag, &request_parameter_buffer,
438                                  request_parameter_buffer_size, request_handles,
439                                  response_handle_buffer_size,
440                                  response_parameter_buffer_size);
441 #endif
442 #ifdef TPM_CC_NV_Certify
443     case TPM_CC_NV_Certify:
444       return Exec_NV_Certify(tag, &request_parameter_buffer,
445                              request_parameter_buffer_size, request_handles,
446                              response_handle_buffer_size,
447                              response_parameter_buffer_size);
448 #endif
449 #ifdef TPM_CC_NV_ChangeAuth
450     case TPM_CC_NV_ChangeAuth:
451       return Exec_NV_ChangeAuth(tag, &request_parameter_buffer,
452                                 request_parameter_buffer_size, request_handles,
453                                 response_handle_buffer_size,
454                                 response_parameter_buffer_size);
455 #endif
456 #ifdef TPM_CC_NV_DefineSpace
457     case TPM_CC_NV_DefineSpace:
458       return Exec_NV_DefineSpace(tag, &request_parameter_buffer,
459                                  request_parameter_buffer_size, request_handles,
460                                  response_handle_buffer_size,
461                                  response_parameter_buffer_size);
462 #endif
463 #ifdef TPM_CC_NV_Extend
464     case TPM_CC_NV_Extend:
465       return Exec_NV_Extend(tag, &request_parameter_buffer,
466                             request_parameter_buffer_size, request_handles,
467                             response_handle_buffer_size,
468                             response_parameter_buffer_size);
469 #endif
470 #ifdef TPM_CC_NV_GlobalWriteLock
471     case TPM_CC_NV_GlobalWriteLock:
472       return Exec_NV_GlobalWriteLock(
473           tag, &request_parameter_buffer, request_parameter_buffer_size,
474           request_handles, response_handle_buffer_size,
475           response_parameter_buffer_size);
476 #endif
477 #ifdef TPM_CC_NV_Increment
478     case TPM_CC_NV_Increment:
479       return Exec_NV_Increment(tag, &request_parameter_buffer,
480                                request_parameter_buffer_size, request_handles,
481                                response_handle_buffer_size,
482                                response_parameter_buffer_size);
483 #endif
484 #ifdef TPM_CC_NV_Read
485     case TPM_CC_NV_Read:
486       return Exec_NV_Read(tag, &request_parameter_buffer,
487                           request_parameter_buffer_size, request_handles,
488                           response_handle_buffer_size,
489                           response_parameter_buffer_size);
490 #endif
491 #ifdef TPM_CC_NV_ReadLock
492     case TPM_CC_NV_ReadLock:
493       return Exec_NV_ReadLock(tag, &request_parameter_buffer,
494                               request_parameter_buffer_size, request_handles,
495                               response_handle_buffer_size,
496                               response_parameter_buffer_size);
497 #endif
498 #ifdef TPM_CC_NV_ReadPublic
499     case TPM_CC_NV_ReadPublic:
500       return Exec_NV_ReadPublic(tag, &request_parameter_buffer,
501                                 request_parameter_buffer_size, request_handles,
502                                 response_handle_buffer_size,
503                                 response_parameter_buffer_size);
504 #endif
505 #ifdef TPM_CC_NV_SetBits
506     case TPM_CC_NV_SetBits:
507       return Exec_NV_SetBits(tag, &request_parameter_buffer,
508                              request_parameter_buffer_size, request_handles,
509                              response_handle_buffer_size,
510                              response_parameter_buffer_size);
511 #endif
512 #ifdef TPM_CC_NV_UndefineSpace
513     case TPM_CC_NV_UndefineSpace:
514       return Exec_NV_UndefineSpace(tag, &request_parameter_buffer,
515                                    request_parameter_buffer_size,
516                                    request_handles, response_handle_buffer_size,
517                                    response_parameter_buffer_size);
518 #endif
519 #ifdef TPM_CC_NV_UndefineSpaceSpecial
520     case TPM_CC_NV_UndefineSpaceSpecial:
521       return Exec_NV_UndefineSpaceSpecial(
522           tag, &request_parameter_buffer, request_parameter_buffer_size,
523           request_handles, response_handle_buffer_size,
524           response_parameter_buffer_size);
525 #endif
526 #ifdef TPM_CC_NV_Write
527     case TPM_CC_NV_Write:
528       return Exec_NV_Write(tag, &request_parameter_buffer,
529                            request_parameter_buffer_size, request_handles,
530                            response_handle_buffer_size,
531                            response_parameter_buffer_size);
532 #endif
533 #ifdef TPM_CC_NV_WriteLock
534     case TPM_CC_NV_WriteLock:
535       return Exec_NV_WriteLock(tag, &request_parameter_buffer,
536                                request_parameter_buffer_size, request_handles,
537                                response_handle_buffer_size,
538                                response_parameter_buffer_size);
539 #endif
540 #ifdef TPM_CC_ObjectChangeAuth
541     case TPM_CC_ObjectChangeAuth:
542       return Exec_ObjectChangeAuth(tag, &request_parameter_buffer,
543                                    request_parameter_buffer_size,
544                                    request_handles, response_handle_buffer_size,
545                                    response_parameter_buffer_size);
546 #endif
547 #ifdef TPM_CC_PCR_Allocate
548     case TPM_CC_PCR_Allocate:
549       return Exec_PCR_Allocate(tag, &request_parameter_buffer,
550                                request_parameter_buffer_size, request_handles,
551                                response_handle_buffer_size,
552                                response_parameter_buffer_size);
553 #endif
554 #ifdef TPM_CC_PCR_Event
555     case TPM_CC_PCR_Event:
556       return Exec_PCR_Event(tag, &request_parameter_buffer,
557                             request_parameter_buffer_size, request_handles,
558                             response_handle_buffer_size,
559                             response_parameter_buffer_size);
560 #endif
561 #ifdef TPM_CC_PCR_Extend
562     case TPM_CC_PCR_Extend:
563       return Exec_PCR_Extend(tag, &request_parameter_buffer,
564                              request_parameter_buffer_size, request_handles,
565                              response_handle_buffer_size,
566                              response_parameter_buffer_size);
567 #endif
568 #ifdef TPM_CC_PCR_Read
569     case TPM_CC_PCR_Read:
570       return Exec_PCR_Read(tag, &request_parameter_buffer,
571                            request_parameter_buffer_size, request_handles,
572                            response_handle_buffer_size,
573                            response_parameter_buffer_size);
574 #endif
575 #ifdef TPM_CC_PCR_Reset
576     case TPM_CC_PCR_Reset:
577       return Exec_PCR_Reset(tag, &request_parameter_buffer,
578                             request_parameter_buffer_size, request_handles,
579                             response_handle_buffer_size,
580                             response_parameter_buffer_size);
581 #endif
582 #ifdef TPM_CC_PCR_SetAuthPolicy
583     case TPM_CC_PCR_SetAuthPolicy:
584       return Exec_PCR_SetAuthPolicy(
585           tag, &request_parameter_buffer, request_parameter_buffer_size,
586           request_handles, response_handle_buffer_size,
587           response_parameter_buffer_size);
588 #endif
589 #ifdef TPM_CC_PCR_SetAuthValue
590     case TPM_CC_PCR_SetAuthValue:
591       return Exec_PCR_SetAuthValue(tag, &request_parameter_buffer,
592                                    request_parameter_buffer_size,
593                                    request_handles, response_handle_buffer_size,
594                                    response_parameter_buffer_size);
595 #endif
596 #ifdef TPM_CC_PP_Commands
597     case TPM_CC_PP_Commands:
598       return Exec_PP_Commands(tag, &request_parameter_buffer,
599                               request_parameter_buffer_size, request_handles,
600                               response_handle_buffer_size,
601                               response_parameter_buffer_size);
602 #endif
603 #ifdef TPM_CC_PolicyAuthValue
604     case TPM_CC_PolicyAuthValue:
605       return Exec_PolicyAuthValue(tag, &request_parameter_buffer,
606                                   request_parameter_buffer_size,
607                                   request_handles, response_handle_buffer_size,
608                                   response_parameter_buffer_size);
609 #endif
610 #ifdef TPM_CC_PolicyAuthorize
611     case TPM_CC_PolicyAuthorize:
612       return Exec_PolicyAuthorize(tag, &request_parameter_buffer,
613                                   request_parameter_buffer_size,
614                                   request_handles, response_handle_buffer_size,
615                                   response_parameter_buffer_size);
616 #endif
617 #ifdef TPM_CC_PolicyCommandCode
618     case TPM_CC_PolicyCommandCode:
619       return Exec_PolicyCommandCode(
620           tag, &request_parameter_buffer, request_parameter_buffer_size,
621           request_handles, response_handle_buffer_size,
622           response_parameter_buffer_size);
623 #endif
624 #ifdef TPM_CC_PolicyCounterTimer
625     case TPM_CC_PolicyCounterTimer:
626       return Exec_PolicyCounterTimer(
627           tag, &request_parameter_buffer, request_parameter_buffer_size,
628           request_handles, response_handle_buffer_size,
629           response_parameter_buffer_size);
630 #endif
631 #ifdef TPM_CC_PolicyCpHash
632     case TPM_CC_PolicyCpHash:
633       return Exec_PolicyCpHash(tag, &request_parameter_buffer,
634                                request_parameter_buffer_size, request_handles,
635                                response_handle_buffer_size,
636                                response_parameter_buffer_size);
637 #endif
638 #ifdef TPM_CC_PolicyDuplicationSelect
639     case TPM_CC_PolicyDuplicationSelect:
640       return Exec_PolicyDuplicationSelect(
641           tag, &request_parameter_buffer, request_parameter_buffer_size,
642           request_handles, response_handle_buffer_size,
643           response_parameter_buffer_size);
644 #endif
645 #ifdef TPM_CC_PolicyGetDigest
646     case TPM_CC_PolicyGetDigest:
647       return Exec_PolicyGetDigest(tag, &request_parameter_buffer,
648                                   request_parameter_buffer_size,
649                                   request_handles, response_handle_buffer_size,
650                                   response_parameter_buffer_size);
651 #endif
652 #ifdef TPM_CC_PolicyLocality
653     case TPM_CC_PolicyLocality:
654       return Exec_PolicyLocality(tag, &request_parameter_buffer,
655                                  request_parameter_buffer_size, request_handles,
656                                  response_handle_buffer_size,
657                                  response_parameter_buffer_size);
658 #endif
659 #ifdef TPM_CC_PolicyNV
660     case TPM_CC_PolicyNV:
661       return Exec_PolicyNV(tag, &request_parameter_buffer,
662                            request_parameter_buffer_size, request_handles,
663                            response_handle_buffer_size,
664                            response_parameter_buffer_size);
665 #endif
666 #ifdef TPM_CC_PolicyNameHash
667     case TPM_CC_PolicyNameHash:
668       return Exec_PolicyNameHash(tag, &request_parameter_buffer,
669                                  request_parameter_buffer_size, request_handles,
670                                  response_handle_buffer_size,
671                                  response_parameter_buffer_size);
672 #endif
673 #ifdef TPM_CC_PolicyNvWritten
674     case TPM_CC_PolicyNvWritten:
675       return Exec_PolicyNvWritten(tag, &request_parameter_buffer,
676                                   request_parameter_buffer_size,
677                                   request_handles, response_handle_buffer_size,
678                                   response_parameter_buffer_size);
679 #endif
680 #ifdef TPM_CC_PolicyOR
681     case TPM_CC_PolicyOR:
682       return Exec_PolicyOR(tag, &request_parameter_buffer,
683                            request_parameter_buffer_size, request_handles,
684                            response_handle_buffer_size,
685                            response_parameter_buffer_size);
686 #endif
687 #ifdef TPM_CC_PolicyPCR
688     case TPM_CC_PolicyPCR:
689       return Exec_PolicyPCR(tag, &request_parameter_buffer,
690                             request_parameter_buffer_size, request_handles,
691                             response_handle_buffer_size,
692                             response_parameter_buffer_size);
693 #endif
694 #ifdef TPM_CC_PolicyPassword
695     case TPM_CC_PolicyPassword:
696       return Exec_PolicyPassword(tag, &request_parameter_buffer,
697                                  request_parameter_buffer_size, request_handles,
698                                  response_handle_buffer_size,
699                                  response_parameter_buffer_size);
700 #endif
701 #ifdef TPM_CC_PolicyPhysicalPresence
702     case TPM_CC_PolicyPhysicalPresence:
703       return Exec_PolicyPhysicalPresence(
704           tag, &request_parameter_buffer, request_parameter_buffer_size,
705           request_handles, response_handle_buffer_size,
706           response_parameter_buffer_size);
707 #endif
708 #ifdef TPM_CC_PolicyRestart
709     case TPM_CC_PolicyRestart:
710       return Exec_PolicyRestart(tag, &request_parameter_buffer,
711                                 request_parameter_buffer_size, request_handles,
712                                 response_handle_buffer_size,
713                                 response_parameter_buffer_size);
714 #endif
715 #ifdef TPM_CC_PolicySecret
716     case TPM_CC_PolicySecret:
717       return Exec_PolicySecret(tag, &request_parameter_buffer,
718                                request_parameter_buffer_size, request_handles,
719                                response_handle_buffer_size,
720                                response_parameter_buffer_size);
721 #endif
722 #ifdef TPM_CC_PolicySigned
723     case TPM_CC_PolicySigned:
724       return Exec_PolicySigned(tag, &request_parameter_buffer,
725                                request_parameter_buffer_size, request_handles,
726                                response_handle_buffer_size,
727                                response_parameter_buffer_size);
728 #endif
729 #ifdef TPM_CC_PolicyTicket
730     case TPM_CC_PolicyTicket:
731       return Exec_PolicyTicket(tag, &request_parameter_buffer,
732                                request_parameter_buffer_size, request_handles,
733                                response_handle_buffer_size,
734                                response_parameter_buffer_size);
735 #endif
736 #ifdef TPM_CC_Quote
737     case TPM_CC_Quote:
738       return Exec_Quote(tag, &request_parameter_buffer,
739                         request_parameter_buffer_size, request_handles,
740                         response_handle_buffer_size,
741                         response_parameter_buffer_size);
742 #endif
743 #ifdef TPM_CC_RSA_Decrypt
744     case TPM_CC_RSA_Decrypt:
745       return Exec_RSA_Decrypt(tag, &request_parameter_buffer,
746                               request_parameter_buffer_size, request_handles,
747                               response_handle_buffer_size,
748                               response_parameter_buffer_size);
749 #endif
750 #ifdef TPM_CC_RSA_Encrypt
751     case TPM_CC_RSA_Encrypt:
752       return Exec_RSA_Encrypt(tag, &request_parameter_buffer,
753                               request_parameter_buffer_size, request_handles,
754                               response_handle_buffer_size,
755                               response_parameter_buffer_size);
756 #endif
757 #ifdef TPM_CC_ReadClock
758     case TPM_CC_ReadClock:
759       return Exec_ReadClock(tag, &request_parameter_buffer,
760                             request_parameter_buffer_size, request_handles,
761                             response_handle_buffer_size,
762                             response_parameter_buffer_size);
763 #endif
764 #ifdef TPM_CC_ReadPublic
765     case TPM_CC_ReadPublic:
766       return Exec_ReadPublic(tag, &request_parameter_buffer,
767                              request_parameter_buffer_size, request_handles,
768                              response_handle_buffer_size,
769                              response_parameter_buffer_size);
770 #endif
771 #ifdef TPM_CC_Rewrap
772     case TPM_CC_Rewrap:
773       return Exec_Rewrap(tag, &request_parameter_buffer,
774                          request_parameter_buffer_size, request_handles,
775                          response_handle_buffer_size,
776                          response_parameter_buffer_size);
777 #endif
778 #ifdef TPM_CC_SelfTest
779     case TPM_CC_SelfTest:
780       return Exec_SelfTest(tag, &request_parameter_buffer,
781                            request_parameter_buffer_size, request_handles,
782                            response_handle_buffer_size,
783                            response_parameter_buffer_size);
784 #endif
785 #ifdef TPM_CC_SequenceComplete
786     case TPM_CC_SequenceComplete:
787       return Exec_SequenceComplete(tag, &request_parameter_buffer,
788                                    request_parameter_buffer_size,
789                                    request_handles, response_handle_buffer_size,
790                                    response_parameter_buffer_size);
791 #endif
792 #ifdef TPM_CC_SequenceUpdate
793     case TPM_CC_SequenceUpdate:
794       return Exec_SequenceUpdate(tag, &request_parameter_buffer,
795                                  request_parameter_buffer_size, request_handles,
796                                  response_handle_buffer_size,
797                                  response_parameter_buffer_size);
798 #endif
799 #ifdef TPM_CC_SetAlgorithmSet
800     case TPM_CC_SetAlgorithmSet:
801       return Exec_SetAlgorithmSet(tag, &request_parameter_buffer,
802                                   request_parameter_buffer_size,
803                                   request_handles, response_handle_buffer_size,
804                                   response_parameter_buffer_size);
805 #endif
806 #ifdef TPM_CC_SetCommandCodeAuditStatus
807     case TPM_CC_SetCommandCodeAuditStatus:
808       return Exec_SetCommandCodeAuditStatus(
809           tag, &request_parameter_buffer, request_parameter_buffer_size,
810           request_handles, response_handle_buffer_size,
811           response_parameter_buffer_size);
812 #endif
813 #ifdef TPM_CC_SetPrimaryPolicy
814     case TPM_CC_SetPrimaryPolicy:
815       return Exec_SetPrimaryPolicy(tag, &request_parameter_buffer,
816                                    request_parameter_buffer_size,
817                                    request_handles, response_handle_buffer_size,
818                                    response_parameter_buffer_size);
819 #endif
820 #ifdef TPM_CC_Shutdown
821     case TPM_CC_Shutdown:
822       return Exec_Shutdown(tag, &request_parameter_buffer,
823                            request_parameter_buffer_size, request_handles,
824                            response_handle_buffer_size,
825                            response_parameter_buffer_size);
826 #endif
827 #ifdef TPM_CC_Sign
828     case TPM_CC_Sign:
829       return Exec_Sign(tag, &request_parameter_buffer,
830                        request_parameter_buffer_size, request_handles,
831                        response_handle_buffer_size,
832                        response_parameter_buffer_size);
833 #endif
834 #ifdef TPM_CC_StartAuthSession
835     case TPM_CC_StartAuthSession:
836       return Exec_StartAuthSession(tag, &request_parameter_buffer,
837                                    request_parameter_buffer_size,
838                                    request_handles, response_handle_buffer_size,
839                                    response_parameter_buffer_size);
840 #endif
841 #ifdef TPM_CC_Startup
842     case TPM_CC_Startup:
843       return Exec_Startup(tag, &request_parameter_buffer,
844                           request_parameter_buffer_size, request_handles,
845                           response_handle_buffer_size,
846                           response_parameter_buffer_size);
847 #endif
848 #ifdef TPM_CC_StirRandom
849     case TPM_CC_StirRandom:
850       return Exec_StirRandom(tag, &request_parameter_buffer,
851                              request_parameter_buffer_size, request_handles,
852                              response_handle_buffer_size,
853                              response_parameter_buffer_size);
854 #endif
855 #ifdef TPM_CC_TestParms
856     case TPM_CC_TestParms:
857       return Exec_TestParms(tag, &request_parameter_buffer,
858                             request_parameter_buffer_size, request_handles,
859                             response_handle_buffer_size,
860                             response_parameter_buffer_size);
861 #endif
862 #ifdef TPM_CC_Unseal
863     case TPM_CC_Unseal:
864       return Exec_Unseal(tag, &request_parameter_buffer,
865                          request_parameter_buffer_size, request_handles,
866                          response_handle_buffer_size,
867                          response_parameter_buffer_size);
868 #endif
869 #ifdef TPM_CC_VerifySignature
870     case TPM_CC_VerifySignature:
871       return Exec_VerifySignature(tag, &request_parameter_buffer,
872                                   request_parameter_buffer_size,
873                                   request_handles, response_handle_buffer_size,
874                                   response_parameter_buffer_size);
875 #endif
876 #ifdef TPM_CC_ZGen_2Phase
877     case TPM_CC_ZGen_2Phase:
878       return Exec_ZGen_2Phase(tag, &request_parameter_buffer,
879                               request_parameter_buffer_size, request_handles,
880                               response_handle_buffer_size,
881                               response_parameter_buffer_size);
882 #endif
883     default:
884       return TPM_RC_COMMAND_CODE;
885   }
886 }