--- /dev/null
+/*++\r
+\r
+ Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ \r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution. \r
+ The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php. \r
+ \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+ \r
+--*/\r
+\r
+#ifndef _EFI_PTT_PASS_THRU_H\r
+#define _EFI_PTT_PASS_THRU_H\r
+\r
+#define PTT_PASS_THRU_PROTOCOL_GUID \\r
+ { \\r
+ 0x73e2576, 0xf6c1, 0x4b91, 0x92, 0xa9, 0xd4, 0x67, 0x5d, 0xda, 0x34, 0xb1 \\r
+ }\r
+// {073E2576-F6C1-4b91-92A9-D4675DDA34B1}\r
+//static const GUID <<name>> = \r
+//{ 0x73e2576, 0xf6c1, 0x4b91, { 0x92, 0xa9, 0xd4, 0x67, 0x5d, 0xda, 0x34, 0xb1 } };\r
+\r
+\r
+//#define EFI_PTT_PROTOCOL_GUID HECI_PROTOCOL_GUID\r
+\r
+typedef struct _PTT_PASS_THRU_PROTOCOL PTT_PASS_THRU_PROTOCOL;\r
+\r
+/**\r
+ This service enables the sending of commands to the TPM2.\r
+\r
+ @param[in] InputParameterBlockSize Size of the TPM2 input parameter block.\r
+ @param[in] InputParameterBlock Pointer to the TPM2 input parameter block.\r
+ @param[in,out] OutputParameterBlockSize Size of the TPM2 output parameter block.\r
+ @param[in] OutputParameterBlock Pointer to the TPM2 output parameter block.\r
+\r
+ @retval EFI_SUCCESS The command byte stream was successfully sent to the device and a response was successfully received.\r
+ @retval EFI_DEVICE_ERROR The command was not successfully sent to the device or a response was not successfully received from the device.\r
+ @retval EFI_BUFFER_TOO_SMALL The output parameter block is too small. \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *TPM2_SUBMIT_COMMAND) (\r
+ IN PTT_PASS_THRU_PROTOCOL *This,\r
+ IN UINT32 InputParameterBlockSize,\r
+ IN UINT8 *InputParameterBlock,\r
+ IN OUT UINT32 *OutputParameterBlockSize,\r
+ IN UINT8 *OutputParameterBlock\r
+ );\r
+\r
+/**\r
+ This service requests use TPM2.\r
+\r
+ @retval EFI_SUCCESS Get the control of TPM2 chip.\r
+ @retval EFI_NOT_FOUND TPM2 not found.\r
+ @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *TPM2_REQUEST_USE_TPM) (\r
+ IN PTT_PASS_THRU_PROTOCOL *This\r
+ );\r
+\r
+typedef struct {\r
+ EFI_GUID ProviderGuid;\r
+ TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;\r
+ TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;\r
+} PTT_TPM2_DEVICE_INTERFACE;\r
+\r
+\r
+/**\r
+ This service register TPM2 device.\r
+\r
+ @param Tpm2Device TPM2 device\r
+\r
+ @retval EFI_SUCCESS This TPM2 device is registered successfully.\r
+ @retval EFI_UNSUPPORTED System does not support register this TPM2 device.\r
+ @retval EFI_ALREADY_STARTED System already register this TPM2 device.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *TPM2_REGISTER_TPM2_DEVICE_LIB) (\r
+ IN PTT_PASS_THRU_PROTOCOL *This,\r
+ IN PTT_TPM2_DEVICE_INTERFACE *Tpm2Device\r
+ );\r
+ \r
+typedef struct _PTT_PASS_THRU_PROTOCOL {\r
+ TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;\r
+ TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;\r
+ TPM2_REGISTER_TPM2_DEVICE_LIB Tpm2RegisterTpm2DeviceLib;\r
+} PTT_PASS_THRU_PROTOCOL;\r
+\r
+extern EFI_GUID gPttPassThruProtocolGuid;\r
+\r
+#endif // _EFI_HECI_H\r