SecurityPkg[all]  0.98
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tpm12CommandLib.h File Reference

Data Structures

struct  TPM12_PCR_SELECTION
 
struct  TPM12_PCR_INFO_SHORT
 
struct  TPM12_NV_DATA_PUBLIC
 

Functions

EFI_STATUS EFIAPI Tpm12Startup (IN TPM_STARTUP_TYPE TpmSt)
 
EFI_STATUS EFIAPI Tpm12SaveState (VOID)
 
EFI_STATUS EFIAPI Tpm12ForceClear (VOID)
 
EFI_STATUS EFIAPI Tpm12NvDefineSpace (IN TPM12_NV_DATA_PUBLIC *PubInfo, IN TPM_ENCAUTH *EncAuth)
 
EFI_STATUS EFIAPI Tpm12NvReadValue (IN TPM_NV_INDEX NvIndex, IN UINT32 Offset, IN OUT UINT32 *DataSize, OUT UINT8 *Data)
 
EFI_STATUS EFIAPI Tpm12NvWriteValue (IN TPM_NV_INDEX NvIndex, IN UINT32 Offset, IN UINT32 DataSize, IN UINT8 *Data)
 
EFI_STATUS EFIAPI Tpm12Extend (IN TPM_DIGEST *DigestToExtend, IN TPM_PCRINDEX PcrIndex, OUT TPM_DIGEST *NewPcrValue)
 
EFI_STATUS EFIAPI Tpm12PhysicalPresence (IN TPM_PHYSICAL_PRESENCE PhysicalPresence)
 
EFI_STATUS EFIAPI Tpm12ContinueSelfTest (VOID)
 
EFI_STATUS EFIAPI Tpm12GetCapabilityFlagPermanent (OUT TPM_PERMANENT_FLAGS *TpmPermanentFlags)
 
EFI_STATUS EFIAPI Tpm12GetCapabilityFlagVolatile (OUT TPM_STCLEAR_FLAGS *VolatileFlags)
 

Detailed Description

This library is used by other modules to send TPM12 command.

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

Function Documentation

EFI_STATUS EFIAPI Tpm12ContinueSelfTest ( VOID  )

Send TPM_ContinueSelfTest command to TPM.

Return values
EFI_SUCCESSOperation completed successfully.
EFI_TIMEOUTThe register can't run into the expected status in time.
EFI_BUFFER_TOO_SMALLResponse data buffer is too small.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12Extend ( IN TPM_DIGEST *  DigestToExtend,
IN TPM_PCRINDEX  PcrIndex,
OUT TPM_DIGEST *  NewPcrValue 
)

Extend a TPM PCR.

Parameters
[in]DigestToExtendThe 160 bit value representing the event to be recorded.
[in]PcrIndexThe PCR to be updated.
[out]NewPcrValueNew PCR value after extend.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_TIMEOUTThe register can't run into the expected status in time.
EFI_BUFFER_TOO_SMALLResponse data buffer is too small.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12ForceClear ( VOID  )

Send ForceClear command to TPM1.2.

Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12GetCapabilityFlagPermanent ( OUT TPM_PERMANENT_FLAGS *  TpmPermanentFlags)

Get TPM capability permanent flags.

Parameters
[out]TpmPermanentFlagsPointer to the buffer for returned flag structure.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_TIMEOUTThe register can't run into the expected status in time.
EFI_BUFFER_TOO_SMALLResponse data buffer is too small.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12GetCapabilityFlagVolatile ( OUT TPM_STCLEAR_FLAGS *  VolatileFlags)

Get TPM capability volatile flags.

Parameters
[out]VolatileFlagsPointer to the buffer for returned flag structure.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful.
EFI_STATUS EFIAPI Tpm12NvDefineSpace ( IN TPM12_NV_DATA_PUBLIC PubInfo,
IN TPM_ENCAUTH *  EncAuth 
)

Send NV DefineSpace command to TPM1.2.

Parameters
PubInfoThe public parameters of the NV area.
EncAuthThe encrypted AuthData, only valid if the attributes require subsequent authorization.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12NvReadValue ( IN TPM_NV_INDEX  NvIndex,
IN UINT32  Offset,
IN OUT UINT32 *  DataSize,
OUT UINT8 *  Data 
)

Send NV ReadValue command to TPM1.2.

Parameters
NvIndexThe index of the area to set.
OffsetThe offset into the area.
DataSizeThe size of the data area.
DataThe data to set the area to.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12NvWriteValue ( IN TPM_NV_INDEX  NvIndex,
IN UINT32  Offset,
IN UINT32  DataSize,
IN UINT8 *  Data 
)

Send NV WriteValue command to TPM1.2.

Parameters
NvIndexThe index of the area to set.
OffsetThe offset into the NV Area.
DataSizeThe size of the data parameter.
DataThe data to set the area to.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12PhysicalPresence ( IN TPM_PHYSICAL_PRESENCE  PhysicalPresence)

Send TSC_PhysicalPresence command to TPM.

Parameters
[in]PhysicalPresenceThe state to set the TPMs Physical Presence flags.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_TIMEOUTThe register can't run into the expected status in time.
EFI_BUFFER_TOO_SMALLResponse data buffer is too small.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12SaveState ( VOID  )

Send SaveState command to TPM1.2.

Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.
EFI_STATUS EFIAPI Tpm12Startup ( IN TPM_STARTUP_TYPE  TpmSt)

Send Startup command to TPM1.2.

Parameters
TpmStStartup Type.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.