TianoCore EDK2 master
Loading...
Searching...
No Matches
TcgStorageCore.c File Reference

Go to the source code of this file.

Functions

TCG_RESULT EFIAPI TcgInitTcgCreateStruct (TCG_CREATE_STRUCT *CreateStruct, VOID *Buffer, UINT32 BufferSize)
 
TCG_RESULT EFIAPI TcgStartComPacket (TCG_CREATE_STRUCT *CreateStruct, UINT16 ComId, UINT16 ComIdExtension)
 
TCG_RESULT EFIAPI TcgStartPacket (TCG_CREATE_STRUCT *CreateStruct, UINT32 Tsn, UINT32 Hsn, UINT32 SeqNumber, UINT16 AckType, UINT32 Ack)
 
TCG_RESULT EFIAPI TcgStartSubPacket (TCG_CREATE_STRUCT *CreateStruct, UINT16 Kind)
 
TCG_RESULT EFIAPI TcgEndSubPacket (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgEndPacket (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgEndComPacket (TCG_CREATE_STRUCT *CreateStruct, UINT32 *Size)
 
TCG_RESULT TcgAddRawTokenData (TCG_CREATE_STRUCT *CreateStruct, const VOID *Header, UINT8 HeaderSize, const VOID *Data, UINT32 DataSize, BOOLEAN ByteSwapData)
 
TCG_RESULT EFIAPI TcgAddRawByte (TCG_CREATE_STRUCT *CreateStruct, UINT8 Byte)
 
TCG_RESULT TcgAddAtom (TCG_CREATE_STRUCT *CreateStruct, const VOID *Data, UINT32 DataSize, UINT8 ByteOrInt, UINT8 SignOrCont)
 
TCG_RESULT EFIAPI TcgAddByteSequence (TCG_CREATE_STRUCT *CreateStruct, const VOID *Data, UINT32 DataSize, BOOLEAN Continued)
 
TCG_RESULT EFIAPI TcgAddInteger (TCG_CREATE_STRUCT *CreateStruct, const VOID *Data, UINT32 DataSize, BOOLEAN SignedInteger)
 
TCG_RESULT EFIAPI TcgAddUINT8 (TCG_CREATE_STRUCT *CreateStruct, UINT8 Value)
 
TCG_RESULT EFIAPI TcgAddUINT16 (TCG_CREATE_STRUCT *CreateStruct, UINT16 Value)
 
TCG_RESULT EFIAPI TcgAddUINT32 (TCG_CREATE_STRUCT *CreateStruct, UINT32 Value)
 
TCG_RESULT EFIAPI TcgAddUINT64 (TCG_CREATE_STRUCT *CreateStruct, UINT64 Value)
 
TCG_RESULT EFIAPI TcgAddBOOLEAN (TCG_CREATE_STRUCT *CreateStruct, BOOLEAN Value)
 
TCG_RESULT EFIAPI TcgAddTcgUid (TCG_CREATE_STRUCT *CreateStruct, TCG_UID Uid)
 
TCG_RESULT EFIAPI TcgAddStartList (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddEndList (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddStartName (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddEndName (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddCall (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddEndOfData (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddEndOfSession (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddStartTransaction (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgAddEndTransaction (TCG_CREATE_STRUCT *CreateStruct)
 
TCG_RESULT EFIAPI TcgInitTcgParseStruct (TCG_PARSE_STRUCT *ParseStruct, const VOID *Buffer, UINT32 BufferSize)
 
TCG_RESULT EFIAPI TcgGetNextToken (TCG_PARSE_STRUCT *ParseStruct, TCG_TOKEN *TcgToken)
 
TCG_RESULT EFIAPI TcgGetAtomInfo (const TCG_TOKEN *TcgToken, UINT32 *HeaderLength, UINT32 *DataLength, UINT8 *ByteOrInt, UINT8 *SignOrCont)
 
TCG_RESULT EFIAPI TcgGetTokenUINT64 (const TCG_TOKEN *TcgToken, UINT64 *Value)
 
UINT8 *EFIAPI TcgGetTokenByteSequence (const TCG_TOKEN *TcgToken, UINT32 *Length)
 
TCG_RESULT EFIAPI TcgGetNextUINT8 (TCG_PARSE_STRUCT *ParseStruct, UINT8 *Value)
 
TCG_RESULT EFIAPI TcgGetNextUINT16 (TCG_PARSE_STRUCT *ParseStruct, UINT16 *Value)
 
TCG_RESULT EFIAPI TcgGetNextUINT32 (TCG_PARSE_STRUCT *ParseStruct, UINT32 *Value)
 
TCG_RESULT EFIAPI TcgGetNextUINT64 (TCG_PARSE_STRUCT *ParseStruct, UINT64 *Value)
 
TCG_RESULT EFIAPI TcgGetNextBOOLEAN (TCG_PARSE_STRUCT *ParseStruct, BOOLEAN *Value)
 
TCG_RESULT EFIAPI TcgGetNextTcgUid (TCG_PARSE_STRUCT *ParseStruct, TCG_UID *Uid)
 
TCG_RESULT EFIAPI TcgGetNextByteSequence (TCG_PARSE_STRUCT *ParseStruct, const VOID **Data, UINT32 *Length)
 
TCG_RESULT EFIAPI TcgGetNextTokenType (TCG_PARSE_STRUCT *ParseStruct, TCG_TOKEN_TYPE Type)
 
TCG_RESULT EFIAPI TcgGetNextStartList (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextEndList (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextStartName (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextEndName (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextCall (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextEndOfData (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextEndOfSession (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextStartTransaction (TCG_PARSE_STRUCT *ParseStruct)
 
TCG_RESULT EFIAPI TcgGetNextEndTransaction (TCG_PARSE_STRUCT *ParseStruct)
 

Detailed Description

Provide functions to provide tcg storage core spec related functions.

Copyright (c) 2016, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TcgStorageCore.c.

Function Documentation

◆ TcgAddAtom()

TCG_RESULT TcgAddAtom ( TCG_CREATE_STRUCT CreateStruct,
const VOID *  Data,
UINT32  DataSize,
UINT8  ByteOrInt,
UINT8  SignOrCont 
)

simple tokens - atoms: tiny, short, medium, long and empty atoms. tiny atom can be a signed or unsigned integer. short, medium, long can be a signed or unsigned integer OR a complete or non-final byte sequence.

Parameters
CreateStructThe create structure.
DataThe data need to add.
DataSizeThe data size.
ByteOrInt,Dataformat is byte or int.
SignOrContsign or cont.

Definition at line 444 of file TcgStorageCore.c.

◆ TcgAddBOOLEAN()

TCG_RESULT EFIAPI TcgAddBOOLEAN ( TCG_CREATE_STRUCT CreateStruct,
BOOLEAN  Value 
)

Adds a BOOLEAN to the Data structure.

Parameters
[in/out]CreateStruct Structure used to add the integer
[in]ValueBOOLEAN Value to add

Definition at line 672 of file TcgStorageCore.c.

◆ TcgAddByteSequence()

TCG_RESULT EFIAPI TcgAddByteSequence ( TCG_CREATE_STRUCT CreateStruct,
const VOID *  Data,
UINT32  DataSize,
BOOLEAN  Continued 
)

Adds the Data parameter as a byte sequence to the Data structure.

Parameters
[in/out]CreateStruct Structure used to add the byte sequence
[in]DataByte sequence that will be encoded and copied into Data structure
[in]DataSizeLength of Data provided
[in]ContinuedTRUE if byte sequence is continued or FALSE if the Data contains the entire byte sequence to be encoded

Definition at line 529 of file TcgStorageCore.c.

◆ TcgAddCall()

TCG_RESULT EFIAPI TcgAddCall ( TCG_CREATE_STRUCT CreateStruct)

Add end call.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 777 of file TcgStorageCore.c.

◆ TcgAddEndList()

TCG_RESULT EFIAPI TcgAddEndList ( TCG_CREATE_STRUCT CreateStruct)

Add end list.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 726 of file TcgStorageCore.c.

◆ TcgAddEndName()

TCG_RESULT EFIAPI TcgAddEndName ( TCG_CREATE_STRUCT CreateStruct)

Add end name.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 760 of file TcgStorageCore.c.

◆ TcgAddEndOfData()

TCG_RESULT EFIAPI TcgAddEndOfData ( TCG_CREATE_STRUCT CreateStruct)

Add end of data.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 794 of file TcgStorageCore.c.

◆ TcgAddEndOfSession()

TCG_RESULT EFIAPI TcgAddEndOfSession ( TCG_CREATE_STRUCT CreateStruct)

Add end of session.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 811 of file TcgStorageCore.c.

◆ TcgAddEndTransaction()

TCG_RESULT EFIAPI TcgAddEndTransaction ( TCG_CREATE_STRUCT CreateStruct)

Add end transaction.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 845 of file TcgStorageCore.c.

◆ TcgAddInteger()

TCG_RESULT EFIAPI TcgAddInteger ( TCG_CREATE_STRUCT CreateStruct,
const VOID *  Data,
UINT32  DataSize,
BOOLEAN  SignedInteger 
)

Adds an arbitrary-Length integer to the Data structure. The integer will be encoded using the shortest possible atom.

Parameters
[in/out]CreateStruct Structure used to add the integer
[in]DataInteger in host byte order that will be encoded and copied into Data structure
[in]DataSizeLength in bytes of the Data provided
[in]SignedIntegerTRUE if the integer is signed or FALSE if the integer is unsigned

Definition at line 552 of file TcgStorageCore.c.

◆ TcgAddRawByte()

TCG_RESULT EFIAPI TcgAddRawByte ( TCG_CREATE_STRUCT CreateStruct,
UINT8  Byte 
)

Adds a single raw token byte to the Data structure.

Parameters
[in/out]CreateStruct Structure used to add the byte
[in]ByteByte to add

Definition at line 422 of file TcgStorageCore.c.

◆ TcgAddRawTokenData()

TCG_RESULT TcgAddRawTokenData ( TCG_CREATE_STRUCT CreateStruct,
const VOID *  Header,
UINT8  HeaderSize,
const VOID *  Data,
UINT32  DataSize,
BOOLEAN  ByteSwapData 
)

Adds raw Data with optional Header

Parameters
CreateStructThe create structure.
HeaderThe header structure.
HeaderSizeThe header size.
DataThe data need to add.
DataSizeThe data size.
ByteSwapDataWhether byte or swap data.

Definition at line 334 of file TcgStorageCore.c.

◆ TcgAddStartList()

TCG_RESULT EFIAPI TcgAddStartList ( TCG_CREATE_STRUCT CreateStruct)

Add start list.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 709 of file TcgStorageCore.c.

◆ TcgAddStartName()

TCG_RESULT EFIAPI TcgAddStartName ( TCG_CREATE_STRUCT CreateStruct)

Add start name.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 743 of file TcgStorageCore.c.

◆ TcgAddStartTransaction()

TCG_RESULT EFIAPI TcgAddStartTransaction ( TCG_CREATE_STRUCT CreateStruct)

Add start transaction.

Parameters
[in/out]CreateStruct Structure used to add the integer
Return values
returnthe action result.

Definition at line 828 of file TcgStorageCore.c.

◆ TcgAddTcgUid()

TCG_RESULT EFIAPI TcgAddTcgUid ( TCG_CREATE_STRUCT CreateStruct,
TCG_UID  Uid 
)

Add tcg uid info.

Parameters
[in/out]CreateStruct Structure used to add the integer
UidInput uid info.
Return values
returnthe action result.

Definition at line 691 of file TcgStorageCore.c.

◆ TcgAddUINT16()

TCG_RESULT EFIAPI TcgAddUINT16 ( TCG_CREATE_STRUCT CreateStruct,
UINT16  Value 
)

Adds a 16-bit unsigned integer to the Data structure.

Parameters
[in/out]CreateStruct Structure used to add the integer
[in]ValueInteger Value to add

Definition at line 619 of file TcgStorageCore.c.

◆ TcgAddUINT32()

TCG_RESULT EFIAPI TcgAddUINT32 ( TCG_CREATE_STRUCT CreateStruct,
UINT32  Value 
)

Adds a 32-bit unsigned integer to the Data structure.

Parameters
[in/out]CreateStruct Structure used to add the integer
[in]ValueInteger Value to add

Definition at line 637 of file TcgStorageCore.c.

◆ TcgAddUINT64()

TCG_RESULT EFIAPI TcgAddUINT64 ( TCG_CREATE_STRUCT CreateStruct,
UINT64  Value 
)

Adds a 64-bit unsigned integer to the Data structure.

Parameters
[in/out]CreateStruct Structure used to add the integer
[in]ValueInteger Value to add

Definition at line 655 of file TcgStorageCore.c.

◆ TcgAddUINT8()

TCG_RESULT EFIAPI TcgAddUINT8 ( TCG_CREATE_STRUCT CreateStruct,
UINT8  Value 
)

Adds an 8-bit unsigned integer to the Data structure.

Parameters
[in/out]CreateStruct Structure used to add the integer
[in]ValueInteger Value to add

Definition at line 601 of file TcgStorageCore.c.

◆ TcgEndComPacket()

TCG_RESULT EFIAPI TcgEndComPacket ( TCG_CREATE_STRUCT CreateStruct,
UINT32 *  Size 
)

Ends the ComPacket in the Data structure and ret

Parameters
[in/out]CreateStruct Structure used to end the Tcg ComPacket
[in/out]Size Describes the Size of the entire ComPacket (Header and payload). Filled out by function.

Definition at line 299 of file TcgStorageCore.c.

◆ TcgEndPacket()

TCG_RESULT EFIAPI TcgEndPacket ( TCG_CREATE_STRUCT CreateStruct)

Ends the current Packet in the Data structure.

Parameters
[in/out]CreateStruct Structure used to end the current Tcg Packet

Definition at line 269 of file TcgStorageCore.c.

◆ TcgEndSubPacket()

TCG_RESULT EFIAPI TcgEndSubPacket ( TCG_CREATE_STRUCT CreateStruct)

Ends the current SubPacket in the Data structure. This function will also perform the 4-byte padding required for Subpackets.

Parameters
[in/out]CreateStruct Structure used to end the current Tcg SubPacket

Definition at line 220 of file TcgStorageCore.c.

◆ TcgGetAtomInfo()

TCG_RESULT EFIAPI TcgGetAtomInfo ( const TCG_TOKEN TcgToken,
UINT32 *  HeaderLength,
UINT32 *  DataLength,
UINT8 *  ByteOrInt,
UINT8 *  SignOrCont 
)

Get atom info.

Parameters
TcgTokenInput token info.
HeaderLengthreturn the header length.
DataLengthreturn the data length.
ByteOrIntreturn the atom Type.
SignOrContreturn the sign or count info.
Return values
returnthe action result.

Definition at line 1101 of file TcgStorageCore.c.

◆ TcgGetNextBOOLEAN()

TCG_RESULT EFIAPI TcgGetNextBOOLEAN ( TCG_PARSE_STRUCT ParseStruct,
BOOLEAN *  Value 
)

Get next specify value.

Parameters
ParseStructInput parse structure.
ValueReturn value.
Return values
returnthe action result.

Definition at line 1403 of file TcgStorageCore.c.

◆ TcgGetNextByteSequence()

TCG_RESULT EFIAPI TcgGetNextByteSequence ( TCG_PARSE_STRUCT ParseStruct,
const VOID **  Data,
UINT32 *  Length 
)

Get next byte sequence.

Parameters
ParseStructInput parse structure.
Datareturn the data.
Lengthreturn the length.
Return values
returnthe action result.

Definition at line 1474 of file TcgStorageCore.c.

◆ TcgGetNextCall()

TCG_RESULT EFIAPI TcgGetNextCall ( TCG_PARSE_STRUCT ParseStruct)

Get next call.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1599 of file TcgStorageCore.c.

◆ TcgGetNextEndList()

TCG_RESULT EFIAPI TcgGetNextEndList ( TCG_PARSE_STRUCT ParseStruct)

Get next end list.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1548 of file TcgStorageCore.c.

◆ TcgGetNextEndName()

TCG_RESULT EFIAPI TcgGetNextEndName ( TCG_PARSE_STRUCT ParseStruct)

Get next end name.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1582 of file TcgStorageCore.c.

◆ TcgGetNextEndOfData()

TCG_RESULT EFIAPI TcgGetNextEndOfData ( TCG_PARSE_STRUCT ParseStruct)

Get next end data.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1616 of file TcgStorageCore.c.

◆ TcgGetNextEndOfSession()

TCG_RESULT EFIAPI TcgGetNextEndOfSession ( TCG_PARSE_STRUCT ParseStruct)

Get next end of session.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1633 of file TcgStorageCore.c.

◆ TcgGetNextEndTransaction()

TCG_RESULT EFIAPI TcgGetNextEndTransaction ( TCG_PARSE_STRUCT ParseStruct)

Get next end transaction.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1667 of file TcgStorageCore.c.

◆ TcgGetNextStartList()

TCG_RESULT EFIAPI TcgGetNextStartList ( TCG_PARSE_STRUCT ParseStruct)

Get next start list.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1531 of file TcgStorageCore.c.

◆ TcgGetNextStartName()

TCG_RESULT EFIAPI TcgGetNextStartName ( TCG_PARSE_STRUCT ParseStruct)

Get next start name.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1565 of file TcgStorageCore.c.

◆ TcgGetNextStartTransaction()

TCG_RESULT EFIAPI TcgGetNextStartTransaction ( TCG_PARSE_STRUCT ParseStruct)

Get next start transaction.

Parameters
ParseStructInput parse structure.
Return values
returnthe action result.

Definition at line 1650 of file TcgStorageCore.c.

◆ TcgGetNextTcgUid()

TCG_RESULT EFIAPI TcgGetNextTcgUid ( TCG_PARSE_STRUCT ParseStruct,
TCG_UID Uid 
)

Get next tcg uid info.

Parameters
ParseStructInput parse structure.
UidGet the uid info.
Return values
returnthe action result.

Definition at line 1436 of file TcgStorageCore.c.

◆ TcgGetNextToken()

TCG_RESULT EFIAPI TcgGetNextToken ( TCG_PARSE_STRUCT ParseStruct,
TCG_TOKEN TcgToken 
)

Get next token info.

Parameters
ParseStructInput parse structure info.
TcgTokenreturn the tcg token info.
Return values
returnthe action result.

Definition at line 933 of file TcgStorageCore.c.

◆ TcgGetNextTokenType()

TCG_RESULT EFIAPI TcgGetNextTokenType ( TCG_PARSE_STRUCT ParseStruct,
TCG_TOKEN_TYPE  Type 
)

Get next token Type.

Parameters
ParseStructInput parse structure.
TypeInput the type need to check.
Return values
returnthe action result.

Definition at line 1505 of file TcgStorageCore.c.

◆ TcgGetNextUINT16()

TCG_RESULT EFIAPI TcgGetNextUINT16 ( TCG_PARSE_STRUCT ParseStruct,
UINT16 *  Value 
)

Get next specify value.

Parameters
ParseStructInput parse structure.
ValueReturn value.
Return values
returnthe action result.

Definition at line 1314 of file TcgStorageCore.c.

◆ TcgGetNextUINT32()

TCG_RESULT EFIAPI TcgGetNextUINT32 ( TCG_PARSE_STRUCT ParseStruct,
UINT32 *  Value 
)

Get next specify value.

Parameters
ParseStructInput parse structure.
ValueReturn value.
Return values
returnthe action result.

Definition at line 1347 of file TcgStorageCore.c.

◆ TcgGetNextUINT64()

TCG_RESULT EFIAPI TcgGetNextUINT64 ( TCG_PARSE_STRUCT ParseStruct,
UINT64 *  Value 
)

Get next specify value.

Parameters
ParseStructInput parse structure.
ValueReturn value.
Return values
returnthe action result.

Definition at line 1380 of file TcgStorageCore.c.

◆ TcgGetNextUINT8()

TCG_RESULT EFIAPI TcgGetNextUINT8 ( TCG_PARSE_STRUCT ParseStruct,
UINT8 *  Value 
)

Get next specify value.

Parameters
ParseStructInput parse structure.
ValueReturn value.
Return values
returnthe action result.

Definition at line 1281 of file TcgStorageCore.c.

◆ TcgGetTokenByteSequence()

UINT8 *EFIAPI TcgGetTokenByteSequence ( const TCG_TOKEN TcgToken,
UINT32 *  Length 
)

Get token byte sequence.

Parameters
TcgTokenInput token info.
LengthInput the length info.
Return values
Returnthe value data.

Definition at line 1243 of file TcgStorageCore.c.

◆ TcgGetTokenUINT64()

TCG_RESULT EFIAPI TcgGetTokenUINT64 ( const TCG_TOKEN TcgToken,
UINT64 *  Value 
)

Get token specified value.

Parameters
TcgTokenInput token info.
Valuereturn the value.
Return values
returnthe action result.

Definition at line 1180 of file TcgStorageCore.c.

◆ TcgInitTcgCreateStruct()

TCG_RESULT EFIAPI TcgInitTcgCreateStruct ( TCG_CREATE_STRUCT CreateStruct,
VOID *  Buffer,
UINT32  BufferSize 
)

Required to be called before calling any other Tcg functions with the TCG_CREATE_STRUCT. Initializes the packet variables to NULL. Additionally, the buffer will be memset.

Parameters
[in/out]CreateStruct Structure to initialize
[in]BufferBuffer allocated by client of library. It will contain the Tcg encoded packet. This cannot be null.
[in]BufferSizeSize of buffer provided. It cannot be 0.
Return values
Returnthe action result.

Definition at line 28 of file TcgStorageCore.c.

◆ TcgInitTcgParseStruct()

TCG_RESULT EFIAPI TcgInitTcgParseStruct ( TCG_PARSE_STRUCT ParseStruct,
const VOID *  Buffer,
UINT32  BufferSize 
)

Initial the tcg parse structure.

Parameters
ParseStructInput parse structure.
BufferInput buffer data.
BufferSizeInput buffer size.
Return values
returnthe action result.

Definition at line 864 of file TcgStorageCore.c.

◆ TcgStartComPacket()

TCG_RESULT EFIAPI TcgStartComPacket ( TCG_CREATE_STRUCT CreateStruct,
UINT16  ComId,
UINT16  ComIdExtension 
)

Encodes the ComPacket header to the data structure.

Parameters
[in/out]CreateStruct Structure to initialize
[in]ComIdComID of the Tcg ComPacket.
[in]ComIdExtensionComID Extension of the Tcg ComPacket.

Definition at line 63 of file TcgStorageCore.c.

◆ TcgStartPacket()

TCG_RESULT EFIAPI TcgStartPacket ( TCG_CREATE_STRUCT CreateStruct,
UINT32  Tsn,
UINT32  Hsn,
UINT32  SeqNumber,
UINT16  AckType,
UINT32  Ack 
)

Starts a new ComPacket in the Data structure.

Parameters
[in/out]CreateStruct Structure used to add Tcg Packet
[in]TsnPacket Tper session number
[in]HsnPacket Host session number
[in]SeqNumberPacket Sequence Number
[in]AckTypePacket Acknowledge Type
[in]AckPacket Acknowledge

Definition at line 112 of file TcgStorageCore.c.

◆ TcgStartSubPacket()

TCG_RESULT EFIAPI TcgStartSubPacket ( TCG_CREATE_STRUCT CreateStruct,
UINT16  Kind 
)

Starts a new SubPacket in the Data structure.

Parameters
[in/out]CreateStruct Structure used to start Tcg SubPacket
[in]KindSubPacket kind

Definition at line 170 of file TcgStorageCore.c.