3 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _EFI_PTT_PASS_THRU_PPI_H
16 #define _EFI_PTT_PASS_THRU_PPI_H
18 #define PTT_PASS_THRU_PPI_GUID \
20 0xc5068bac, 0xa7dc, 0x42f1, 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b \
22 // {C5068BAC-A7DC-42f1-AE80-CAA24BB4904B}
23 //static const GUID <<name>> =
24 //{ 0xc5068bac, 0xa7dc, 0x42f1, { 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b } };
28 //#define EFI_PTT_PROTOCOL_GUID HECI_PROTOCOL_GUID
30 typedef struct _PTT_PASS_THRU_PPI PTT_PASS_THRU_PPI
;
33 This service enables the sending of commands to the TPM2.
35 @param[in] InputParameterBlockSize Size of the TPM2 input parameter block.
36 @param[in] InputParameterBlock Pointer to the TPM2 input parameter block.
37 @param[in,out] OutputParameterBlockSize Size of the TPM2 output parameter block.
38 @param[in] OutputParameterBlock Pointer to the TPM2 output parameter block.
40 @retval EFI_SUCCESS The command byte stream was successfully sent to the device and a response was successfully received.
41 @retval EFI_DEVICE_ERROR The command was not successfully sent to the device or a response was not successfully received from the device.
42 @retval EFI_BUFFER_TOO_SMALL The output parameter block is too small.
46 (EFIAPI
*TPM2_SUBMIT_COMMAND
) (
47 IN PTT_PASS_THRU_PPI
*This
,
48 IN UINT32 InputParameterBlockSize
,
49 IN UINT8
*InputParameterBlock
,
50 IN OUT UINT32
*OutputParameterBlockSize
,
51 IN UINT8
*OutputParameterBlock
55 This service requests use TPM2.
57 @retval EFI_SUCCESS Get the control of TPM2 chip.
58 @retval EFI_NOT_FOUND TPM2 not found.
59 @retval EFI_DEVICE_ERROR Unexpected device behavior.
63 (EFIAPI
*TPM2_REQUEST_USE_TPM
) (
64 IN PTT_PASS_THRU_PPI
*This
68 EFI_GUID ProviderGuid
;
69 TPM2_SUBMIT_COMMAND Tpm2SubmitCommand
;
70 TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm
;
71 } PTT_TPM2_DEVICE_INTERFACE
;
75 This service register TPM2 device.
77 @param Tpm2Device TPM2 device
79 @retval EFI_SUCCESS This TPM2 device is registered successfully.
80 @retval EFI_UNSUPPORTED System does not support register this TPM2 device.
81 @retval EFI_ALREADY_STARTED System already register this TPM2 device.
85 (EFIAPI
*TPM2_REGISTER_TPM2_DEVICE_LIB
) (
86 IN PTT_PASS_THRU_PPI
*This
,
87 IN PTT_TPM2_DEVICE_INTERFACE
*Tpm2Device
90 typedef struct _PTT_PASS_THRU_PPI
{
91 TPM2_SUBMIT_COMMAND Tpm2SubmitCommand
;
92 TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm
;
93 TPM2_REGISTER_TPM2_DEVICE_LIB Tpm2RegisterTpm2DeviceLib
;
96 extern EFI_GUID gPttPassThruPpiGuid
;