3 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _EFI_PTT_PASS_THRU_PPI_H
10 #define _EFI_PTT_PASS_THRU_PPI_H
12 #define PTT_PASS_THRU_PPI_GUID \
14 0xc5068bac, 0xa7dc, 0x42f1, 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b \
16 // {C5068BAC-A7DC-42f1-AE80-CAA24BB4904B}
17 //static const GUID <<name>> =
18 //{ 0xc5068bac, 0xa7dc, 0x42f1, { 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b } };
22 //#define EFI_PTT_PROTOCOL_GUID HECI_PROTOCOL_GUID
24 typedef struct _PTT_PASS_THRU_PPI PTT_PASS_THRU_PPI
;
27 This service enables the sending of commands to the TPM2.
29 @param[in] InputParameterBlockSize Size of the TPM2 input parameter block.
30 @param[in] InputParameterBlock Pointer to the TPM2 input parameter block.
31 @param[in,out] OutputParameterBlockSize Size of the TPM2 output parameter block.
32 @param[in] OutputParameterBlock Pointer to the TPM2 output parameter block.
34 @retval EFI_SUCCESS The command byte stream was successfully sent to the device and a response was successfully received.
35 @retval EFI_DEVICE_ERROR The command was not successfully sent to the device or a response was not successfully received from the device.
36 @retval EFI_BUFFER_TOO_SMALL The output parameter block is too small.
40 (EFIAPI
*TPM2_SUBMIT_COMMAND
) (
41 IN PTT_PASS_THRU_PPI
*This
,
42 IN UINT32 InputParameterBlockSize
,
43 IN UINT8
*InputParameterBlock
,
44 IN OUT UINT32
*OutputParameterBlockSize
,
45 IN UINT8
*OutputParameterBlock
49 This service requests use TPM2.
51 @retval EFI_SUCCESS Get the control of TPM2 chip.
52 @retval EFI_NOT_FOUND TPM2 not found.
53 @retval EFI_DEVICE_ERROR Unexpected device behavior.
57 (EFIAPI
*TPM2_REQUEST_USE_TPM
) (
58 IN PTT_PASS_THRU_PPI
*This
62 EFI_GUID ProviderGuid
;
63 TPM2_SUBMIT_COMMAND Tpm2SubmitCommand
;
64 TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm
;
65 } PTT_TPM2_DEVICE_INTERFACE
;
69 This service register TPM2 device.
71 @param Tpm2Device TPM2 device
73 @retval EFI_SUCCESS This TPM2 device is registered successfully.
74 @retval EFI_UNSUPPORTED System does not support register this TPM2 device.
75 @retval EFI_ALREADY_STARTED System already register this TPM2 device.
79 (EFIAPI
*TPM2_REGISTER_TPM2_DEVICE_LIB
) (
80 IN PTT_PASS_THRU_PPI
*This
,
81 IN PTT_TPM2_DEVICE_INTERFACE
*Tpm2Device
84 typedef struct _PTT_PASS_THRU_PPI
{
85 TPM2_SUBMIT_COMMAND Tpm2SubmitCommand
;
86 TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm
;
87 TPM2_REGISTER_TPM2_DEVICE_LIB Tpm2RegisterTpm2DeviceLib
;
90 extern EFI_GUID gPttPassThruPpiGuid
;