TianoCore EDK2 master
Loading...
Searching...
No Matches
TcgStorageCoreLib.h
Go to the documentation of this file.
1
14#ifndef _TCG_CORE_H_
15#define _TCG_CORE_H_
16
18
19#define ERROR_CHECK(arg) \
20 { \
21 TCG_RESULT ret = (arg); \
22 if (ret != TcgResultSuccess) { \
23 DEBUG ((DEBUG_INFO, "ERROR_CHECK failed at %a:%u\n", __FILE__, DEBUG_LINE_NUMBER)); \
24 return ret; \
25 } \
26 }
27
28#define METHOD_STATUS_ERROR_CHECK(arg, failRet) \
29 if ((arg) != TCG_METHOD_STATUS_CODE_SUCCESS) { \
30 DEBUG ((DEBUG_INFO, "Method Status error: 0x%02X (%a)\n", arg, TcgMethodStatusString(arg))); \
31 return (failRet); \
32 }
33
34#define NULL_CHECK(arg) \
35 do { \
36 if ((arg) == NULL) { \
37 DEBUG ((DEBUG_INFO, "NULL_CHECK(%a) failed at %a:%u\n", #arg, __FILE__, DEBUG_LINE_NUMBER)); \
38 return TcgResultFailureNullPointer; \
39 } \
40 } while (0)
41
42#pragma pack(1)
43
49typedef enum {
50 //
51 // This is the return result upon successful completion of a Tcg function call
52 //
53 TcgResultSuccess,
54
55 //
56 // This is the return "catchall" result for the failure of a Tcg function call
57 //
58 TcgResultFailure,
59
60 //
61 // This is the return result if a required parameter was Null for a Tcg function call
62 //
63 TcgResultFailureNullPointer,
64
65 //
66 // This is the return result if a required buffersize was 0 for a Tcg function call
67 //
68 TcgResultFailureZeroSize,
69
70 //
71 // This is the return result if a Tcg function call was executed out of order.
72 // For instance, starting a Tcg subpacket before starting its Tcg packet.
73 //
74 TcgResultFailureInvalidAction,
75
76 //
77 // This is the return result if the buffersize provided is not big enough to add a requested Tcg encoded item.
78 //
79 TcgResultFailureBufferTooSmall,
80
81 //
82 // This is the return result for a Tcg parse function if the end of the parsed Buffer is reached, yet Data is still attempted to be retrieved.
83 // For instance, attempting to retrieve another Tcg token from the Buffer after it has reached the end of the Tcg subpacket payload.
84 //
85 TcgResultFailureEndBuffer,
86
87 //
88 // This is the return result for a Tcg parse function if the Tcg Token item requested is not the expected type.
89 // For instance, the caller requested to receive an integer and the Tcg token was a byte sequence.
90 //
91 TcgResultFailureInvalidType,
93
94//
95// Structure that is used to build the Tcg ComPacket. It contains the start Buffer pointer and the current position of the
96// Tcg ComPacket, current Tcg Packet and Tcg SubPacket. This structure must be initialized
97// by calling tcgInitTcgCreateStruct before it is used as parameter to any other Tcg function.
98// This structure should NOT be directly modified by the client of this library.
99//
100// NOTE: WE MAY MAKE THIS AN ABSTRACT STRUCTURE WITH A DEFINED SIZE AND KEEP THE VARIABLES
101// INTERNAL AND ONLY KNOWN TO THE TCG LIBRARY
102//
103// tcgInitTcgCreateStruct
104//
105typedef struct {
106 //
107 // Buffer allocated and freed by the client of the Tcg library.
108 // This is the Buffer that shall contain the final Tcg encoded compacket.
109 //
110 VOID *Buffer;
111
112 //
113 // Size of the Buffer provided.
114 //
115 UINT32 BufferSize;
116
117 //
118 // Pointer to the start of the Tcg ComPacket. It should point to a location within Buffer.
119 //
120 TCG_COM_PACKET *ComPacket;
121
122 //
123 // Current Tcg Packet that is being created. It should point to a location within Buffer.
124 //
125 TCG_PACKET *CurPacket;
126
127 //
128 // Current Tcg SubPacket that is being created. It should point to a location within Buffer.
129 //
130 TCG_SUB_PACKET *CurSubPacket;
131
132 //
133 // Flag used to indicate if the Buffer of the structure should be filled out.
134 // This is intended to be used to support a use-case where the client of library
135 // can perform all the desired tcg calls to determine what the actual Size of the final compacket will be.
136 // Then the client can allocate the required Buffer Size and re-run the tcg calls.
137 // THIS MAY NOT BE IMPLEMENTED... REQUIRES MORE THOUGHT BECAUSE YOU CANNOT SOLVE ISSUE FOR RECEIVE
138 //
139 BOOLEAN DryRun;
141
142//
143// Structure that is used to parse the Tcg response received. It contains the response Buffer pointer
144// and the current position of the Tcg ComPacket, current Tcg Packet and Tcg SubPacket being parsed.
145// This structure must be initialized by calling tcgInitTcgParseStruct before it is used as parameter to any other Tcg parse function.
146// This structure should NOT be directly modified by the client of this library.
147//
148// NOTE: WE MAY MAKE THIS AN ABSTRACT STRUCTURE WITH A DEFINED SIZE AND KEEP THE VARIABLES
149// INTERNAL AND ONLY KNOWN TO THE TCG LIBRARY
150//
151// @sa tcgInitTcgParseStruct
152//
153typedef struct {
154 //
155 // Buffer allocated and freed by the client of the Tcg library.
156 // This is the Buffer that contains the Tcg response to decode/parse.
157 //
158 const VOID *Buffer;
159
160 //
161 // Size of the Buffer provided.
162 //
163 UINT32 BufferSize;
164
165 //
166 // Pointer to the start of the Tcg ComPacket. It should point to a location within Buffer.
167 //
168 TCG_COM_PACKET *ComPacket;
169
170 //
171 // Current Tcg Packet that is being created. It should point to a location within Buffer.
172 //
173 TCG_PACKET *CurPacket;
174
175 //
176 // Current Tcg SubPacket that is being created. It should point to a location within Buffer.
177 //
178 TCG_SUB_PACKET *CurSubPacket;
179
180 //
181 // Current pointer within the current subpacket payload.
182 //
183 UINT8 *CurPtr;
185
186//
187// Structure that is used to represent a Tcg Token that is retrieved by Tcg parse functions.
188//
189typedef struct {
190 //
191 // Describes the type of Tcg token the Hdr start points to.
192 //
193 TCG_TOKEN_TYPE Type;
194
195 //
196 // Pointer to the beginning of the Header of the Tcg token
197 //
198 UINT8 *HdrStart;
199} TCG_TOKEN;
200
212EFIAPI
214 TCG_CREATE_STRUCT *CreateStruct,
215 VOID *Buffer,
216 UINT32 BufferSize
217 );
218
229EFIAPI
231 TCG_CREATE_STRUCT *CreateStruct,
232 UINT16 ComId,
233 UINT16 ComIdExtension
234 );
235
249EFIAPI
251 TCG_CREATE_STRUCT *CreateStruct,
252 UINT32 Tsn,
253 UINT32 Hsn,
254 UINT32 SeqNumber,
255 UINT16 AckType,
256 UINT32 Ack
257 );
258
268EFIAPI
270 TCG_CREATE_STRUCT *CreateStruct,
271 UINT16 Kind
272 );
273
283EFIAPI
285 TCG_CREATE_STRUCT *CreateStruct
286 );
287
296EFIAPI
298 TCG_CREATE_STRUCT *CreateStruct
299 );
300
310EFIAPI
312 TCG_CREATE_STRUCT *CreateStruct,
313 UINT32 *Size
314 );
315
324EFIAPI
326 TCG_CREATE_STRUCT *CreateStruct,
327 UINT8 Byte
328 );
329
342EFIAPI
344 TCG_CREATE_STRUCT *CreateStruct,
345 const VOID *Data,
346 UINT32 DataSize,
347 BOOLEAN Continued
348 );
349
363EFIAPI
365 TCG_CREATE_STRUCT *CreateStruct,
366 const VOID *Data,
367 UINT32 DataSize,
368 BOOLEAN SignedInteger
369 );
370
379EFIAPI
381 TCG_CREATE_STRUCT *CreateStruct,
382 UINT8 Value
383 );
384
394EFIAPI
396 TCG_CREATE_STRUCT *CreateStruct,
397 UINT16 Value
398 );
399
409EFIAPI
411 TCG_CREATE_STRUCT *CreateStruct,
412 UINT32 Value
413 );
414
424EFIAPI
426 TCG_CREATE_STRUCT *CreateStruct,
427 UINT64 Value
428 );
429
438EFIAPI
440 TCG_CREATE_STRUCT *CreateStruct,
441 BOOLEAN Value
442 );
443
454EFIAPI
456 TCG_CREATE_STRUCT *CreateStruct,
457 TCG_UID Uid
458 );
459
467EFIAPI
469 TCG_CREATE_STRUCT *CreateStruct
470 );
471
480EFIAPI
482 TCG_CREATE_STRUCT *CreateStruct
483 );
484
492EFIAPI
494 TCG_CREATE_STRUCT *CreateStruct
495 );
496
505EFIAPI
507 TCG_CREATE_STRUCT *CreateStruct
508 );
509
517EFIAPI
519 TCG_CREATE_STRUCT *CreateStruct
520 );
521
530EFIAPI
532 TCG_CREATE_STRUCT *CreateStruct
533 );
534
543EFIAPI
545 TCG_CREATE_STRUCT *CreateStruct
546 );
547
555EFIAPI
557 TCG_CREATE_STRUCT *CreateStruct
558 );
559
567EFIAPI
569 TCG_CREATE_STRUCT *CreateStruct
570 );
571
583EFIAPI
585 TCG_PARSE_STRUCT *ParseStruct,
586 const VOID *Buffer,
587 UINT32 BufferSize
588 );
589
600EFIAPI
602 TCG_PARSE_STRUCT *ParseStruct,
603 TCG_TOKEN *TcgToken
604 );
605
616EFIAPI
618 TCG_PARSE_STRUCT *ParseStruct,
619 TCG_TOKEN_TYPE Type
620 );
621
635EFIAPI
637 const TCG_TOKEN *TcgToken,
638 UINT32 *HeaderLength,
639 UINT32 *DataLength,
640 UINT8 *ByteOrInt,
641 UINT8 *SignOrCont
642 );
643
653UINT8 *
654EFIAPI
656 const TCG_TOKEN *TcgToken,
657 UINT32 *Length
658 );
659
670EFIAPI
672 const TCG_TOKEN *TcgToken,
673 UINT64 *Value
674 );
675
686EFIAPI
688 TCG_PARSE_STRUCT *ParseStruct,
689 UINT8 *Value
690 );
691
702EFIAPI
704 TCG_PARSE_STRUCT *ParseStruct,
705 UINT16 *Value
706 );
707
718EFIAPI
720 TCG_PARSE_STRUCT *ParseStruct,
721 UINT32 *Value
722 );
723
734EFIAPI
736 TCG_PARSE_STRUCT *ParseStruct,
737 UINT64 *Value
738 );
739
750EFIAPI
752 TCG_PARSE_STRUCT *ParseStruct,
753 BOOLEAN *Value
754 );
755
766EFIAPI
768 TCG_PARSE_STRUCT *ParseStruct,
769 TCG_UID *Uid
770 );
771
783EFIAPI
785 TCG_PARSE_STRUCT *ParseStruct,
786 const VOID **Data,
787 UINT32 *Length
788 );
789
799EFIAPI
801 TCG_PARSE_STRUCT *ParseStruct
802 );
803
813EFIAPI
815 TCG_PARSE_STRUCT *ParseStruct
816 );
817
827EFIAPI
829 TCG_PARSE_STRUCT *ParseStruct
830 );
831
841EFIAPI
843 TCG_PARSE_STRUCT *ParseStruct
844 );
845
855EFIAPI
857 TCG_PARSE_STRUCT *ParseStruct
858 );
859
869EFIAPI
871 TCG_PARSE_STRUCT *ParseStruct
872 );
873
883EFIAPI
885 TCG_PARSE_STRUCT *ParseStruct
886 );
887
897EFIAPI
899 TCG_PARSE_STRUCT *ParseStruct
900 );
901
911EFIAPI
913 TCG_PARSE_STRUCT *ParseStruct
914 );
915
916// end of parse functions
917
918typedef
919BOOLEAN
920(EFIAPI *TCG_LEVEL0_ENUM_CALLBACK)(
921 const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader,
923 UINTN FeatureSize, // includes header
924 VOID *Context
925 );
926
936EFIAPI
938 TCG_CREATE_STRUCT *CreateStruct,
939 TCG_UID InvokingId,
940 TCG_UID MethodId
941 );
942
950EFIAPI
952 TCG_CREATE_STRUCT *CreateStruct
953 );
954
962EFIAPI
964 TCG_CREATE_STRUCT *CreateStruct
965 );
966
974EFIAPI
976 TCG_CREATE_STRUCT *CreateStruct
977 );
978
997EFIAPI
999 TCG_CREATE_STRUCT *CreateStruct,
1000 UINT32 *Size,
1001 UINT16 ComId,
1002 UINT16 ComIdExtension,
1003 UINT32 HostSessionId,
1004 TCG_UID SpId,
1005 BOOLEAN Write,
1006 UINT32 HostChallengeLength,
1007 const VOID *HostChallenge,
1008 TCG_UID HostSigningAuthority
1009 );
1010
1027EFIAPI
1029 TCG_CREATE_STRUCT *CreateStruct,
1030 UINT32 *Size,
1031 UINT16 ComId,
1032 UINT16 ComIdExtension,
1033 UINT32 TperSession,
1034 UINT32 HostSession,
1035 TCG_UID SidRow,
1036 const VOID *Password,
1037 UINT32 PasswordSize
1038 );
1039
1055EFIAPI
1057 TCG_CREATE_STRUCT *CreateStruct,
1058 UINT32 *Size,
1059 UINT16 ComId,
1060 UINT16 ComIdExtension,
1061 UINT32 TperSession,
1062 UINT32 HostSession,
1063 TCG_UID AuthorityUid,
1064 BOOLEAN Enabled
1065 );
1066
1081EFIAPI
1083 TCG_CREATE_STRUCT *CreateStruct,
1084 UINT32 *Size,
1085 UINT16 ComId,
1086 UINT16 ComIdExtension,
1087 UINT32 HostSessionId,
1088 UINT32 TpSessionId
1089 );
1090
1098CHAR8 *
1099EFIAPI
1101 TCG_TOKEN_TYPE Type
1102 );
1103
1113EFIAPI
1115 const TCG_PARSE_STRUCT *ParseStruct,
1116 UINT8 *MethodStatus
1117 );
1118
1127CHAR8 *
1128EFIAPI
1130 UINT8 MethodStatus
1131 );
1132
1143EFIAPI
1145 const TCG_PARSE_STRUCT *ParseStruct,
1146 UINT16 *ComId,
1147 UINT16 *ComIdExtension
1148 );
1149
1159EFIAPI
1161 const TCG_PARSE_STRUCT *ParseStruct,
1162 UINT16 ExpectedComId,
1163 UINT16 ExpectedComIdExtension
1164 );
1165
1178EFIAPI
1180 const TCG_PARSE_STRUCT *ParseStruct,
1181 UINT16 ComId,
1182 UINT16 ComIdExtension,
1183 UINT32 HostSessionId,
1184 UINT32 *TperSessionId
1185 );
1186
1205EFIAPI
1207 TCG_CREATE_STRUCT *CreateStruct,
1208 UINT32 *Size,
1209 UINT16 ComId,
1210 UINT16 ComIdExtension,
1211 UINT32 TperSession,
1212 UINT32 HostSession,
1213 TCG_UID AceRow,
1214 TCG_UID Authority1,
1215 BOOLEAN LogicalOperator,
1216 TCG_UID Authority2
1217 );
1218
1229BOOLEAN
1230EFIAPI
1232 const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader,
1233 TCG_LEVEL0_ENUM_CALLBACK Callback,
1234 VOID *Context
1235 );
1236
1247EFIAPI
1249 const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader,
1250 UINT16 FeatureCode,
1251 UINTN *FeatureSize
1252 );
1253
1262BOOLEAN
1263EFIAPI
1265 const TCG_SUPPORTED_SECURITY_PROTOCOLS *ProtocolList,
1266 UINT16 Protocol
1267 );
1268
1277BOOLEAN
1278EFIAPI
1280 const TCG_LEVEL0_DISCOVERY_HEADER *Discovery
1281 );
1282
1283#pragma pack()
1284
1285#endif // _TCG_CORE_H_
UINT64 UINTN
UINT64 TCG_UID
UID in host native byte order.
TCG_RESULT EFIAPI TcgGetNextToken(TCG_PARSE_STRUCT *ParseStruct, TCG_TOKEN *TcgToken)
TCG_RESULT EFIAPI TcgAddUINT16(TCG_CREATE_STRUCT *CreateStruct, UINT16 Value)
TCG_RESULT EFIAPI TcgStartMethodCall(TCG_CREATE_STRUCT *CreateStruct, TCG_UID InvokingId, TCG_UID MethodId)
TCG_RESULT EFIAPI TcgGetNextBOOLEAN(TCG_PARSE_STRUCT *ParseStruct, BOOLEAN *Value)
TCG_RESULT EFIAPI TcgGetNextStartTransaction(TCG_PARSE_STRUCT *ParseStruct)
UINT8 *EFIAPI TcgGetTokenByteSequence(const TCG_TOKEN *TcgToken, UINT32 *Length)
TCG_RESULT EFIAPI TcgAddEndOfSession(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgGetNextUINT8(TCG_PARSE_STRUCT *ParseStruct, UINT8 *Value)
TCG_RESULT EFIAPI TcgEndComPacket(TCG_CREATE_STRUCT *CreateStruct, UINT32 *Size)
TCG_RESULT EFIAPI TcgGetNextUINT64(TCG_PARSE_STRUCT *ParseStruct, UINT64 *Value)
TCG_RESULT EFIAPI TcgGetNextEndTransaction(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT
TCG_RESULT EFIAPI TcgAddEndTransaction(TCG_CREATE_STRUCT *CreateStruct)
BOOLEAN EFIAPI TcgIsLocked(const TCG_LEVEL0_DISCOVERY_HEADER *Discovery)
TCG_RESULT EFIAPI TcgAddInteger(TCG_CREATE_STRUCT *CreateStruct, const VOID *Data, UINT32 DataSize, BOOLEAN SignedInteger)
TCG_RESULT EFIAPI TcgAddRawByte(TCG_CREATE_STRUCT *CreateStruct, UINT8 Byte)
TCG_RESULT EFIAPI TcgAddByteSequence(TCG_CREATE_STRUCT *CreateStruct, const VOID *Data, UINT32 DataSize, BOOLEAN Continued)
BOOLEAN EFIAPI TcgIsProtocolSupported(const TCG_SUPPORTED_SECURITY_PROTOCOLS *ProtocolList, UINT16 Protocol)
TCG_RESULT EFIAPI TcgStartPacket(TCG_CREATE_STRUCT *CreateStruct, UINT32 Tsn, UINT32 Hsn, UINT32 SeqNumber, UINT16 AckType, UINT32 Ack)
TCG_RESULT EFIAPI TcgCreateEndSession(TCG_CREATE_STRUCT *CreateStruct, UINT32 *Size, UINT16 ComId, UINT16 ComIdExtension, UINT32 HostSessionId, UINT32 TpSessionId)
TCG_RESULT EFIAPI TcgSetAuthorityEnabled(TCG_CREATE_STRUCT *CreateStruct, UINT32 *Size, UINT16 ComId, UINT16 ComIdExtension, UINT32 TperSession, UINT32 HostSession, TCG_UID AuthorityUid, BOOLEAN Enabled)
TCG_RESULT EFIAPI TcgGetNextEndOfSession(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT EFIAPI TcgAddEndOfData(TCG_CREATE_STRUCT *CreateStruct)
TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER *EFIAPI TcgGetFeature(const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader, UINT16 FeatureCode, UINTN *FeatureSize)
TCG_RESULT EFIAPI TcgGetNextStartList(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT EFIAPI TcgGetNextUINT32(TCG_PARSE_STRUCT *ParseStruct, UINT32 *Value)
TCG_RESULT EFIAPI TcgCreateSetAce(TCG_CREATE_STRUCT *CreateStruct, UINT32 *Size, UINT16 ComId, UINT16 ComIdExtension, UINT32 TperSession, UINT32 HostSession, TCG_UID AceRow, TCG_UID Authority1, BOOLEAN LogicalOperator, TCG_UID Authority2)
TCG_RESULT EFIAPI TcgGetTokenUINT64(const TCG_TOKEN *TcgToken, UINT64 *Value)
TCG_RESULT EFIAPI TcgAddEndList(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgCreateStartSession(TCG_CREATE_STRUCT *CreateStruct, UINT32 *Size, UINT16 ComId, UINT16 ComIdExtension, UINT32 HostSessionId, TCG_UID SpId, BOOLEAN Write, UINT32 HostChallengeLength, const VOID *HostChallenge, TCG_UID HostSigningAuthority)
TCG_RESULT EFIAPI TcgGetNextCall(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT EFIAPI TcgAddTcgUid(TCG_CREATE_STRUCT *CreateStruct, TCG_UID Uid)
TCG_RESULT EFIAPI TcgGetNextEndName(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT EFIAPI TcgCheckComIds(const TCG_PARSE_STRUCT *ParseStruct, UINT16 ExpectedComId, UINT16 ExpectedComIdExtension)
CHAR8 *EFIAPI TcgMethodStatusString(UINT8 MethodStatus)
CHAR8 *EFIAPI TcgTokenTypeString(TCG_TOKEN_TYPE Type)
TCG_RESULT EFIAPI TcgGetNextTcgUid(TCG_PARSE_STRUCT *ParseStruct, TCG_UID *Uid)
BOOLEAN EFIAPI TcgEnumLevel0Discovery(const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader, TCG_LEVEL0_ENUM_CALLBACK Callback, VOID *Context)
TCG_RESULT EFIAPI TcgParseSyncSession(const TCG_PARSE_STRUCT *ParseStruct, UINT16 ComId, UINT16 ComIdExtension, UINT32 HostSessionId, UINT32 *TperSessionId)
TCG_RESULT EFIAPI TcgGetNextByteSequence(TCG_PARSE_STRUCT *ParseStruct, const VOID **Data, UINT32 *Length)
TCG_RESULT EFIAPI TcgGetNextEndList(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT EFIAPI TcgAddUINT32(TCG_CREATE_STRUCT *CreateStruct, UINT32 Value)
TCG_RESULT EFIAPI TcgGetAtomInfo(const TCG_TOKEN *TcgToken, UINT32 *HeaderLength, UINT32 *DataLength, UINT8 *ByteOrInt, UINT8 *SignOrCont)
TCG_RESULT EFIAPI TcgGetNextStartName(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT EFIAPI TcgAddStartTransaction(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgEndMethodCall(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgEndSubPacket(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgInitTcgCreateStruct(TCG_CREATE_STRUCT *CreateStruct, VOID *Buffer, UINT32 BufferSize)
TCG_RESULT EFIAPI TcgAddStartList(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgEndParameters(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgInitTcgParseStruct(TCG_PARSE_STRUCT *ParseStruct, const VOID *Buffer, UINT32 BufferSize)
TCG_RESULT EFIAPI TcgGetComIds(const TCG_PARSE_STRUCT *ParseStruct, UINT16 *ComId, UINT16 *ComIdExtension)
TCG_RESULT EFIAPI TcgAddCall(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgGetNextUINT16(TCG_PARSE_STRUCT *ParseStruct, UINT16 *Value)
TCG_RESULT EFIAPI TcgStartSubPacket(TCG_CREATE_STRUCT *CreateStruct, UINT16 Kind)
TCG_RESULT EFIAPI TcgStartComPacket(TCG_CREATE_STRUCT *CreateStruct, UINT16 ComId, UINT16 ComIdExtension)
TCG_RESULT EFIAPI TcgStartParameters(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgEndPacket(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgGetNextTokenType(TCG_PARSE_STRUCT *ParseStruct, TCG_TOKEN_TYPE Type)
TCG_RESULT EFIAPI TcgAddUINT64(TCG_CREATE_STRUCT *CreateStruct, UINT64 Value)
TCG_RESULT EFIAPI TcgAddEndName(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgGetMethodStatus(const TCG_PARSE_STRUCT *ParseStruct, UINT8 *MethodStatus)
TCG_RESULT EFIAPI TcgCreateSetCPin(TCG_CREATE_STRUCT *CreateStruct, UINT32 *Size, UINT16 ComId, UINT16 ComIdExtension, UINT32 TperSession, UINT32 HostSession, TCG_UID SidRow, const VOID *Password, UINT32 PasswordSize)
TCG_RESULT EFIAPI TcgGetNextEndOfData(TCG_PARSE_STRUCT *ParseStruct)
TCG_RESULT EFIAPI TcgAddStartName(TCG_CREATE_STRUCT *CreateStruct)
TCG_RESULT EFIAPI TcgAddBOOLEAN(TCG_CREATE_STRUCT *CreateStruct, BOOLEAN Value)
TCG_RESULT EFIAPI TcgAddUINT8(TCG_CREATE_STRUCT *CreateStruct, UINT8 Value)