2 Public API for the Tcg Core library to perform the lowest level TCG Data encoding.
4 (TCG Storage Architecture Core Specification, Version 2.01, Revision 1.00,
5 https://trustedcomputinggroup.org/tcg-storage-architecture-core-specification/)
7 Check http://trustedcomputinggroup.org for latest specification updates.
9 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
10 This program and the accompanying materials
11 are licensed and made available under the terms and conditions of the BSD License
12 which accompanies this distribution. The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
23 #include <IndustryStandard/TcgStorageCore.h>
25 #define ERROR_CHECK(arg) \
27 TCG_RESULT ret = (arg); \
28 if (ret != TcgResultSuccess) { \
29 DEBUG ((DEBUG_INFO, "ERROR_CHECK failed at %a:%u\n", __FILE__, __LINE__)); \
34 #define METHOD_STATUS_ERROR_CHECK(arg, failRet) \
35 if ((arg) != TCG_METHOD_STATUS_CODE_SUCCESS) { \
36 DEBUG ((DEBUG_INFO, "Method Status error: 0x%02X (%a)\n", arg, TcgMethodStatusString(arg))); \
40 #define NULL_CHECK(arg) \
42 if ((arg) == NULL) { \
43 DEBUG ((DEBUG_INFO, "NULL_CHECK(%a) failed at %a:%u\n", #arg, __FILE__, __LINE__)); \
44 return TcgResultFailureNullPointer; \
53 The result code indicates if the Tcg function call was successful or not
57 // This is the return result upon successful completion of a Tcg function call
62 // This is the return "catchall" result for the failure of a Tcg function call
67 // This is the return result if a required parameter was Null for a Tcg function call
69 TcgResultFailureNullPointer
,
72 // This is the return result if a required buffersize was 0 for a Tcg function call
74 TcgResultFailureZeroSize
,
77 // This is the return result if a Tcg function call was executed out of order.
78 // For instance, starting a Tcg subpacket before starting its Tcg packet.
80 TcgResultFailureInvalidAction
,
83 // This is the return result if the buffersize provided is not big enough to add a requested Tcg encoded item.
85 TcgResultFailureBufferTooSmall
,
88 // 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.
89 // For instance, attempting to retrieve another Tcg token from the Buffer after it has reached the end of the Tcg subpacket payload.
91 TcgResultFailureEndBuffer
,
94 // This is the return result for a Tcg parse function if the Tcg Token item requested is not the expected type.
95 // For instance, the caller requested to receive an integer and the Tcg token was a byte sequence.
97 TcgResultFailureInvalidType
,
101 // Structure that is used to build the Tcg ComPacket. It contains the start Buffer pointer and the current position of the
102 // Tcg ComPacket, current Tcg Packet and Tcg SubPacket. This structure must be initialized
103 // by calling tcgInitTcgCreateStruct before it is used as parameter to any other Tcg function.
104 // This structure should NOT be directly modified by the client of this library.
106 // NOTE: WE MAY MAKE THIS AN ABSTRACT STRUCTURE WITH A DEFINED SIZE AND KEEP THE VARIABLES
107 // INTERNAL AND ONLY KNOWN TO THE TCG LIBRARY
109 // tcgInitTcgCreateStruct
113 // Buffer allocated and freed by the client of the Tcg library.
114 // This is the Buffer that shall contain the final Tcg encoded compacket.
119 // Size of the Buffer provided.
124 //Pointer to the start of the Tcg ComPacket. It should point to a location within Buffer.
126 TCG_COM_PACKET
*ComPacket
;
129 // Current Tcg Packet that is being created. It should point to a location within Buffer.
131 TCG_PACKET
*CurPacket
;
134 // Current Tcg SubPacket that is being created. It should point to a location within Buffer.
136 TCG_SUB_PACKET
*CurSubPacket
;
139 // Flag used to indicate if the Buffer of the structure should be filled out.
140 // This is intended to be used to support a use-case where the client of library
141 // can perform all the desired tcg calls to determine what the actual Size of the final compacket will be.
142 // Then the client can allocate the required Buffer Size and re-run the tcg calls.
143 // THIS MAY NOT BE IMPLEMENTED... REQUIRES MORE THOUGHT BECAUSE YOU CANNOT SOLVE ISSUE FOR RECEIVE
149 // Structure that is used to parse the Tcg response received. It contains the response Buffer pointer
150 // and the current position of the Tcg ComPacket, current Tcg Packet and Tcg SubPacket being parsed.
151 // This structure must be initialized by calling tcgInitTcgParseStruct before it is used as parameter to any other Tcg parse function.
152 // This structure should NOT be directly modified by the client of this library.
154 // NOTE: WE MAY MAKE THIS AN ABSTRACT STRUCTURE WITH A DEFINED SIZE AND KEEP THE VARIABLES
155 // INTERNAL AND ONLY KNOWN TO THE TCG LIBRARY
157 // @sa tcgInitTcgParseStruct
161 // Buffer allocated and freed by the client of the Tcg library.
162 // This is the Buffer that contains the Tcg response to decode/parse.
167 //Size of the Buffer provided.
172 // Pointer to the start of the Tcg ComPacket. It should point to a location within Buffer.
174 TCG_COM_PACKET
*ComPacket
;
177 // Current Tcg Packet that is being created. It should point to a location within Buffer.
179 TCG_PACKET
*CurPacket
;
182 // Current Tcg SubPacket that is being created. It should point to a location within Buffer.
184 TCG_SUB_PACKET
*CurSubPacket
;
187 // Current pointer within the current subpacket payload.
194 // Structure that is used to represent a Tcg Token that is retrieved by Tcg parse functions.
198 // Describes the type of Tcg token the Hdr start points to.
203 // Pointer to the beginning of the Header of the Tcg token
210 Required to be called before calling any other Tcg functions with the TCG_CREATE_STRUCT.
211 Initializes the packet variables to NULL. Additionally, the buffer will be memset.
213 @param[in/out] CreateStruct Structure to initialize
214 @param[in] Buffer Buffer allocated by client of library. It will contain the Tcg encoded packet. This cannot be null.
215 @param[in] BufferSize Size of buffer provided. It cannot be 0.
220 TcgInitTcgCreateStruct(
221 TCG_CREATE_STRUCT
*CreateStruct
,
229 Encodes the ComPacket header to the data structure.
231 @param[in/out] CreateStruct Structure to initialize
232 @param[in] ComId ComID of the Tcg ComPacket.
233 @param[in] ComIdExtension ComID Extension of the Tcg ComPacket.
239 TCG_CREATE_STRUCT
*CreateStruct
,
241 UINT16 ComIdExtension
247 Starts a new ComPacket in the Data structure.
249 @param[in/out] CreateStruct Structure used to add Tcg Packet
250 @param[in] Tsn Packet Tper session number
251 @param[in] Hsn Packet Host session number
252 @param[in] SeqNumber Packet Sequence Number
253 @param[in] AckType Packet Acknowledge Type
254 @param[in] Ack Packet Acknowledge
260 TCG_CREATE_STRUCT
*CreateStruct
,
270 Starts a new SubPacket in the Data structure.
272 @param[in/out] CreateStruct Structure used to start Tcg SubPacket
273 @param[in] Kind SubPacket kind
279 TCG_CREATE_STRUCT
*CreateStruct
,
286 Ends the current SubPacket in the Data structure. This function will also perform the 4-byte padding
287 required for Subpackets.
289 @param[in/out] CreateStruct Structure used to end the current Tcg SubPacket
295 TCG_CREATE_STRUCT
*CreateStruct
301 Ends the current Packet in the Data structure.
303 @param[in/out] CreateStruct Structure used to end the current Tcg Packet
309 TCG_CREATE_STRUCT
*CreateStruct
315 Ends the ComPacket in the Data structure and ret
317 @param[in/out] CreateStruct Structure used to end the Tcg ComPacket
318 @param[in/out] Size Describes the Size of the entire ComPacket (Header and payload). Filled out by function.
324 TCG_CREATE_STRUCT
*CreateStruct
,
329 Adds a single raw token byte to the Data structure.
331 @param[in/out] CreateStruct Structure used to add the byte
332 @param [in] Byte Byte to add
338 TCG_CREATE_STRUCT
*CreateStruct
,
345 Adds the Data parameter as a byte sequence to the Data structure.
347 @param [in/out] CreateStruct Structure used to add the byte sequence
348 @param[in] Data Byte sequence that will be encoded and copied into Data structure
349 @param[in] DataSize Length of Data provided
350 @param[in] Continued TRUE if byte sequence is continued or
351 FALSE if the Data contains the entire byte sequence to be encoded
357 TCG_CREATE_STRUCT
*CreateStruct
,
366 Adds an arbitrary-Length integer to the Data structure.
368 The integer will be encoded using the shortest possible atom.
370 @param[in/out] CreateStruct Structure used to add the integer
371 @param[in] Data Integer in host byte order that will be encoded and copied into Data structure
372 @param[in] DataSize Length in bytes of the Data provided
373 @param[in] SignedInteger TRUE if the integer is signed or FALSE if the integer is unsigned
379 TCG_CREATE_STRUCT
*CreateStruct
,
382 BOOLEAN SignedInteger
387 Adds an 8-bit unsigned integer to the Data structure.
389 @param[in/out] CreateStruct Structure used to add the integer
390 @param[in] Value Integer Value to add
396 TCG_CREATE_STRUCT
*CreateStruct
,
402 Adds a 16-bit unsigned integer to the Data structure.
404 @param[in/out] CreateStruct Structure used to add the integer
405 @param[in] Value Integer Value to add
411 TCG_CREATE_STRUCT
*CreateStruct
,
417 Adds a 32-bit unsigned integer to the Data structure.
419 @param[in/out] CreateStruct Structure used to add the integer
420 @param[in] Value Integer Value to add
426 TCG_CREATE_STRUCT
*CreateStruct
,
433 Adds a 64-bit unsigned integer to the Data structure.
435 @param[in/out] CreateStruct Structure used to add the integer
436 @param[in] Value Integer Value to add
442 TCG_CREATE_STRUCT
*CreateStruct
,
447 Adds a BOOLEAN to the Data structure.
449 @param[in/out] CreateStruct Structure used to add the integer
450 @param[in] Value BOOLEAN Value to add
456 TCG_CREATE_STRUCT
*CreateStruct
,
463 @param [in/out] CreateStruct Structure used to add the integer
464 @param Uid Input uid info.
466 @retval return the action result.
472 TCG_CREATE_STRUCT
*CreateStruct
,
477 Adds a Start List token to the Data structure.
479 @param[in/out] CreateStruct Structure used to add the token
485 TCG_CREATE_STRUCT
*CreateStruct
491 Adds an End List token to the Data structure.
493 @param [in/out] CreateStruct Structure used to add the token
499 TCG_CREATE_STRUCT
*CreateStruct
504 Adds a Start Name token to the Data structure.
506 @param[in/out] CreateStruct Structure used to add the token
512 TCG_CREATE_STRUCT
*CreateStruct
518 Adds an End Name token to the Data structure.
520 @param [in/out] CreateStruct Structure used to add the token
526 TCG_CREATE_STRUCT
*CreateStruct
531 Adds a Call token to the Data structure.
533 @param [in/out] CreateStruct Structure used to add the token
539 TCG_CREATE_STRUCT
*CreateStruct
545 Adds an End of Data token to the Data structure.
547 @param[in/out] CreateStruct Structure used to add the token
553 TCG_CREATE_STRUCT
*CreateStruct
559 Adds an End of Session token to the Data structure.
561 @param [in/out] CreateStruct Structure used to add the token
567 TCG_CREATE_STRUCT
*CreateStruct
572 Adds a Start Transaction token to the Data structure.
574 @param [in/out] CreateStruct Structure used to add the token
579 TcgAddStartTransaction(
580 TCG_CREATE_STRUCT
*CreateStruct
585 Adds an End Transaction token to the Data structure.
587 @param[in/out] CreateStruct Structure used to add the token
592 TcgAddEndTransaction(
593 TCG_CREATE_STRUCT
*CreateStruct
597 Initial the tcg parse stucture.
599 @param ParseStruct Input parse structure.
600 @param Buffer Input buffer data.
601 @param BufferSize Input buffer size.
603 @retval return the action result.
608 TcgInitTcgParseStruct(
609 TCG_PARSE_STRUCT
*ParseStruct
,
617 @param ParseStruct Input parse structure info.
618 @param TcgToken return the tcg token info.
620 @retval return the action result.
626 TCG_PARSE_STRUCT
*ParseStruct
,
633 @param ParseStruct Input parse structure.
634 @param Type Input the type need to check.
636 @retval return the action result.
642 TCG_PARSE_STRUCT
*ParseStruct
,
649 @param TcgToken Input token info.
650 @param HeaderLength return the header length.
651 @param DataLength return the data length.
652 @param ByteOrInt return the atom Type.
653 @param SignOrCont return the sign or count info.
655 @retval return the action result.
661 const TCG_TOKEN
*TcgToken
,
662 UINT32
*HeaderLength
,
669 Get token byte sequence.
671 @param TcgToken Input token info.
672 @param Length Input the length info.
674 @retval Return the value data.
679 TcgGetTokenByteSequence(
680 const TCG_TOKEN
*TcgToken
,
685 Get token specified value.
687 @param TcgToken Input token info.
688 @param Value return the value.
690 @retval return the action result.
696 const TCG_TOKEN
*TcgToken
,
702 Get next specify value.
704 @param ParseStruct Input parse structure.
705 @param Value Return vlaue.
707 @retval return the action result.
713 TCG_PARSE_STRUCT
*ParseStruct
,
719 Get next specify value.
721 @param ParseStruct Input parse structure.
722 @param Value Return vlaue.
724 @retval return the action result.
730 TCG_PARSE_STRUCT
*ParseStruct
,
735 Get next specify value.
737 @param ParseStruct Input parse structure.
738 @param Value Return vlaue.
740 @retval return the action result.
746 TCG_PARSE_STRUCT
*ParseStruct
,
751 Get next specify value.
753 @param ParseStruct Input parse structure.
754 @param Value Return vlaue.
756 @retval return the action result.
762 TCG_PARSE_STRUCT
*ParseStruct
,
767 Get next specify value.
769 @param ParseStruct Input parse structure.
770 @param Value Return vlaue.
772 @retval return the action result.
778 TCG_PARSE_STRUCT
*ParseStruct
,
783 Get next tcg uid info.
785 @param ParseStruct Input parse structure.
786 @param Uid Get the uid info.
788 @retval return the action result.
794 TCG_PARSE_STRUCT
*ParseStruct
,
799 Get next byte sequence.
801 @param ParseStruct Input parse structure.
802 @param Data return the data.
803 @param Length return the length.
805 @retval return the action result.
810 TcgGetNextByteSequence(
811 TCG_PARSE_STRUCT
*ParseStruct
,
819 @param ParseStruct Input parse structure.
821 @retval return the action result.
827 TCG_PARSE_STRUCT
*ParseStruct
833 @param ParseStruct Input parse structure.
835 @retval return the action result.
841 TCG_PARSE_STRUCT
*ParseStruct
847 @param ParseStruct Input parse structure.
849 @retval return the action result.
855 TCG_PARSE_STRUCT
*ParseStruct
861 @param ParseStruct Input parse structure.
863 @retval return the action result.
869 TCG_PARSE_STRUCT
*ParseStruct
875 @param ParseStruct Input parse structure.
877 @retval return the action result.
883 TCG_PARSE_STRUCT
*ParseStruct
889 @param ParseStruct Input parse structure.
891 @retval return the action result.
897 TCG_PARSE_STRUCT
*ParseStruct
901 Get next end of session.
903 @param ParseStruct Input parse structure.
905 @retval return the action result.
910 TcgGetNextEndOfSession(
911 TCG_PARSE_STRUCT
*ParseStruct
915 Get next start transaction.
917 @param ParseStruct Input parse structure.
919 @retval return the action result.
924 TcgGetNextStartTransaction(
925 TCG_PARSE_STRUCT
*ParseStruct
929 Get next end transaction.
931 @param ParseStruct Input parse structure.
933 @retval return the action result.
938 TcgGetNextEndTransaction(
939 TCG_PARSE_STRUCT
*ParseStruct
942 // end of parse functions
947 (EFIAPI
* TCG_LEVEL0_ENUM_CALLBACK
) (
948 const TCG_LEVEL0_DISCOVERY_HEADER
*DiscoveryHeader
,
949 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER
*Feature
,
950 UINTN FeatureSize
, // includes header
955 Adds call token and method Header (invoking id, and method id).
957 @param CreateStruct The input create structure.
958 @param InvokingId Invoking id.
959 @param MethodId Method id.
965 TCG_CREATE_STRUCT
*CreateStruct
,
971 Adds START LIST token.
973 @param CreateStruct The input create structure.
979 TCG_CREATE_STRUCT
*CreateStruct
985 @param CreateStruct The input create structure.
991 TCG_CREATE_STRUCT
*CreateStruct
995 Adds END Data token and method list.
997 @param CreateStruct The input create structure.
1003 TCG_CREATE_STRUCT
*CreateStruct
1008 Adds Start Session call to the data structure. This creates the entire ComPacket structure and
1009 returns the size of the entire compacket in the size parameter.
1011 @param [in/out] CreateStruct Structure used to add the start session call
1012 @param [in/out] Size Describes the size of the entire ComPacket (header and payload). Filled out by function.
1013 @param [in] ComId ComID for the ComPacket
1014 @param [in] ComIdExtension Extended ComID for the ComPacket
1015 @param [in] HostSessionId Host Session ID
1016 @param [in] SpId Security Provider to start session with
1017 @param [in] Write Write option for start session. TRUE = start session requests write access
1018 @param [in] HostChallengeLength Length of the host challenge. Length should be 0 if hostChallenge is NULL
1019 @param [in] HostChallenge Host challenge for Host Signing Authority. If NULL, then no Host Challenge shall be sent.
1020 @param [in] HostSigningAuthority Host Signing Authority used for start session. If NULL, then no Host Signing Authority shall be sent.
1025 TcgCreateStartSession(
1026 TCG_CREATE_STRUCT
*CreateStruct
,
1029 UINT16 ComIdExtension
,
1030 UINT32 HostSessionId
,
1033 UINT32 HostChallengeLength
,
1034 const VOID
*HostChallenge
,
1035 TCG_UID HostSigningAuthority
1039 Creates ComPacket with a Method call that sets the PIN column for the row specified.
1040 This assumes a start session has already been opened with the desired SP.
1042 @param [in/out] CreateStruct Structure used to add method call.
1043 @param [in/out] Size Describes the size of the entire ComPacket (header and payload). Filled out by function.
1044 @param [in] ComId ComID for the ComPacket
1045 @param [in] ComIdExtension Extended ComID for the ComPacket
1046 @param [in] TperSession Tper Session ID for the Packet
1047 @param [in] HostSession Host Session ID for the Packet
1048 @param [in] SidRow UID of row of current SP to set PIN column
1049 @param [in] Password value of PIN to set
1050 @param [in] PasswordSize Size of PIN
1056 TCG_CREATE_STRUCT
*CreateStruct
,
1059 UINT16 ComIdExtension
,
1063 const VOID
*Password
,
1068 Creates ComPacket with a Method call that sets the "Enabled" column for the row specified using the value specified.
1069 This assumes a start session has already been opened with the desired SP.
1071 @param [in/out] CreateStruct Structure used to add method call
1072 @param [in/out] Size Describes the size of the entire ComPacket (header and payload). Filled out by function.
1073 @param [in] ComId ComID for the ComPacket
1074 @param [in] ComIdExtension Extended ComID for the ComPacket
1075 @param [in] TperSession Tper Session ID for the Packet
1076 @param [in] HostSession Host Session ID for the Packet
1077 @param [in] AuthorityUid Authority UID to modify the "Enabled" column for
1078 @param [in] Enabled Value to set the "Enabled" column to
1083 TcgSetAuthorityEnabled(
1084 TCG_CREATE_STRUCT
*CreateStruct
,
1087 UINT16 ComIdExtension
,
1090 TCG_UID AuthorityUid
,
1096 Creates ComPacket with EndSession.
1097 This assumes a start session has already been opened.
1099 @param [in/out] CreateStruct Structure used to add Endsession
1100 @param [in/out] Size Describes the size of the entire ComPacket (header and payload). Filled out by function.
1101 @param [in] ComId ComID for the ComPacket
1102 @param [in] ComIdExtension Extended ComID for the ComPacket
1103 @param [in] HostSessionId Host Session ID for the Packet
1104 @param [in] TpSessionId Tper Session ID for the Packet
1109 TcgCreateEndSession(
1110 TCG_CREATE_STRUCT
*CreateStruct
,
1113 UINT16 ComIdExtension
,
1114 UINT32 HostSessionId
,
1121 Retrieves human-readable token type name.
1123 @param[in] Type Token type to retrieve
1133 Returns the method status of the current subpacket. Does not affect the current position
1134 in the ComPacket. In other words, it can be called whenever you have a valid SubPacket.
1136 @param [in/out] ParseStruct Structure used to parse received TCG response
1137 @param [in/out] MethodStatus Method status retrieved of the current SubPacket
1143 const TCG_PARSE_STRUCT
*ParseStruct
,
1148 Returns a human-readable string representing a method status return code.
1150 @param[in] MethodStatus Method status to translate to a string
1153 @retval return the string info.
1157 TcgMethodStatusString(
1163 Retrieves the comID and Extended comID of the ComPacket in the Tcg response.
1164 It is intended to be used to confirm the received Tcg response is intended for user that received it.
1166 @param [in] ParseStruct Structure used to parse received TCG response.
1167 @param [in/out] ComId comID retrieved from received ComPacket.
1168 @param [in/out] ComIdExtension Extended comID retrieved from received ComPacket
1174 const TCG_PARSE_STRUCT
*ParseStruct
,
1176 UINT16
*ComIdExtension
1180 Checks if the ComIDs of the response match the expected values.
1182 @param[in] ParseStruct Structure used to parse received TCG response
1183 @param[in] ExpectedComId Expected comID
1184 @param[in] ExpectedComIdExtension Expected extended comID
1190 const TCG_PARSE_STRUCT
*ParseStruct
,
1191 UINT16 ExpectedComId
,
1192 UINT16 ExpectedComIdExtension
1196 Parses the Sync Session response contained in the parseStruct to retrieve Tper session ID. If the Sync Session response
1197 parameters do not match the comID, extended ComID and host session ID then a failure is returned.
1199 @param[in/out] ParseStruct Structure used to parse received TCG response, contains Sync Session response.
1200 @param[in] ComId Expected ComID that is compared to actual ComID of response
1201 @param[in] ComIdExtension Expected Extended ComID that is compared to actual Extended ComID of response
1202 @param[in] HostSessionId Expected Host Session ID that is compared to actual Host Session ID of response
1203 @param[in/out] TperSessionId Tper Session ID retrieved from the Sync Session response.
1208 TcgParseSyncSession(
1209 const TCG_PARSE_STRUCT
*ParseStruct
,
1211 UINT16 ComIdExtension
,
1212 UINT32 HostSessionId
,
1213 UINT32
*TperSessionId
1219 @param CreateStruct Input create structure.
1220 @param Size size info.
1221 @param ComId ComId info.
1222 @param ComIdExtension ComId extension info.
1223 @param TperSession Tper session data.
1224 @param HostSession Host session data.
1225 @param AceRow Ace row info.
1226 @param Authority1 Authority 1 info.
1227 @param LogicalOperator Logiccal operator info.
1228 @param Authority2 Authority 2 info.
1230 @retval Return the action result.
1236 TCG_CREATE_STRUCT
*CreateStruct
,
1239 UINT16 ComIdExtension
,
1244 BOOLEAN LogicalOperator
,
1249 Enum level 0 discovery.
1251 @param DiscoveryHeader Discovery header.
1252 @param Callback Callback function.
1253 @param Context The context for the function.
1255 @retval return true if the callback return TRUE, else return FALSE.
1260 TcgEnumLevel0Discovery(
1261 const TCG_LEVEL0_DISCOVERY_HEADER
*DiscoveryHeader
,
1262 TCG_LEVEL0_ENUM_CALLBACK Callback
,
1267 Get Feature code from the header.
1269 @param DiscoveryHeader The discovery header.
1270 @param FeatureCode reutrn the Feature code.
1271 @param FeatureSize return the Feature size.
1273 @retval return the Feature code data.
1275 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER
*
1278 const TCG_LEVEL0_DISCOVERY_HEADER
*DiscoveryHeader
,
1284 Determines if the protocol provided is part of the provided supported protocol list.
1286 @param[in] ProtocolList Supported protocol list to investigate
1287 @param[in] Protocol Protocol value to determine if supported
1289 @return TRUE = protocol is supported, FALSE = protocol is not supported
1293 TcgIsProtocolSupported(
1294 const TCG_SUPPORTED_SECURITY_PROTOCOLS
*ProtocolList
,
1299 Determines if the Locking Feature "Locked" bit is set in the level 0 discovery response.
1301 @param[in] Discovery Level 0 discovery response
1303 @return TRUE = Locked is set, FALSE = Locked is false
1309 const TCG_LEVEL0_DISCOVERY_HEADER
*Discovery
1315 #endif // _TCG_CORE_H_