SecurityPkg/Tcg/TcgDxe/TisDxe.c File Reference


Functions

EFI_STATUS TisPcSend (IN TIS_PC_REGISTERS_PTR TisReg, IN UINT8 *TpmBuffer, IN UINT32 DataLength)
EFI_STATUS TisPcReceive (IN TIS_PC_REGISTERS_PTR TisReg, OUT UINT8 *TpmBuffer, OUT UINT32 *RespSize)
EFI_STATUS TisPcSendV (IN UINT8 FmtChar, IN OUT VA_LIST *ap, UINT8 *TpmBuffer, UINT32 *DataLength)
EFI_STATUS TisPcReceiveV (IN UINT8 FmtChar, IN OUT VA_LIST *ap, OUT UINT8 *TpmBuffer, IN OUT UINT32 *DataIndex, IN UINT32 RespSize, OUT BOOLEAN *DataFinished)
EFI_STATUS EFIAPI TisPcExecute (IN TIS_TPM_HANDLE TisReg, IN CONST CHAR8 *Fmt,...)

Variables

STATIC UINT8 TpmCommandBuf [TPMCMDBUFLENGTH]

Detailed Description

TIS (TPM Interface Specification) functions used by TPM Dxe driver.

Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Function Documentation

EFI_STATUS EFIAPI TisPcExecute ( IN TIS_TPM_HANDLE  TisReg,
IN CONST CHAR8 *  Fmt,
  ... 
)

Send formatted command to TPM for execution and return formatted data from response.

Parameters:
[in] TisReg TPM Handle.
[in] Fmt Format control string.
[in] ... The variable argument list.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_TIMEOUT The register can't run into the expected status in time.

References BOOLEAN(), EFI_STATUS(), TIS_PC_STS_GO, TIS_PC_STS_READY, TisPcReceive(), TisPcReceiveV(), TisPcSend(), TisPcSendV(), TPMCMDBUFLENGTH, TpmCommandBuf, and UINTN().

Referenced by TcgDxePassThroughToTpm(), TpmCommExtend(), and TpmCommGetFlags().

EFI_STATUS TisPcReceive ( IN TIS_PC_REGISTERS_PTR  TisReg,
OUT UINT8 *  TpmBuffer,
OUT UINT32 *  RespSize 
)

Receive response data of last command from TPM.

Parameters:
[in] TisReg TPM register space base address.
[out] TpmBuffer Buffer for response data.
[out] RespSize Response data length.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_TIMEOUT The register can't run into the expected status in time.
EFI_DEVICE_ERROR Unexpected device status.
EFI_BUFFER_TOO_SMALL Response data is too long.

References EFI_STATUS(), TIS_PC_STS_DATA, TIS_PC_VALID, TIS_TIMEOUT_B, TisPcReadBurstCount(), TisPcWaitRegisterBits(), TPMCMDBUFLENGTH, and UINTN().

Referenced by TisPcExecute().

EFI_STATUS TisPcReceiveV ( IN UINT8  FmtChar,
IN OUT VA_LIST *  ap,
OUT UINT8 *  TpmBuffer,
IN OUT UINT32 *  DataIndex,
IN UINT32  RespSize,
OUT BOOLEAN *  DataFinished 
)

Format reponse data according to the format control character.

Parameters:
[in] FmtChar Format control character.
[in,out] ap List of arguments.
[out] TpmBuffer Buffer for reponse data.
[in,out] DataIndex Data offset in reponse data buffer.
[in] RespSize Response data length.
[out] DataFinished Reach the end of Response data.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_INVALID_PARAMETER Invalid format control character.
EFI_BUFFER_TOO_SMALL Buffer too small for command data.

References TPMCMDBUFLENGTH, TRUE, and UINTN().

Referenced by TisPcExecute().

EFI_STATUS TisPcSend ( IN TIS_PC_REGISTERS_PTR  TisReg,
IN UINT8 *  TpmBuffer,
IN UINT32  DataLength 
)

Send command to TPM for execution.

Parameters:
[in] TisReg TPM register space base address.
[in] TpmBuffer Buffer for TPM command data.
[in] DataLength TPM command data length.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_TIMEOUT The register can't run into the expected status in time.

References EFI_STATUS(), TIS_PC_STS_EXPECT, TIS_PC_VALID, TIS_TIMEOUT_C, TisPcPrepareCommand(), TisPcReadBurstCount(), TisPcWaitRegisterBits(), and UINTN().

Referenced by TisPcExecute().

EFI_STATUS TisPcSendV ( IN UINT8  FmtChar,
IN OUT VA_LIST *  ap,
UINT8 *  TpmBuffer,
UINT32 *  DataLength 
)

Format TPM command data according to the format control character.

Parameters:
[in] FmtChar Format control character.
[in,out] ap List of arguments.
[in] TpmBuffer Buffer for TPM command data.
[out] DataLength TPM command data length.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_INVALID_PARAMETER Invalid format control character.
EFI_BUFFER_TOO_SMALL Buffer too small for command data.

References TPMCMDBUFLENGTH, and UINTN().

Referenced by TisPcExecute().


Variable Documentation

STATIC UINT8 TpmCommandBuf[TPMCMDBUFLENGTH]

Referenced by TisPcExecute().


Generated on Thu Sep 24 23:44:24 2015 for SecurityPkg[ALL] by  doxygen 1.5.7.1