SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c File Reference


Functions

EFI_STATUS EFIAPI Tpm2GetCapability (IN TPM_CAP Capability, IN UINT32 Property, IN UINT32 PropertyCount, OUT TPMI_YES_NO *MoreData, OUT TPMS_CAPABILITY_DATA *CapabilityData)
EFI_STATUS EFIAPI Tpm2GetCapabilityFamily (OUT CHAR8 *Family)
EFI_STATUS EFIAPI Tpm2GetCapabilityManufactureID (OUT UINT32 *ManufactureId)
EFI_STATUS EFIAPI Tpm2GetCapabilityFirmwareVersion (OUT UINT32 *FirmwareVersion1, OUT UINT32 *FirmwareVersion2)
EFI_STATUS EFIAPI Tpm2GetCapabilityMaxCommandResponseSize (OUT UINT32 *MaxCommandSize, OUT UINT32 *MaxResponseSize)
EFI_STATUS EFIAPI Tpm2GetCapabilitySupportedAlg (OUT TPML_ALG_PROPERTY *AlgList)
EFI_STATUS EFIAPI Tpm2GetCapabilityLockoutCounter (OUT UINT32 *LockoutCounter)
EFI_STATUS EFIAPI Tpm2GetCapabilityLockoutInterval (OUT UINT32 *LockoutInterval)
EFI_STATUS EFIAPI Tpm2GetCapabilityInputBufferSize (OUT UINT32 *InputBufferSize)
EFI_STATUS EFIAPI Tpm2GetCapabilityPcrs (OUT TPML_PCR_SELECTION *Pcrs)
EFI_STATUS EFIAPI Tpm2GetCapabilityAlgorithmSet (OUT UINT32 *AlgorithmSet)
EFI_STATUS EFIAPI Tpm2TestParms (IN TPMT_PUBLIC_PARMS *Parameters)

Detailed Description

Implement TPM2 Capability related command.

Copyright (c) 2013, 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 Tpm2GetCapability ( IN TPM_CAP  Capability,
IN UINT32  Property,
IN UINT32  PropertyCount,
OUT TPMI_YES_NO *  MoreData,
OUT TPMS_CAPABILITY_DATA *  CapabilityData 
)

This command returns various information regarding the TPM and its current state.

The capability parameter determines the category of data returned. The property parameter selects the first value of the selected category to be returned. If there is no property that corresponds to the value of property, the next higher value is returned, if it exists. The moreData parameter will have a value of YES if there are more values of the requested type that were not returned. If no next capability exists, the TPM will return a zero-length list and moreData will have a value of NO.

NOTE: To simplify this function, leave returned CapabilityData for caller to unpack since there are many capability categories and only few categories will be used in firmware. It means the caller need swap the byte order for the feilds in CapabilityData.

Parameters:
[in] Capability Group selection; determines the format of the response.
[in] Property Further definition of information.
[in] PropertyCount Number of properties of the indicated type to return.
[out] MoreData Flag to indicate if there are more values of this type.
[out] CapabilityData The capability data.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2SubmitCommand().

Referenced by Tpm2GetCapabilityAlgorithmSet(), Tpm2GetCapabilityFamily(), Tpm2GetCapabilityFirmwareVersion(), Tpm2GetCapabilityInputBufferSize(), Tpm2GetCapabilityLockoutCounter(), Tpm2GetCapabilityLockoutInterval(), Tpm2GetCapabilityManufactureID(), Tpm2GetCapabilityMaxCommandResponseSize(), Tpm2GetCapabilityPcrs(), and Tpm2GetCapabilitySupportedAlg().

EFI_STATUS EFIAPI Tpm2GetCapabilityAlgorithmSet ( OUT UINT32 *  AlgorithmSet  ) 

This command returns the information of TPM AlgorithmSet.

This function parse the value got from TPM2_GetCapability and return the AlgorithmSet.

Parameters:
[out] AlgorithmSet The AlgorithmSet of TPM.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

EFI_STATUS EFIAPI Tpm2GetCapabilityFamily ( OUT CHAR8 *  Family  ) 

This command returns the information of TPM Family.

This function parse the value got from TPM2_GetCapability and return the Family.

Parameters:
[out] Family The Family of TPM. (a 4-octet character string)
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

EFI_STATUS EFIAPI Tpm2GetCapabilityFirmwareVersion ( OUT UINT32 *  FirmwareVersion1,
OUT UINT32 *  FirmwareVersion2 
)

This command returns the information of TPM FirmwareVersion.

This function parse the value got from TPM2_GetCapability and return the TPM FirmwareVersion.

Parameters:
[out] FirmwareVersion1 The FirmwareVersion1.
[out] FirmwareVersion2 The FirmwareVersion2.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

Referenced by DriverEntry().

EFI_STATUS EFIAPI Tpm2GetCapabilityInputBufferSize ( OUT UINT32 *  InputBufferSize  ) 

This command returns the information of TPM InputBufferSize.

This function parse the value got from TPM2_GetCapability and return the InputBufferSize.

Parameters:
[out] InputBufferSize The InputBufferSize of TPM. the maximum size of a parameter (typically, a TPM2B_MAX_BUFFER)
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

EFI_STATUS EFIAPI Tpm2GetCapabilityLockoutCounter ( OUT UINT32 *  LockoutCounter  ) 

This command returns the information of TPM LockoutCounter.

This function parse the value got from TPM2_GetCapability and return the LockoutCounter.

Parameters:
[out] LockoutCounter The LockoutCounter of TPM.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

EFI_STATUS EFIAPI Tpm2GetCapabilityLockoutInterval ( OUT UINT32 *  LockoutInterval  ) 

This command returns the information of TPM LockoutInterval.

This function parse the value got from TPM2_GetCapability and return the LockoutInterval.

Parameters:
[out] LockoutInterval The LockoutInterval of TPM.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

EFI_STATUS EFIAPI Tpm2GetCapabilityManufactureID ( OUT UINT32 *  ManufactureId  ) 

This command returns the information of TPM manufacture ID.

This function parse the value got from TPM2_GetCapability and return the TPM manufacture ID.

Parameters:
[out] ManufactureId The manufacture ID of TPM.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

Referenced by DriverEntry().

EFI_STATUS EFIAPI Tpm2GetCapabilityMaxCommandResponseSize ( OUT UINT32 *  MaxCommandSize,
OUT UINT32 *  MaxResponseSize 
)

This command returns the information of the maximum value for commandSize and responseSize in a command.

This function parse the value got from TPM2_GetCapability and return the max command size and response size

Parameters:
[out] MaxCommandSize The maximum value for commandSize in a command.
[out] MaxResponseSize The maximum value for responseSize in a command.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), and Tpm2GetCapability().

Referenced by DriverEntry().

EFI_STATUS EFIAPI Tpm2GetCapabilityPcrs ( OUT TPML_PCR_SELECTION *  Pcrs  ) 

This command returns the information of TPM PCRs.

This function parse the value got from TPM2_GetCapability and return the PcrSelection.

Parameters:
[out] Pcrs The Pcr Selection
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), Tpm2GetCapability(), and UINTN().

Referenced by DriverEntry(), InstallTcg2ConfigForm(), and SetTpm2HashMask().

EFI_STATUS EFIAPI Tpm2GetCapabilitySupportedAlg ( OUT TPML_ALG_PROPERTY *  AlgList  ) 

This command returns Returns a list of TPMS_ALG_PROPERTIES. Each entry is an algorithm ID and a set of properties of the algorithm.

This function parse the value got from TPM2_GetCapability and return the list.

Parameters:
[out] AlgList List of algorithm.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

References EFI_STATUS(), Tpm2GetCapability(), and UINTN().

EFI_STATUS EFIAPI Tpm2TestParms ( IN TPMT_PUBLIC_PARMS *  Parameters  ) 

This command is used to check to see if specific combinations of algorithm parameters are supported.

Parameters:
[in] Parameters Algorithm parameters to be validated
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR Unexpected device behavior.

References EFI_STATUS(), Tpm2SubmitCommand(), and UINTN().


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