-
Notifications
You must be signed in to change notification settings - Fork 421
Expand file tree
/
Copy pathtss2_tpm2_types.h
More file actions
2991 lines (2744 loc) · 188 KB
/
Copy pathtss2_tpm2_types.h
File metadata and controls
2991 lines (2744 loc) · 188 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* SPDX-License-Identifier: BSD-2-Clause */
/***********************************************************************;
* Copyright (c) 2015 - 2018 Intel Corporation
* All rights reserved.
***********************************************************************/
#ifndef TSS2_TPMS_TYPES_H
#define TSS2_TPMS_TYPES_H
#include "tss2_common.h"
#ifndef TSS2_API_VERSION_1_2_1_108
#error Version mismatch among TSS2 header files.
#endif /* TSS2_API_VERSION_1_2_1_108 */
#include <stdint.h>
#define TPM2_MAX_COMMAND_SIZE 4096 /* maximum size of a command */
#define TPM2_MAX_RESPONSE_SIZE 4096 /* maximum size of a response */
/* TPM constants for buffer sizes */
#define TPM2_NUM_PCR_BANKS 16
#define TPM2_MAX_DIGEST_BUFFER 1024
#define TPM2_MAX_NV_BUFFER_SIZE 2048
#define TPM2_MAX_PCRS 32
#define TPM2_MAX_ALG_LIST_SIZE 128
#define TPM2_MAX_CAP_CC 256
#define TPM2_MAX_CAP_BUFFER 1024
#define TPM2_MAX_CONTEXT_SIZE 5120
/* Hash algorithm sizes */
#define TPM2_SHA_DIGEST_SIZE 20
#define TPM2_SHA1_DIGEST_SIZE 20
#define TPM2_SHA256_DIGEST_SIZE 32
#define TPM2_SHA384_DIGEST_SIZE 48
#define TPM2_SHA512_DIGEST_SIZE 64
#define TPM2_SM3_256_DIGEST_SIZE 32
/* Encryption algorithm sizes */
#define TPM2_MAX_SYM_BLOCK_SIZE 16
#define TPM2_MAX_SYM_DATA 256
#define TPM2_MAX_ECC_KEY_BYTES 128
#define TPM2_MAX_SYM_KEY_BYTES 32
#define TPM2_MAX_RSA_KEY_BYTES 512
/* Capability buffer sizes*/
#define TPM2_LABEL_MAX_BUFFER 32
#define TPM2_PCR_SELECT_MAX ((TPM2_MAX_PCRS + 7) / 8)
#define TPM2_MAX_CAP_HANDLES \
((TPM2_MAX_CAP_BUFFER - sizeof(TPM2_CAP) - sizeof(UINT32)) / sizeof(TPM2_HANDLE))
#define TPM2_MAX_CAP_ALGS \
((TPM2_MAX_CAP_BUFFER - sizeof(TPM2_CAP) - sizeof(UINT32)) / sizeof(TPMS_ALG_PROPERTY))
#define TPM2_MAX_TPM_PROPERTIES \
((TPM2_MAX_CAP_BUFFER - sizeof(TPM2_CAP) - sizeof(UINT32)) / sizeof(TPMS_TAGGED_PROPERTY))
#define TPM2_MAX_PCR_PROPERTIES \
((TPM2_MAX_CAP_BUFFER - sizeof(TPM2_CAP) - sizeof(UINT32)) / sizeof(TPMS_TAGGED_PCR_SELECT))
#define TPM2_MAX_ECC_CURVES \
((TPM2_MAX_CAP_BUFFER - sizeof(TPM2_CAP) - sizeof(UINT32)) / sizeof(TPM2_ECC_CURVE))
#define TPM2_MAX_TAGGED_POLICIES \
((TPM2_MAX_CAP_BUFFER - sizeof(TPM2_CAP) - sizeof(UINT32)) / sizeof(TPMS_TAGGED_POLICY))
#define TPM2_MAX_ACT_DATA \
((TPM2_MAX_CAP_BUFFER - sizeof(TPM2_CAP) - sizeof(UINT32)) / sizeof(TPMS_ACT_DATA))
#define TPM2_PRIVATE_VENDOR_SPECIFIC_BYTES ((TPM2_MAX_RSA_KEY_BYTES / 2) * (3 + 2))
/* Vendor Specific Defines */
#ifndef DISABLE_VENDOR
#define TPM2_MAX_PTT_PROPERTIES (TPM2_MAX_CAP_BUFFER / sizeof(UINT32))
#endif
/* Attached Component Capabilities */
#define TPM2_MAX_AC_CAPABILITIES (TPM2_MAX_CAP_BUFFER / sizeof(TPMS_AC_OUTPUT))
/* From TCG Algorithm Registry: Definition of TPM2_ALG_ID Constants */
typedef UINT16 TPM2_ALG_ID;
#define TPM2_ALG_ERROR ((TPM2_ALG_ID)0x0000)
#define TPM2_ALG_RSA ((TPM2_ALG_ID)0x0001)
#define TPM2_ALG_TDES ((TPM2_ALG_ID)0x0003)
#define TPM2_ALG_SHA ((TPM2_ALG_ID)0x0004)
#define TPM2_ALG_SHA1 ((TPM2_ALG_ID)0x0004)
#define TPM2_ALG_HMAC ((TPM2_ALG_ID)0x0005)
#define TPM2_ALG_AES ((TPM2_ALG_ID)0x0006)
#define TPM2_ALG_MGF1 ((TPM2_ALG_ID)0x0007)
#define TPM2_ALG_KEYEDHASH ((TPM2_ALG_ID)0x0008)
#define TPM2_ALG_XOR ((TPM2_ALG_ID)0x000A)
#define TPM2_ALG_SHA256 ((TPM2_ALG_ID)0x000B)
#define TPM2_ALG_SHA384 ((TPM2_ALG_ID)0x000C)
#define TPM2_ALG_SHA512 ((TPM2_ALG_ID)0x000D)
#define TPM2_ALG_NULL ((TPM2_ALG_ID)0x0010)
#define TPM2_ALG_SM3_256 ((TPM2_ALG_ID)0x0012)
#define TPM2_ALG_SM4 ((TPM2_ALG_ID)0x0013)
#define TPM2_ALG_RSASSA ((TPM2_ALG_ID)0x0014)
#define TPM2_ALG_RSAES ((TPM2_ALG_ID)0x0015)
#define TPM2_ALG_RSAPSS ((TPM2_ALG_ID)0x0016)
#define TPM2_ALG_OAEP ((TPM2_ALG_ID)0x0017)
#define TPM2_ALG_ECDSA ((TPM2_ALG_ID)0x0018)
#define TPM2_ALG_ECDH ((TPM2_ALG_ID)0x0019)
#define TPM2_ALG_ECDAA ((TPM2_ALG_ID)0x001A)
#define TPM2_ALG_SM2 ((TPM2_ALG_ID)0x001B)
#define TPM2_ALG_ECSCHNORR ((TPM2_ALG_ID)0x001C)
#define TPM2_ALG_ECMQV ((TPM2_ALG_ID)0x001D)
#define TPM2_ALG_KDF1_SP800_56A ((TPM2_ALG_ID)0x0020)
#define TPM2_ALG_KDF2 ((TPM2_ALG_ID)0x0021)
#define TPM2_ALG_KDF1_SP800_108 ((TPM2_ALG_ID)0x0022)
#define TPM2_ALG_ECC ((TPM2_ALG_ID)0x0023)
#define TPM2_ALG_SYMCIPHER ((TPM2_ALG_ID)0x0025)
#define TPM2_ALG_CAMELLIA ((TPM2_ALG_ID)0x0026)
#define TPM2_ALG_CMAC ((TPM2_ALG_ID)0x003F)
#define TPM2_ALG_CTR ((TPM2_ALG_ID)0x0040)
#define TPM2_ALG_SHA3_256 ((TPM2_ALG_ID)0x0027)
#define TPM2_ALG_SHA3_384 ((TPM2_ALG_ID)0x0028)
#define TPM2_ALG_SHA3_512 ((TPM2_ALG_ID)0x0029)
#define TPM2_ALG_OFB ((TPM2_ALG_ID)0x0041)
#define TPM2_ALG_CBC ((TPM2_ALG_ID)0x0042)
#define TPM2_ALG_CFB ((TPM2_ALG_ID)0x0043)
#define TPM2_ALG_ECB ((TPM2_ALG_ID)0x0044)
#define TPM2_ALG_FIRST ((TPM2_ALG_ID)0x0001)
#define TPM2_ALG_LAST ((TPM2_ALG_ID)0x0044)
/* From TCG Algorithm Registry: Definition of TPM2_ECC_CURVE Constants */
typedef UINT16 TPM2_ECC_CURVE;
#define TPM2_ECC_NONE ((TPM2_ECC_CURVE)0x0000)
#define TPM2_ECC_NIST_P192 ((TPM2_ECC_CURVE)0x0001)
#define TPM2_ECC_NIST_P224 ((TPM2_ECC_CURVE)0x0002)
#define TPM2_ECC_NIST_P256 ((TPM2_ECC_CURVE)0x0003)
#define TPM2_ECC_NIST_P384 ((TPM2_ECC_CURVE)0x0004)
#define TPM2_ECC_NIST_P521 ((TPM2_ECC_CURVE)0x0005)
#define TPM2_ECC_BN_P256 ((TPM2_ECC_CURVE)0x0010)
#define TPM2_ECC_BN_P638 ((TPM2_ECC_CURVE)0x0011)
#define TPM2_ECC_SM2_P256 ((TPM2_ECC_CURVE)0x0020)
/* From TPM 2.0 Part 2: Definition of TPM2_CC Constants */
typedef UINT32 TPM2_CC;
#define TPM2_CC_NV_UndefineSpaceSpecial ((TPM2_CC)0x0000011f)
#define TPM2_CC_FIRST TPM2_CC_NV_UndefineSpaceSpecial
#define TPM2_CC_EvictControl ((TPM2_CC)0x00000120)
#define TPM2_CC_HierarchyControl ((TPM2_CC)0x00000121)
#define TPM2_CC_NV_UndefineSpace ((TPM2_CC)0x00000122)
#define TPM2_CC_ChangeEPS ((TPM2_CC)0x00000124)
#define TPM2_CC_ChangePPS ((TPM2_CC)0x00000125)
#define TPM2_CC_Clear ((TPM2_CC)0x00000126)
#define TPM2_CC_ClearControl ((TPM2_CC)0x00000127)
#define TPM2_CC_ClockSet ((TPM2_CC)0x00000128)
#define TPM2_CC_HierarchyChangeAuth ((TPM2_CC)0x00000129)
#define TPM2_CC_NV_DefineSpace ((TPM2_CC)0x0000012a)
#define TPM2_CC_PCR_Allocate ((TPM2_CC)0x0000012b)
#define TPM2_CC_PCR_SetAuthPolicy ((TPM2_CC)0x0000012c)
#define TPM2_CC_PP_Commands ((TPM2_CC)0x0000012d)
#define TPM2_CC_SetPrimaryPolicy ((TPM2_CC)0x0000012e)
#define TPM2_CC_FieldUpgradeStart ((TPM2_CC)0x0000012f)
#define TPM2_CC_ClockRateAdjust ((TPM2_CC)0x00000130)
#define TPM2_CC_CreatePrimary ((TPM2_CC)0x00000131)
#define TPM2_CC_NV_GlobalWriteLock ((TPM2_CC)0x00000132)
#define TPM2_CC_GetCommandAuditDigest ((TPM2_CC)0x00000133)
#define TPM2_CC_NV_Increment ((TPM2_CC)0x00000134)
#define TPM2_CC_NV_SetBits ((TPM2_CC)0x00000135)
#define TPM2_CC_NV_Extend ((TPM2_CC)0x00000136)
#define TPM2_CC_NV_Write ((TPM2_CC)0x00000137)
#define TPM2_CC_NV_WriteLock ((TPM2_CC)0x00000138)
#define TPM2_CC_DictionaryAttackLockReset ((TPM2_CC)0x00000139)
#define TPM2_CC_DictionaryAttackParameters ((TPM2_CC)0x0000013a)
#define TPM2_CC_NV_ChangeAuth ((TPM2_CC)0x0000013b)
#define TPM2_CC_PCR_Event ((TPM2_CC)0x0000013c)
#define TPM2_CC_PCR_Reset ((TPM2_CC)0x0000013d)
#define TPM2_CC_SequenceComplete ((TPM2_CC)0x0000013e)
#define TPM2_CC_SetAlgorithmSet ((TPM2_CC)0x0000013f)
#define TPM2_CC_SetCommandCodeAuditStatus ((TPM2_CC)0x00000140)
#define TPM2_CC_FieldUpgradeData ((TPM2_CC)0x00000141)
#define TPM2_CC_IncrementalSelfTest ((TPM2_CC)0x00000142)
#define TPM2_CC_SelfTest ((TPM2_CC)0x00000143)
#define TPM2_CC_Startup ((TPM2_CC)0x00000144)
#define TPM2_CC_Shutdown ((TPM2_CC)0x00000145)
#define TPM2_CC_StirRandom ((TPM2_CC)0x00000146)
#define TPM2_CC_ActivateCredential ((TPM2_CC)0x00000147)
#define TPM2_CC_Certify ((TPM2_CC)0x00000148)
#define TPM2_CC_PolicyNV ((TPM2_CC)0x00000149)
#define TPM2_CC_CertifyCreation ((TPM2_CC)0x0000014a)
#define TPM2_CC_Duplicate ((TPM2_CC)0x0000014b)
#define TPM2_CC_GetTime ((TPM2_CC)0x0000014c)
#define TPM2_CC_GetSessionAuditDigest ((TPM2_CC)0x0000014d)
#define TPM2_CC_NV_Read ((TPM2_CC)0x0000014e)
#define TPM2_CC_NV_ReadLock ((TPM2_CC)0x0000014f)
#define TPM2_CC_ObjectChangeAuth ((TPM2_CC)0x00000150)
#define TPM2_CC_PolicySecret ((TPM2_CC)0x00000151)
#define TPM2_CC_Rewrap ((TPM2_CC)0x00000152)
#define TPM2_CC_Create ((TPM2_CC)0x00000153)
#define TPM2_CC_ECDH_ZGen ((TPM2_CC)0x00000154)
#define TPM2_CC_HMAC ((TPM2_CC)0x00000155)
#define TPM2_CC_MAC ((TPM2_CC)0x00000155)
#define TPM2_CC_Import ((TPM2_CC)0x00000156)
#define TPM2_CC_Load ((TPM2_CC)0x00000157)
#define TPM2_CC_Quote ((TPM2_CC)0x00000158)
#define TPM2_CC_RSA_Decrypt ((TPM2_CC)0x00000159)
#define TPM2_CC_HMAC_Start ((TPM2_CC)0x0000015b)
#define TPM2_CC_MAC_Start ((TPM2_CC)0x0000015b)
#define TPM2_CC_SequenceUpdate ((TPM2_CC)0x0000015c)
#define TPM2_CC_Sign ((TPM2_CC)0x0000015d)
#define TPM2_CC_Unseal ((TPM2_CC)0x0000015e)
#define TPM2_CC_PolicySigned ((TPM2_CC)0x00000160)
#define TPM2_CC_ContextLoad ((TPM2_CC)0x00000161)
#define TPM2_CC_ContextSave ((TPM2_CC)0x00000162)
#define TPM2_CC_ECDH_KeyGen ((TPM2_CC)0x00000163)
#define TPM2_CC_EncryptDecrypt ((TPM2_CC)0x00000164)
#define TPM2_CC_FlushContext ((TPM2_CC)0x00000165)
#define TPM2_CC_LoadExternal ((TPM2_CC)0x00000167)
#define TPM2_CC_MakeCredential ((TPM2_CC)0x00000168)
#define TPM2_CC_NV_ReadPublic ((TPM2_CC)0x00000169)
#define TPM2_CC_PolicyAuthorize ((TPM2_CC)0x0000016a)
#define TPM2_CC_PolicyAuthValue ((TPM2_CC)0x0000016b)
#define TPM2_CC_PolicyCommandCode ((TPM2_CC)0x0000016c)
#define TPM2_CC_PolicyCounterTimer ((TPM2_CC)0x0000016d)
#define TPM2_CC_PolicyCpHash ((TPM2_CC)0x0000016e)
#define TPM2_CC_PolicyLocality ((TPM2_CC)0x0000016f)
#define TPM2_CC_PolicyNameHash ((TPM2_CC)0x00000170)
#define TPM2_CC_PolicyOR ((TPM2_CC)0x00000171)
#define TPM2_CC_PolicyTicket ((TPM2_CC)0x00000172)
#define TPM2_CC_ReadPublic ((TPM2_CC)0x00000173)
#define TPM2_CC_RSA_Encrypt ((TPM2_CC)0x00000174)
#define TPM2_CC_StartAuthSession ((TPM2_CC)0x00000176)
#define TPM2_CC_VerifySignature ((TPM2_CC)0x00000177)
#define TPM2_CC_ECC_Parameters ((TPM2_CC)0x00000178)
#define TPM2_CC_FirmwareRead ((TPM2_CC)0x00000179)
#define TPM2_CC_GetCapability ((TPM2_CC)0x0000017a)
#define TPM2_CC_GetRandom ((TPM2_CC)0x0000017b)
#define TPM2_CC_GetTestResult ((TPM2_CC)0x0000017c)
#define TPM2_CC_Hash ((TPM2_CC)0x0000017d)
#define TPM2_CC_PCR_Read ((TPM2_CC)0x0000017e)
#define TPM2_CC_PolicyPCR ((TPM2_CC)0x0000017f)
#define TPM2_CC_PolicyRestart ((TPM2_CC)0x00000180)
#define TPM2_CC_ReadClock ((TPM2_CC)0x00000181)
#define TPM2_CC_PCR_Extend ((TPM2_CC)0x00000182)
#define TPM2_CC_PCR_SetAuthValue ((TPM2_CC)0x00000183)
#define TPM2_CC_NV_Certify ((TPM2_CC)0x00000184)
#define TPM2_CC_EventSequenceComplete ((TPM2_CC)0x00000185)
#define TPM2_CC_HashSequenceStart ((TPM2_CC)0x00000186)
#define TPM2_CC_PolicyPhysicalPresence ((TPM2_CC)0x00000187)
#define TPM2_CC_PolicyDuplicationSelect ((TPM2_CC)0x00000188)
#define TPM2_CC_PolicyGetDigest ((TPM2_CC)0x00000189)
#define TPM2_CC_TestParms ((TPM2_CC)0x0000018a)
#define TPM2_CC_Commit ((TPM2_CC)0x0000018b)
#define TPM2_CC_PolicyPassword ((TPM2_CC)0x0000018c)
#define TPM2_CC_ZGen_2Phase ((TPM2_CC)0x0000018d)
#define TPM2_CC_EC_Ephemeral ((TPM2_CC)0x0000018e)
#define TPM2_CC_PolicyNvWritten ((TPM2_CC)0x0000018f)
#define TPM2_CC_PolicyTemplate ((TPM2_CC)0x00000190)
#define TPM2_CC_CreateLoaded ((TPM2_CC)0x00000191)
#define TPM2_CC_PolicyAuthorizeNV ((TPM2_CC)0x00000192)
#define TPM2_CC_EncryptDecrypt2 ((TPM2_CC)0x00000193)
#define TPM2_CC_AC_GetCapability ((TPM2_CC)0x00000194)
#define TPM2_CC_AC_Send ((TPM2_CC)0x00000195)
#define TPM2_CC_Policy_AC_SendSelect ((TPM2_CC)0x00000196)
#define TPM2_CC_CertifyX509 ((TPM2_CC)0x00000197)
#define TPM2_CC_ACT_SetTimeout ((TPM2_CC)0x00000198)
#define TPM2_CC_ECC_Encrypt ((TPM2_CC)0x00000199)
#define TPM2_CC_ECC_Decrypt ((TPM2_CC)0x0000019a)
#define TPM2_CC_LAST ((TPM2_CC)0x0000019a)
#define TPM2_CC_Vendor_TCG_Test ((TPM2_CC)0x20000000)
/* Definition of Types for Documentation Clarity */
typedef UINT32 TPM2_ALGORITHM_ID; /* this is the 1.2 compatible form of the TPM2_ALG_ID */
typedef UINT32 TPM2_MODIFIER_INDICATOR;
typedef UINT32 TPM2_AUTHORIZATION_SIZE; /* the authorizationSize parameter in a command */
typedef UINT32 TPM2_PARAMETER_SIZE; /* the parameterSize parameter in a command */
typedef UINT16 TPM2_KEY_SIZE; /* a key size in octets */
typedef UINT16 TPM2_KEY_BITS; /* a key size in bits */
/* Definition of UINT32 TPM2_SPEC Constants <> */
typedef UINT32 TPM2_SPEC;
#define TPM2_SPEC_FAMILY ((TPM2_SPEC)0x322E3000) /* ASCII 2.0 with null terminator */
#define TPM2_SPEC_LEVEL ((TPM2_SPEC)00) /* the level number for the specification */
#define TPM2_SPEC_VERSION ((TPM2_SPEC)159) /* the version number of the spec 001.26 * 100 */
#define TPM2_SPEC_YEAR ((TPM2_SPEC)2019) /* the year of the version */
#define TPM2_SPEC_DAY_OF_YEAR ((TPM2_SPEC)312) /* the day of the year August 21 2015 */
/* Definition of UINT32 TPM2_GENERATED Constants <O> */
typedef UINT32 TPM2_GENERATED;
#define TPM2_GENERATED_VALUE ((TPM2_GENERATED)(0xff544347)) /* 0xFF TCG FF 54 43 4716 */
/* Definition of UINT32 TPM2_RC Constants Actions <OUT> */
typedef UINT32 TPM2_RC;
#define TPM2_RC_SUCCESS ((TPM2_RC)0x000)
#define TPM2_RC_BAD_TAG ((TPM2_RC)0x01E) /* defined for compatibility with TPM 1.2 */
#define TPM2_RC_VER1 ((TPM2_RC)0x100) /* set for all format 0 response codes */
#define TPM2_RC_INITIALIZE \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x000)) /* TPM not initialized by TPM2_Startup or already initialized */
#define TPM2_RC_FAILURE \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x001)) /* commands not being accepted because of a TPM failure. NOTE This may be \
returned by TPM2_GetTestResult as the testResult parameter. */
#define TPM2_RC_SEQUENCE ((TPM2_RC)(TPM2_RC_VER1 + 0x003)) /* improper use of a sequence handle */
#define TPM2_RC_PRIVATE ((TPM2_RC)(TPM2_RC_VER1 + 0x00B)) /* not currently used */
#define TPM2_RC_HMAC ((TPM2_RC)(TPM2_RC_VER1 + 0x019)) /* not currently used */
#define TPM2_RC_DISABLED ((TPM2_RC)(TPM2_RC_VER1 + 0x020)) /* the command is disabled */
#define TPM2_RC_EXCLUSIVE \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x021)) /* command failed because audit sequence required exclusivity */
#define TPM2_RC_AUTH_TYPE \
((TPM2_RC)(TPM2_RC_VER1 + 0x024)) /* authorization handle is not correct for command */
#define TPM2_RC_AUTH_MISSING \
((TPM2_RC)(TPM2_RC_VER1 + 0x025)) /* command requires an authorization session for handle and \
it is not present. */
#define TPM2_RC_POLICY \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x026)) /* policy failure in math operation or an invalid authPolicy value */
#define TPM2_RC_PCR ((TPM2_RC)(TPM2_RC_VER1 + 0x027)) /* PCR check fail */
#define TPM2_RC_PCR_CHANGED \
((TPM2_RC)(TPM2_RC_VER1 + 0x028)) /* PCR have changed since checked. \
*/
#define TPM2_RC_UPGRADE \
((TPM2_RC)(TPM2_RC_VER1 + 0x02D)) /* For all commands, other than TPM2_FieldUpgradeData, this \
code indicates that the TPM is in field upgrade mode. For \
TPM2_FieldUpgradeData, this code indicates that the TPM \
is not in field upgrade mode */
#define TPM2_RC_TOO_MANY_CONTEXTS \
((TPM2_RC)(TPM2_RC_VER1 + 0x02E)) /* context ID counter is at maximum. */
#define TPM2_RC_AUTH_UNAVAILABLE \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x02F)) /* authValue or authPolicy is not available for selected entity. */
#define TPM2_RC_REBOOT \
((TPM2_RC)(TPM2_RC_VER1 + 0x030)) /* a _TPM_Init and StartupCLEAR is required before the TPM \
can resume operation. */
#define TPM2_RC_UNBALANCED \
((TPM2_RC)(TPM2_RC_VER1 + 0x031)) /* the protection algorithms hash and symmetric are not \
reasonably balanced. The digest size of the hash must be \
larger than the key size of the symmetric algorithm. */
#define TPM2_RC_COMMAND_SIZE \
((TPM2_RC)(TPM2_RC_VER1 + 0x042)) /* command commandSize value is inconsistent with contents \
of the command buffer. Either the size is not the same as \
the octets loaded by the hardware interface layer or the \
value is not large enough to hold a command header */
#define TPM2_RC_COMMAND_CODE ((TPM2_RC)(TPM2_RC_VER1 + 0x043)) /* command code not supported */
#define TPM2_RC_AUTHSIZE \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x044)) /* the value of authorizationSize is out of range or the number of octets \
in the Authorization Area is greater than required */
#define TPM2_RC_AUTH_CONTEXT \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x045)) /* use of an authorization session with a context command or another \
command that cannot have an authorization session. */
#define TPM2_RC_NV_RANGE ((TPM2_RC)(TPM2_RC_VER1 + 0x046)) /* NV offset+size is out of range. */
#define TPM2_RC_NV_SIZE \
((TPM2_RC)(TPM2_RC_VER1 + 0x047)) /* Requested allocation size is larger than allowed. */
#define TPM2_RC_NV_LOCKED ((TPM2_RC)(TPM2_RC_VER1 + 0x048)) /* NV access locked. */
#define TPM2_RC_NV_AUTHORIZATION \
((TPM2_RC)(TPM2_RC_VER1 + 0x049)) /* NV access authorization fails in command actions this \
failure does not affect lockout.action */
#define TPM2_RC_NV_UNINITIALIZED \
((TPM2_RC)(TPM2_RC_VER1 + 0x04A)) /* an NV Index is used before being initialized or the state \
saved by TPM2_ShutdownSTATE could not be restored */
#define TPM2_RC_NV_SPACE \
((TPM2_RC)(TPM2_RC_VER1 + 0x04B)) /* insufficient space for NV allocation */
#define TPM2_RC_NV_DEFINED \
((TPM2_RC)(TPM2_RC_VER1 + 0x04C)) /* NV Index or persistent object already defined */
#define TPM2_RC_BAD_CONTEXT \
((TPM2_RC)(TPM2_RC_VER1 + 0x050)) /* context in TPM2_ContextLoad is not valid */
#define TPM2_RC_CPHASH \
((TPM2_RC)(TPM2_RC_VER1 + 0x051)) /* cpHash value already set or not correct for use */
#define TPM2_RC_PARENT \
((TPM2_RC)(TPM2_RC_VER1 + 0x052)) /* handle for parent is not a valid parent */
#define TPM2_RC_NEEDS_TEST ((TPM2_RC)(TPM2_RC_VER1 + 0x053)) /* some function needs testing. */
#define TPM2_RC_NO_RESULT \
((TPM2_RC)(TPM2_RC_VER1 + 0x054)) /* returned when an internal function cannot process a \
request due to an unspecified problem. This code is \
usually related to invalid parameters that are not \
properly filtered by the input unmarshaling code. */
#define TPM2_RC_SENSITIVE \
((TPM2_RC)(TPM2_RC_VER1 \
+ 0x055)) /* the sensitive area did not unmarshal correctly after decryption. This \
code is used in lieu of the other unmarshaling errors so that an \
attacker cannot determine where the unmarshaling error occurred */
#define TPM2_RC_MAX_FM0 \
((TPM2_RC)(TPM2_RC_VER1 + 0x07F)) /* largest version 1 code that is not a warning */
#define TPM2_RC_FMT1 \
((TPM2_RC)0x080) /* This bit is SET in all format 1 response codes. The codes in this group \
may have a value added to them to indicate the handle session or parameter \
to which they apply. */
#define TPM2_RC_ASYMMETRIC \
((TPM2_RC)(TPM2_RC_FMT1 + 0x001)) /* asymmetric algorithm not supported or not correct */
#define TPM2_RC_ATTRIBUTES ((TPM2_RC)(TPM2_RC_FMT1 + 0x002)) /* inconsistent attributes */
#define TPM2_RC_HASH \
((TPM2_RC)(TPM2_RC_FMT1 + 0x003)) /* hash algorithm not supported or not appropriate */
#define TPM2_RC_VALUE \
((TPM2_RC)(TPM2_RC_FMT1 + 0x004)) /* value is out of range or is not correct for the context \
*/
#define TPM2_RC_HIERARCHY \
((TPM2_RC)(TPM2_RC_FMT1 + 0x005)) /* hierarchy is not enabled or is not correct for the use */
#define TPM2_RC_KEY_SIZE ((TPM2_RC)(TPM2_RC_FMT1 + 0x007)) /* key size is not supported */
#define TPM2_RC_MGF ((TPM2_RC)(TPM2_RC_FMT1 + 0x008)) /* mask generation function not supported */
#define TPM2_RC_MODE ((TPM2_RC)(TPM2_RC_FMT1 + 0x009)) /* mode of operation not supported */
#define TPM2_RC_TYPE \
((TPM2_RC)(TPM2_RC_FMT1 + 0x00A)) /* the type of the value is not appropriate for the use */
#define TPM2_RC_HANDLE \
((TPM2_RC)(TPM2_RC_FMT1 + 0x00B)) /* the handle is not correct for the use \
*/
#define TPM2_RC_KDF \
((TPM2_RC)(TPM2_RC_FMT1 + 0x00C)) /* unsupported key derivation function or function not \
appropriate for use */
#define TPM2_RC_RANGE ((TPM2_RC)(TPM2_RC_FMT1 + 0x00D)) /* value was out of allowed range. */
#define TPM2_RC_AUTH_FAIL \
((TPM2_RC)(TPM2_RC_FMT1 \
+ 0x00E)) /* the authorization HMAC check failed and DA counter incremented */
#define TPM2_RC_NONCE \
((TPM2_RC)(TPM2_RC_FMT1 + 0x00F)) /* invalid nonce size or nonce value mismatch */
#define TPM2_RC_PP ((TPM2_RC)(TPM2_RC_FMT1 + 0x010)) /* authorization requires assertion of PP */
#define TPM2_RC_SCHEME ((TPM2_RC)(TPM2_RC_FMT1 + 0x012)) /* unsupported or incompatible scheme */
#define TPM2_RC_SIZE ((TPM2_RC)(TPM2_RC_FMT1 + 0x015)) /* structure is the wrong size */
#define TPM2_RC_SYMMETRIC \
((TPM2_RC)(TPM2_RC_FMT1 + 0x016)) /* unsupported symmetric algorithm or key size or not \
appropriate for instance */
#define TPM2_RC_TAG ((TPM2_RC)(TPM2_RC_FMT1 + 0x017)) /* incorrect structure tag */
#define TPM2_RC_SELECTOR ((TPM2_RC)(TPM2_RC_FMT1 + 0x018)) /* union selector is incorrect */
#define TPM2_RC_INSUFFICIENT \
((TPM2_RC)(TPM2_RC_FMT1 + 0x01A)) /* the TPM was unable to unmarshal a value because there \
were not enough octets in the input buffer */
#define TPM2_RC_SIGNATURE ((TPM2_RC)(TPM2_RC_FMT1 + 0x01B)) /* the signature is not valid */
#define TPM2_RC_KEY \
((TPM2_RC)(TPM2_RC_FMT1 + 0x01C)) /* key fields are not compatible with the selected use */
#define TPM2_RC_POLICY_FAIL ((TPM2_RC)(TPM2_RC_FMT1 + 0x01D)) /* a policy check failed */
#define TPM2_RC_INTEGRITY ((TPM2_RC)(TPM2_RC_FMT1 + 0x01F)) /* integrity check failed */
#define TPM2_RC_TICKET ((TPM2_RC)(TPM2_RC_FMT1 + 0x020)) /* invalid ticket */
#define TPM2_RC_RESERVED_BITS \
((TPM2_RC)(TPM2_RC_FMT1 + 0x021)) /* reserved bits not set to zero as required */
#define TPM2_RC_BAD_AUTH \
((TPM2_RC)(TPM2_RC_FMT1 + 0x022)) /* authorization failure without DA implications */
#define TPM2_RC_EXPIRED ((TPM2_RC)(TPM2_RC_FMT1 + 0x023)) /* the policy has expired */
#define TPM2_RC_POLICY_CC \
((TPM2_RC)(TPM2_RC_FMT1 + 0x024)) /* the commandCode in the policy is not the commandCode of \
the command or the command code in a policy command \
references a command that is not implemented */
#define TPM2_RC_BINDING \
((TPM2_RC)(TPM2_RC_FMT1 + 0x025)) /* public and sensitive portions of an object are not \
cryptographically bound */
#define TPM2_RC_CURVE ((TPM2_RC)(TPM2_RC_FMT1 + 0x026)) /* curve not supported */
#define TPM2_RC_ECC_POINT \
((TPM2_RC)(TPM2_RC_FMT1 + 0x027)) /* point is not on the required curve. */
#define TPM2_RC_FW_LIMITED \
((TPM2_RC)(TPM2_RC_FMT1 + 0x028)) /* the command requires the firmware secret but the firmware \
secret is unavailable */
#define TPM2_RC_SVN_LIMITED \
((TPM2_RC)(TPM2_RC_FMT1 + 0x029)) /* the command requires the firmware SVN secret but the \
firmware SVN secret is unavailable */
#define TPM2_RC_WARN ((TPM2_RC)0x900) /* set for warning response codes */
#define TPM2_RC_CONTEXT_GAP \
((TPM2_RC)(TPM2_RC_WARN + 0x001)) /* gap for context ID is too large \
*/
#define TPM2_RC_OBJECT_MEMORY \
((TPM2_RC)(TPM2_RC_WARN + 0x002)) /* out of memory for object contexts */
#define TPM2_RC_SESSION_MEMORY \
((TPM2_RC)(TPM2_RC_WARN + 0x003)) /* out of memory for session contexts */
#define TPM2_RC_MEMORY \
((TPM2_RC)(TPM2_RC_WARN + 0x004)) /* out of shared objectsession memory or need space for \
internal operations */
#define TPM2_RC_SESSION_HANDLES \
((TPM2_RC)(TPM2_RC_WARN + 0x005)) /* out of session handles a session must be flushed before \
a new session may be created */
#define TPM2_RC_OBJECT_HANDLES \
((TPM2_RC)(TPM2_RC_WARN \
+ 0x006)) /* out of object handles. The handle space for objects is depleted and a \
reboot is required. NOTE This cannot occur on the reference \
implementation. NOTE There is no reason why an implementation would \
implement a design that would deplete handle space. Platform \
specifications are encouraged to forbid it. */
#define TPM2_RC_LOCALITY ((TPM2_RC)(TPM2_RC_WARN + 0x007)) /* bad locality */
#define TPM2_RC_YIELDED \
((TPM2_RC)(TPM2_RC_WARN \
+ 0x008)) /* the TPM has suspended operation on the command forward progress was \
made and the command may be retried. See TPM 2.0 Part 1 Multitasking. \
NOTE This cannot occur on the reference implementation. */
#define TPM2_RC_CANCELED ((TPM2_RC)(TPM2_RC_WARN + 0x009)) /* the command was canceled */
#define TPM2_RC_TESTING ((TPM2_RC)(TPM2_RC_WARN + 0x00A)) /* TPM is performing selftests */
#define TPM2_RC_REFERENCE_H0 \
((TPM2_RC)(TPM2_RC_WARN + 0x010)) /* the 1st handle in the handle area references a transient \
object or session that is not loaded */
#define TPM2_RC_REFERENCE_H1 \
((TPM2_RC)(TPM2_RC_WARN + 0x011)) /* the 2nd handle in the handle area references a transient \
object or session that is not loaded */
#define TPM2_RC_REFERENCE_H2 \
((TPM2_RC)(TPM2_RC_WARN + 0x012)) /* the 3rd handle in the handle area references a transient \
object or session that is not loaded */
#define TPM2_RC_REFERENCE_H3 \
((TPM2_RC)(TPM2_RC_WARN + 0x013)) /* the 4th handle in the handle area references a transient \
object or session that is not loaded */
#define TPM2_RC_REFERENCE_H4 \
((TPM2_RC)(TPM2_RC_WARN + 0x014)) /* the 5th handle in the handle area references a transient \
object or session that is not loaded */
#define TPM2_RC_REFERENCE_H5 \
((TPM2_RC)(TPM2_RC_WARN + 0x015)) /* the 6th handle in the handle area references a transient \
object or session that is not loaded */
#define TPM2_RC_REFERENCE_H6 \
((TPM2_RC)(TPM2_RC_WARN + 0x016)) /* the 7th handle in the handle area references a transient \
object or session that is not loaded */
#define TPM2_RC_REFERENCE_S0 \
((TPM2_RC)(TPM2_RC_WARN + 0x018)) /* the 1st authorization session handle references a session \
that is not loaded */
#define TPM2_RC_REFERENCE_S1 \
((TPM2_RC)(TPM2_RC_WARN + 0x019)) /* the 2nd authorization session handle references a session \
that is not loaded */
#define TPM2_RC_REFERENCE_S2 \
((TPM2_RC)(TPM2_RC_WARN + 0x01A)) /* the 3rd authorization session handle references a session \
that is not loaded */
#define TPM2_RC_REFERENCE_S3 \
((TPM2_RC)(TPM2_RC_WARN + 0x01B)) /* the 4th authorization session handle references a session \
that is not loaded */
#define TPM2_RC_REFERENCE_S4 \
((TPM2_RC)(TPM2_RC_WARN \
+ 0x01C)) /* the 5th session handle references a session that is not loaded */
#define TPM2_RC_REFERENCE_S5 \
((TPM2_RC)(TPM2_RC_WARN \
+ 0x01D)) /* the 6th session handle references a session that is not loaded */
#define TPM2_RC_REFERENCE_S6 \
((TPM2_RC)(TPM2_RC_WARN + 0x01E)) /* the 7th authorization session handle references a session \
that is not loaded */
#define TPM2_RC_NV_RATE \
((TPM2_RC)(TPM2_RC_WARN \
+ 0x020)) /* the TPM is rate limiting accesses to prevent wearout of NV */
#define TPM2_RC_LOCKOUT \
((TPM2_RC)(TPM2_RC_WARN \
+ 0x021)) /* authorizations for objects subject to DA protection are not allowed at \
this time because the TPM is in DA lockout mode */
#define TPM2_RC_RETRY \
((TPM2_RC)(TPM2_RC_WARN + 0x022)) /* the TPM was not able to start the command */
#define TPM2_RC_NV_UNAVAILABLE \
((TPM2_RC)(TPM2_RC_WARN + 0x023)) /* the command may require writing of NV and NV is not \
current accessible */
#define TPM2_RC_NOT_USED \
((TPM2_RC)(TPM2_RC_WARN \
+ 0x07F)) /* this value is reserved and shall not be returned by the TPM */
#define TPM2_RC_H ((TPM2_RC)0x000) /* add to a handle related error */
#define TPM2_RC_P ((TPM2_RC)0x040) /* add to a parameter-related error */
#define TPM2_RC_S ((TPM2_RC)0x800) /* add to a session-related error */
#define TPM2_RC_1 ((TPM2_RC)0x100) /* add to a parameter handle or session-related error */
#define TPM2_RC_2 ((TPM2_RC)0x200) /* add to a parameter handle or session-related error */
#define TPM2_RC_3 ((TPM2_RC)0x300) /* add to a parameter handle or session-related error */
#define TPM2_RC_4 ((TPM2_RC)0x400) /* add to a parameter handle or session-related error */
#define TPM2_RC_5 ((TPM2_RC)0x500) /* add to a parameter handle or session-related error */
#define TPM2_RC_6 ((TPM2_RC)0x600) /* add to a parameter handle or session-related error */
#define TPM2_RC_7 ((TPM2_RC)0x700) /* add to a parameter handle or session-related error */
#define TPM2_RC_8 ((TPM2_RC)0x800) /* add to a parameter-related error */
#define TPM2_RC_9 ((TPM2_RC)0x900) /* add to a parameter-related error */
#define TPM2_RC_A ((TPM2_RC)0xA00) /* add to a parameter-related error */
#define TPM2_RC_B ((TPM2_RC)0xB00) /* add to a parameter-related error */
#define TPM2_RC_C ((TPM2_RC)0xC00) /* add to a parameter-related error */
#define TPM2_RC_D ((TPM2_RC)0xD00) /* add to a parameter-related error */
#define TPM2_RC_E ((TPM2_RC)0xE00) /* add to a parameter-related error */
#define TPM2_RC_F ((TPM2_RC)0xF00) /* add to a parameter-related error */
#define TPM2_RC_N_MASK ((TPM2_RC)0xF00) /* number mask */
/* Definition of INT8 TPM2_CLOCK_ADJUST Constants <IN> */
typedef INT8 TPM2_CLOCK_ADJUST;
#define TPM2_CLOCK_COARSE_SLOWER \
((TPM2_CLOCK_ADJUST) - 3) /* Slow the Clock update rate by one coarse adjustment step. */
#define TPM2_CLOCK_MEDIUM_SLOWER \
((TPM2_CLOCK_ADJUST) - 2) /* Slow the Clock update rate by one medium adjustment step. */
#define TPM2_CLOCK_FINE_SLOWER \
((TPM2_CLOCK_ADJUST) - 1) /* Slow the Clock update rate by one fine adjustment step. */
#define TPM2_CLOCK_NO_CHANGE ((TPM2_CLOCK_ADJUST)0) /* No change to the Clock update rate. */
#define TPM2_CLOCK_FINE_FASTER \
((TPM2_CLOCK_ADJUST)1) /* Speed the Clock update rate by one fine adjustment step. */
#define TPM2_CLOCK_MEDIUM_FASTER \
((TPM2_CLOCK_ADJUST)2) /* Speed the Clock update rate by one medium adjustment step. */
#define TPM2_CLOCK_COARSE_FASTER \
((TPM2_CLOCK_ADJUST)3) /* Speed the Clock update rate by one coarse adjustment step. */
/* Definition of UINT16 TPM2_EO Constants <INOUT> */
typedef UINT16 TPM2_EO;
#define TPM2_EO_EQ ((TPM2_EO)0x0000) /* A B */
#define TPM2_EO_NEQ ((TPM2_EO)0x0001) /* A B */
#define TPM2_EO_SIGNED_GT ((TPM2_EO)0x0002) /* A > B signed */
#define TPM2_EO_UNSIGNED_GT ((TPM2_EO)0x0003) /* A > B unsigned */
#define TPM2_EO_SIGNED_LT ((TPM2_EO)0x0004) /* A < B signed */
#define TPM2_EO_UNSIGNED_LT ((TPM2_EO)0x0005) /* A < B unsigned */
#define TPM2_EO_SIGNED_GE ((TPM2_EO)0x0006) /* A B signed */
#define TPM2_EO_UNSIGNED_GE ((TPM2_EO)0x0007) /* A B unsigned */
#define TPM2_EO_SIGNED_LE ((TPM2_EO)0x0008) /* A B signed */
#define TPM2_EO_UNSIGNED_LE ((TPM2_EO)0x0009) /* A B unsigned */
#define TPM2_EO_BITSET ((TPM2_EO)0x000A) /* All bits SET in B are SET in A. ABB */
#define TPM2_EO_BITCLEAR ((TPM2_EO)0x000B) /* All bits SET in B are CLEAR in A. AB0 */
/* Definition of UINT16 TPM2_ST Constants <INOUT S> */
typedef UINT16 TPM2_ST;
#define TPM2_ST_RSP_COMMAND \
((TPM2_ST)0x00C4) /* Tag value for a response used when there is an error in the tag. This is \
also the value returned from a TPM 1.2 when an error occurs. This value \
is used in this specification because an error in the command tag may \
prevent determination of the family. When this tag is used in the \
response the response code will be TPM2_RC_BAD_TAG 0 1E16 which has the \
same numeric value as the TPM 1.2 response code for TPM_BADTAG. NOTE In a \
previously published version of this specification TPM2_RC_BAD_TAG was \
incorrectly assigned a value of 0x030 instead of 30 0x01e. Some \
implementations my return the old value instead of the new value. */
#define TPM2_ST_NULL ((TPM2_ST)0X8000) /* no structure type specified */
#define TPM2_ST_NO_SESSIONS \
((TPM2_ST)0x8001) /* tag value for a command response for a command defined in this \
specification indicating that the command response has no attached \
sessions and no authorizationSizeparameterSize value is present. If the \
responseCode from the TPM is not TPM2_RC_SUCCESS then the response tag \
shall have this value. */
#define TPM2_ST_SESSIONS \
((TPM2_ST)0x8002) /* tag value for a command response for a command defined in this \
specification indicating that the command response has one or more \
attached sessions and the authorizationSizeparameterSize field is present \
*/
#define TPM2_ST_RESERVED1 \
((TPM2_ST)0x8003) /* When used between application software and the TPM resource manager, this \
tag indicates that the command has no sessions and the handles are using \
the Name format rather than the 32-bit handle format. NOTE 1 The response \
to application software will have a tag of TPM2_ST_NO_SESSIONS. Between \
the TRM and TPM, this tag would occur in a response from a TPM that \
overlaps the tag parameter of a request with the tag parameter of a \
response when the response has no associated sessions. NOTE 2 This tag is \
not used by all TPM or TRM implementations. */
#define TPM2_ST_RESERVED2 \
((TPM2_ST)0x8004) /* When used between application software and the TPM resource manager. This \
tag indicates that the command has sessions and the handles are using the \
Name format rather than the 32-bit handle format. NOTE 1 If the command \
completes successfully the response to application software will have a \
tag of TPM2_ST_SESSIONS. Between the TRM and TPM would occur in a \
response from a TPM that overlaps the tag parameter of a request with the \
tag parameter of a response when the response has authorization sessions. \
NOTE 2 This tag is not used by all TPM or TRM implementations. */
#define TPM2_ST_ATTEST_NV ((TPM2_ST)0x8014) /* tag for an attestation structure */
#define TPM2_ST_ATTEST_COMMAND_AUDIT ((TPM2_ST)0x8015) /* tag for an attestation structure */
#define TPM2_ST_ATTEST_SESSION_AUDIT ((TPM2_ST)0x8016) /* tag for an attestation structure */
#define TPM2_ST_ATTEST_CERTIFY ((TPM2_ST)0x8017) /* tag for an attestation structure */
#define TPM2_ST_ATTEST_QUOTE ((TPM2_ST)0x8018) /* tag for an attestation structure */
#define TPM2_ST_ATTEST_TIME ((TPM2_ST)0x8019) /* tag for an attestation structure */
#define TPM2_ST_ATTEST_CREATION ((TPM2_ST)0x801A) /* tag for an attestation structure */
#define TPM2_ST_RESERVED3 \
((TPM2_ST)0x801B) /* do not use . NOTE This was previously assigned to TPM2_ST_ATTEST_NV. The \
tag is changed because the structure has changed */
#define TPM2_ST_ATTEST_NV_DIGEST ((TPM2_ST)0x801C) /* tag for an attestation structure */
#define TPM2_ST_CREATION ((TPM2_ST)0x8021) /* tag for a ticket type */
#define TPM2_ST_VERIFIED ((TPM2_ST)0x8022) /* tag for a ticket type */
#define TPM2_ST_AUTH_SECRET ((TPM2_ST)0x8023) /* tag for a ticket type */
#define TPM2_ST_HASHCHECK ((TPM2_ST)0x8024) /* tag for a ticket type */
#define TPM2_ST_AUTH_SIGNED ((TPM2_ST)0x8025) /* tag for a ticket type */
#define TPM2_ST_FU_MANIFEST \
((TPM2_ST)0x8029) /* tag for a structure describing a Field Upgrade Policy */
/* Definition of UINT16 TPM2_SU Constants <IN> */
typedef UINT16 TPM2_SU;
#define TPM2_SU_CLEAR \
((TPM2_SU)0x0000) /* On TPM2_Shutdown indicates that the TPM should prepare for loss of power \
and save state required for an orderly startup TPM Reset. On TPM2_Startup \
indicates that the TPM should perform TPM Reset or TPM Restart */
#define TPM2_SU_STATE \
((TPM2_SU)0x0001) /* On TPM2_Shutdown indicates that the TPM should prepare for loss of power \
and save state required for an orderly startup. TPM Restart or TPM Resume \
on TPM2_Startup indicates that the TPM should restore the state saved by \
TPM2_Shutdown TPM2_SU_STATE */
/* Definition of UINT8 TPM2_SE Constants <IN> */
typedef UINT8 TPM2_SE;
#define TPM2_SE_HMAC ((TPM2_SE)0x00)
#define TPM2_SE_POLICY ((TPM2_SE)0x01)
#define TPM2_SE_TRIAL \
((TPM2_SE)0x03) /* The policy session is being used to compute the policyHash and not for \
command authorization.This setting modifies some policy commands and \
prevents session from being used to authorize a command. */
/* Definition of UINT32 TPM2_CAP Constants */
typedef UINT32 TPM2_CAP;
#define TPM2_CAP_FIRST ((TPM2_CAP)0x00000000)
#define TPM2_CAP_ALGS ((TPM2_CAP)0x00000000) /* TPM2_ALG_ID1 */
#define TPM2_CAP_HANDLES ((TPM2_CAP)0x00000001) /* TPM2_HANDLE */
#define TPM2_CAP_COMMANDS ((TPM2_CAP)0x00000002) /* TPM2_CC */
#define TPM2_CAP_PP_COMMANDS ((TPM2_CAP)0x00000003) /* TPM2_CC */
#define TPM2_CAP_AUDIT_COMMANDS ((TPM2_CAP)0x00000004) /* TPM2_CC */
#define TPM2_CAP_PCRS ((TPM2_CAP)0x00000005) /* reserved */
#define TPM2_CAP_TPM_PROPERTIES ((TPM2_CAP)0x00000006) /* TPM2_PT */
#define TPM2_CAP_PCR_PROPERTIES ((TPM2_CAP)0x00000007) /* TPM2_PT_PCR */
#define TPM2_CAP_ECC_CURVES ((TPM2_CAP)0x00000008) /* TPM2_ECC_CURVE1 */
#define TPM2_CAP_AUTH_POLICIES ((TPM2_CAP)0x00000009) /* TPM2_HANDLE */
#define TPM2_CAP_ACT ((TPM2_CAP)0x0000000A) /* TPM2_HANDLE */
#define TPM2_CAP_LAST ((TPM2_CAP)0x0000000A)
#define TPM2_CAP_VENDOR_PROPERTY ((TPM2_CAP)0x00000100) /* manufacturer specific */
/* Definition of UINT32 TPM2_PT Constants <INOUT S> */
typedef UINT32 TPM2_PT;
#define TPM2_PT_NONE ((TPM2_PT)0x00000000) /* indicates no property type */
#define TPM2_PT_GROUP \
((TPM2_PT)0x00000100) /* The number of properties in each group. NOTE The first group with any \
properties is group 1 TPM2_PT_GROUP * 1. Group 0 is reserved. */
#define TPM2_PT_FIXED \
((TPM2_PT)(TPM2_PT_GROUP \
* 1)) /* the group of fixed properties returned as TPMS_TAGGED_PROPERTY. The values \
in this group are only changed due to a firmware change in the TPM. */
#define TPM2_PT_FAMILY_INDICATOR \
((TPM2_PT)(TPM2_PT_FIXED + 0)) /* a 4-octet character string containing the TPM Family value \
TPM2_SPEC_FAMILY */
#define TPM2_PT_LEVEL \
((TPM2_PT)(TPM2_PT_FIXED \
+ 1)) /* the level of the specification. NOTE 1 For this specification the level is \
zero. NOTE 2 The level is on the title page of the specification. */
#define TPM2_PT_REVISION \
((TPM2_PT)(TPM2_PT_FIXED + 2)) /* the specification Revision times 100. EXAMPLE Revision 01.01 \
would have a value of 101. NOTE The Revision value is on the \
title page of the specification. */
#define TPM2_PT_DAY_OF_YEAR \
((TPM2_PT)(TPM2_PT_FIXED \
+ 3)) /* the specification day of year using TCG calendar. EXAMPLE November 15 2010 \
has a day of year value of 319 00 00 01 3F16. NOTE The specification date \
is on the title page of the specification. */
#define TPM2_PT_YEAR \
((TPM2_PT)(TPM2_PT_FIXED + 4)) /* the specification year using the CE. EXAMPLE The year 2010 \
has a value of 00 00 07 DA16. NOTE The specification date is \
on the title page of the specification. */
#define TPM2_PT_MANUFACTURER \
((TPM2_PT)(TPM2_PT_FIXED + 5)) /* the vendor ID unique to each TPM manufacturer */
#define TPM2_PT_VENDOR_STRING_1 \
((TPM2_PT)(TPM2_PT_FIXED \
+ 6)) /* the first four characters of the vendor ID string. NOTE When the vendor \
string is fewer than 16 octets the additional property values do not have \
to be present. A vendor string of 4 octets can be represented in one \
32-bit value and no null terminating character is required. */
#define TPM2_PT_VENDOR_STRING_2 \
((TPM2_PT)(TPM2_PT_FIXED + 7)) /* the second four characters of the vendor ID string */
#define TPM2_PT_VENDOR_STRING_3 \
((TPM2_PT)(TPM2_PT_FIXED + 8)) /* the third four characters of the vendor ID string */
#define TPM2_PT_VENDOR_STRING_4 \
((TPM2_PT)(TPM2_PT_FIXED + 9)) /* the fourth four characters of the vendor ID sting */
#define TPM2_PT_VENDOR_TPM_TYPE \
((TPM2_PT)(TPM2_PT_FIXED + 10)) /* vendor defined value indicating the TPM model */
#define TPM2_PT_FIRMWARE_VERSION_1 \
((TPM2_PT)(TPM2_PT_FIXED \
+ 11)) /* the most significant 32 bits of a TPM vendor-specific value indicating \
the version number of the firmware. See 10.12.2 and 10.12.8. */
#define TPM2_PT_FIRMWARE_VERSION_2 \
((TPM2_PT)(TPM2_PT_FIXED \
+ 12)) /* the least significant 32 bits of a TPM vendor-specific value indicating \
the version number of the firmware. See 10.12.2 and 10.12.8. */
#define TPM2_PT_INPUT_BUFFER \
((TPM2_PT)(TPM2_PT_FIXED \
+ 13)) /* the maximum size of a parameter typically a TPM2B_MAX_BUFFER */
#define TPM2_PT_HR_TRANSIENT_MIN \
((TPM2_PT)(TPM2_PT_FIXED \
+ 14)) /* the minimum number of transient objects that can be held in TPM RAM. NOTE \
This minimum shall be no less than the minimum value required by the \
platforms-pecific specification to which the TPM is built. */
#define TPM2_PT_HR_PERSISTENT_MIN \
((TPM2_PT)(TPM2_PT_FIXED + 15)) /* the minimum number of persistent objects that can be held \
in TPM NV memory. NOTE This minimum shall be no less than \
the minimum value required by the platform-specific \
specification to which the TPM is built. */
#define TPM2_PT_HR_LOADED_MIN \
((TPM2_PT)(TPM2_PT_FIXED \
+ 16)) /* the minimum number of authorization sessions that can be held in TPM RAM \
. NOTE This minimum shall be no less than the minimum value required by \
the platform-specific specification to which the TPM is built. */
#define TPM2_PT_ACTIVE_SESSIONS_MAX \
((TPM2_PT)(TPM2_PT_FIXED \
+ 17)) /* the number of authorization sessions that may be active at a time. A \
session is active when it has a context associated with its handle. The \
context may either be in TPM RAM or be context saved. NOTE This value \
shall be no less than the minimum value required by the platform-specific \
specification to which the TPM is built. */
#define TPM2_PT_PCR_COUNT \
((TPM2_PT)(TPM2_PT_FIXED \
+ 18)) /* the number of PCR implemented. NOTE This number is determined by the \
defined attributes not the number of PCR that are populated. */
#define TPM2_PT_PCR_SELECT_MIN \
((TPM2_PT)(TPM2_PT_FIXED \
+ 19)) /* the minimum number of octets in a TPMS_PCR_SELECT.sizeofSelect. NOTE This \
value is not determined by the number of PCR implemented but by the \
number of PCR required by the platform-specific specification with which \
the TPM is compliant or by the implementer if not adhering to a \
platform-specific specification. */
#define TPM2_PT_CONTEXT_GAP_MAX \
((TPM2_PT)(TPM2_PT_FIXED + 20)) /* the maximum allowed difference unsigned between the \
contextID values of two saved session contexts. This value \
shall be 2n1 where n is at least 16. */
#define TPM2_PT_NV_COUNTERS_MAX \
((TPM2_PT)(TPM2_PT_FIXED \
+ 22)) /* the maximum number of NV Indexes that are allowed to have the \
TPM2_NT_COUNTER attribute. NOTE It is allowed for this value to be larger \
than the number of NV Indexes that can be defined. This would be \
indicative of a TPM implementation that did not use different \
implementation technology for different NV Index types. */
#define TPM2_PT_NV_INDEX_MAX \
((TPM2_PT)(TPM2_PT_FIXED + 23)) /* the maximum size of an NV Index data area */
#define TPM2_PT_MEMORY \
((TPM2_PT)(TPM2_PT_FIXED \
+ 24)) /* a TPMA_MEMORY indicating the memory management method for the TPM */
#define TPM2_PT_CLOCK_UPDATE \
((TPM2_PT)(TPM2_PT_FIXED + 25)) /* interval in milliseconds between updates to the copy of \
TPMS_CLOCK_INFO.clock in NV */
#define TPM2_PT_CONTEXT_HASH \
((TPM2_PT)(TPM2_PT_FIXED + 26)) /* the algorithm used for the integrity HMAC on saved contexts \
and for hashing the fuData of TPM2_FirmwareRead */
#define TPM2_PT_CONTEXT_SYM \
((TPM2_PT)(TPM2_PT_FIXED \
+ 27)) /* TPM2_ALG_ID the algorithm used for encryption of saved contexts */
#define TPM2_PT_CONTEXT_SYM_SIZE \
((TPM2_PT)(TPM2_PT_FIXED + 28)) /* TPM2_KEY_BITS the size of the key used for encryption of \
saved contexts */
#define TPM2_PT_ORDERLY_COUNT \
((TPM2_PT)(TPM2_PT_FIXED \
+ 29)) /* the modulus 1 of the count for NV update of an orderly counter. The \
returned value is MAX_ORDERLY_COUNT. This will have a value of 2N 1 \
where 1 N 32. NOTE An orderly counter is an NV Index with an TPM2_NT of \
TPM_NV_COUNTER and TPMA_NV_ORDERLY SET. NOTE When the low-order bits of a \
counter equal this value an NV write occurs on the next increment. */
#define TPM2_PT_MAX_COMMAND_SIZE \
((TPM2_PT)(TPM2_PT_FIXED + 30)) /* the maximum value for commandSize in a command */
#define TPM2_PT_MAX_RESPONSE_SIZE \
((TPM2_PT)(TPM2_PT_FIXED + 31)) /* the maximum value for responseSize in a response */
#define TPM2_PT_MAX_DIGEST \
((TPM2_PT)(TPM2_PT_FIXED \
+ 32)) /* the maximum size of a digest that can be produced by the TPM */
#define TPM2_PT_MAX_OBJECT_CONTEXT \
((TPM2_PT)(TPM2_PT_FIXED + 33)) /* the maximum size of an object context that will be returned \
by TPM2_ContextSave */
#define TPM2_PT_MAX_SESSION_CONTEXT \
((TPM2_PT)(TPM2_PT_FIXED + 34)) /* the maximum size of a session context that will be returned \
by TPM2_ContextSave */
#define TPM2_PT_PS_FAMILY_INDICATOR \
((TPM2_PT)(TPM2_PT_FIXED \
+ 35)) /* platform-specific family. A TPM2_PS value. See Table 25. NOTE The \
platform-specific values for the TPM2_PT_PS parameters are in the \
relevant platform-specific specification. In the reference implementation \
all of these values are 0. */
#define TPM2_PT_PS_LEVEL \
((TPM2_PT)(TPM2_PT_FIXED + 36)) /* the level of the platform-specific specification */
#define TPM2_PT_PS_REVISION \
((TPM2_PT)(TPM2_PT_FIXED + 37)) /* the specification Revision times 100 for the \
platform-specific specification */
#define TPM2_PT_PS_DAY_OF_YEAR \
((TPM2_PT)(TPM2_PT_FIXED \
+ 38)) /* the platform-specific specification day of year using TCG calendar */
#define TPM2_PT_PS_YEAR \
((TPM2_PT)(TPM2_PT_FIXED + 39)) /* the platform-specific specification year using the CE */
#define TPM2_PT_SPLIT_MAX \
((TPM2_PT)(TPM2_PT_FIXED \
+ 40)) /* the number of split signing operations supported by the TPM */
#define TPM2_PT_TOTAL_COMMANDS \
((TPM2_PT)(TPM2_PT_FIXED + 41)) /* total number of commands implemented in the TPM */
#define TPM2_PT_LIBRARY_COMMANDS \
((TPM2_PT)(TPM2_PT_FIXED \
+ 42)) /* number of commands from the TPM library that are implemented */
#define TPM2_PT_VENDOR_COMMANDS \
((TPM2_PT)(TPM2_PT_FIXED + 43)) /* number of vendor commands that are implemented */
#define TPM2_PT_NV_BUFFER_MAX \
((TPM2_PT)(TPM2_PT_FIXED + 44)) /* the maximum data size in one NV write command */
#define TPM2_PT_MODES \
((TPM2_PT)(TPM2_PT_FIXED + 45)) /* a TPMA_MODES value indicating that the TPM is designed for \
these modes. */
#define TPM2_PT_MAX_CAP_BUFFER \
((TPM2_PT)(TPM2_PT_FIXED + 46)) /* the maximum size of a TPMS_CAPABILITY_DATA structure \
returned in TPM2_GetCapability(). */
#define TPM_PT_FIRMWARE_SVN \
((TPM2_PT)(TPM2_PT_FIXED + 47)) /* the current SVN of the TPM's firmware */
#define TPM_PT_FIRMWARE_MAX_SVN \
((TPM2_PT)(TPM2_PT_FIXED + 48)) /* the maximum value `TPM_PT_FIRMWARE_SVN` may take */
#define TPM2_PT_VAR \
((TPM2_PT)(TPM2_PT_GROUP \
* 2)) /* the group of variable properties returned as TPMS_TAGGED_PROPERTY. The \
properties in this group change because of a Protected Capability other \
than a firmware update. The values are not necessarily persistent across \
all power transitions. */
#define TPM2_PT_PERMANENT ((TPM2_PT)(TPM2_PT_VAR + 0)) /* TPMA_PERMANENT */
#define TPM2_PT_STARTUP_CLEAR ((TPM2_PT)(TPM2_PT_VAR + 1)) /* TPMA_STARTUP_CLEAR */
#define TPM2_PT_HR_NV_INDEX \
((TPM2_PT)(TPM2_PT_VAR + 2)) /* the number of NV Indexes currently defined */
#define TPM2_PT_HR_LOADED \
((TPM2_PT)(TPM2_PT_VAR \
+ 3)) /* the number of authorization sessions currently loaded into TPM RAM */
#define TPM2_PT_HR_LOADED_AVAIL \
((TPM2_PT)(TPM2_PT_VAR \
+ 4)) /* the number of additional authorization sessions of any type that could be \
loaded into TPM RAM. This value is an estimate. If this value is at least \
1 then at least one authorization session of any type may be loaded. Any \
command that changes the RAM memory allocation can make this estimate \
invalid. NOTE A valid implementation may return 1 even if more than one \
authorization session would fit into RAM. */
#define TPM2_PT_HR_ACTIVE \
((TPM2_PT)(TPM2_PT_VAR \
+ 5)) /* the number of active authorization sessions currently being tracked by the \
TPMThis is the sum of the loaded and saved sessions. */
#define TPM2_PT_HR_ACTIVE_AVAIL \
((TPM2_PT)(TPM2_PT_VAR \
+ 6)) /* the number of additional authorization sessions of any type that could be \
created. This value is an estimate. If this value is at least 1 then at \
least one authorization session of any type may be created. Any command \
that changes the RAM memory allocation can make this estimate invalid. \
NOTE A valid implementation may return 1 even if more than one \
authorization session could be created. */
#define TPM2_PT_HR_TRANSIENT_AVAIL \
((TPM2_PT)(TPM2_PT_VAR \
+ 7)) /* estimate of the number of additional transient objects that could be \
loaded into TPM RAM. This value is an estimate. If this value is at least \
1 then at least one object of any type may be loaded. Any command that \
changes the memory allocation can make this estimate invalid. NOTE A valid \
implementation may return 1 even if more than one transient object would \
fit into RAM. */
#define TPM2_PT_HR_PERSISTENT \
((TPM2_PT)(TPM2_PT_VAR \
+ 8)) /* the number of persistent objects currently loaded into TPM NV memory */
#define TPM2_PT_HR_PERSISTENT_AVAIL \
((TPM2_PT)(TPM2_PT_VAR \
+ 9)) /* the number of additional persistent objects that could be loaded into NV \
memory. This value is an estimate. If this value is at least 1 then at \
least one object of any type may be made persistent. Any command that \
changes the NV memory allocation can make this estimate invalid. NOTE A \
valid implementation may return 1 even if more than one persistent object \
would fit into NV memory. */
#define TPM2_PT_NV_COUNTERS \
((TPM2_PT)(TPM2_PT_VAR + 10)) /* the number of defined NV Indexes that have NV the \
TPM2_NT_COUNTER attribute */
#define TPM2_PT_NV_COUNTERS_AVAIL \
((TPM2_PT)(TPM2_PT_VAR \
+ 11)) /* the number of additional NV Indexes that can be defined with their \
TPM2_NT of TPM_NV_COUNTER and the TPMA_NV_ORDERLY attribute SET. This \
value is an estimate. If this value is at least 1 then at least one NV \
Index may be created with a TPM2_NT of TPM_NV_COUNTER and the \
TPMA_NV_ORDERLY attributes. Any command that changes the NV memory \
allocation can make this estimate invalid. NOTE A valid implementation \
may return 1 even if more than one NV counter could be defined. */
#define TPM2_PT_ALGORITHM_SET \
((TPM2_PT)(TPM2_PT_VAR \
+ 12)) /* code that limits the algorithms that may be used with the TPM */
#define TPM2_PT_LOADED_CURVES ((TPM2_PT)(TPM2_PT_VAR + 13)) /* the number of loaded ECC curves */
#define TPM2_PT_LOCKOUT_COUNTER \
((TPM2_PT)(TPM2_PT_VAR + 14)) /* the current value of the lockout counter failedTries */
#define TPM2_PT_MAX_AUTH_FAIL \
((TPM2_PT)(TPM2_PT_VAR \
+ 15)) /* the number of authorization failures before DA lockout is invoked */
#define TPM2_PT_LOCKOUT_INTERVAL \
((TPM2_PT)(TPM2_PT_VAR + 16)) /* the number of seconds before the value reported by \
TPM2_PT_LOCKOUT_COUNTER is decremented */
#define TPM2_PT_LOCKOUT_RECOVERY \
((TPM2_PT)(TPM2_PT_VAR + 17)) /* the number of seconds after a lockoutAuth failure before use \
of lockoutAuth may be attempted again */
#define TPM2_PT_NV_WRITE_RECOVERY \
((TPM2_PT)(TPM2_PT_VAR + 18)) /* number of milliseconds before the TPM will accept another \
command that will modify NVThis value is an approximation and \
may go up or down over time. */
#define TPM2_PT_AUDIT_COUNTER_0 \
((TPM2_PT)(TPM2_PT_VAR + 19)) /* the high-order 32 bits of the command audit counter */
#define TPM2_PT_AUDIT_COUNTER_1 \
((TPM2_PT)(TPM2_PT_VAR + 20)) /* the low-order 32 bits of the command audit counter */
/* Definition of UINT32 TPM2_PT_PCR Constants <INOUT S> */
typedef UINT32 TPM2_PT_PCR;
#define TPM2_PT_TPM2_PCR_FIRST \
((TPM2_PT_PCR)0x00000000) /* bottom of the range of TPM2_PT_PCR properties */
#define TPM2_PT_PCR_SAVE \
((TPM2_PT_PCR)0x00000000) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR is saved \
and restored by TPM2_SU_STATE */
#define TPM2_PT_PCR_EXTEND_L0 \
((TPM2_PT_PCR)0x00000001) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
extended from locality 0This property is only present if a \
locality other than 0 is implemented. */
#define TPM2_PT_PCR_RESET_L0 \
((TPM2_PT_PCR)0x00000002) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
reset by TPM2_PCR_Reset from locality 0 */
#define TPM2_PT_PCR_EXTEND_L1 \
((TPM2_PT_PCR)0x00000003) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
extended from locality 1 This property is only present if \
locality 1 is implemented. */
#define TPM2_PT_PCR_RESET_L1 \
((TPM2_PT_PCR)0x00000004) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
reset by TPM2_PCR_Reset from locality 1This property is only \
present if locality 1 is implemented. */
#define TPM2_PT_PCR_EXTEND_L2 \
((TPM2_PT_PCR)0x00000005) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
extended from locality 2 This property is only present if \
localities 1 and 2 are implemented. */
#define TPM2_PT_PCR_RESET_L2 \
((TPM2_PT_PCR)0x00000006) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
reset by TPM2_PCR_Reset from locality 2This property is only \
present if localities 1 and 2 are implemented. */
#define TPM2_PT_PCR_EXTEND_L3 \
((TPM2_PT_PCR)0x00000007) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
extended from locality 3This property is only present if \
localities 1 2 and 3 are implemented. */
#define TPM2_PT_PCR_RESET_L3 \
((TPM2_PT_PCR)0x00000008) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
reset by TPM2_PCR_Reset from locality 3This property is only \
present if localities 1 2 and 3 are implemented. */
#define TPM2_PT_PCR_EXTEND_L4 \
((TPM2_PT_PCR)0x00000009) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
extended from locality 4This property is only present if \
localities 1 2 3 and 4 are implemented. */
#define TPM2_PT_PCR_RESET_L4 \
((TPM2_PT_PCR)0x0000000A) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR may be \
reset by TPM2_PCR_Reset from locality 4This property is only \
present if localities 1 2 3 and 4 are implemented. */
/* NOTE: The values in the range 0x0000000B - 0x00000010 are reserved.
* They correspond to values that may be used to describe attributes
* associated with the extended localities (32-255).
* The meaning of these properties need not be the same as the meaning
* for the Extend and Reset properties above.
*/
#define TPM2_PT_PCR_NO_INCREMENT \
((TPM2_PT_PCR)0x00000011) /* a SET bit in the TPMS_PCR_SELECT indicates that modifications to \
this PCR reset or Extend will not increment the pcrUpdateCounter \
*/
#define TPM2_PT_PCR_DRTM_RESET \
((TPM2_PT_PCR)0x00000012) /* a SET bit in the TPMS_PCR_SELECT indicates that the PCR is reset \