]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2DeviceRefCodePkg/Include/Ppi/PttPassThruPpi.h
Sync the branch changes to trunk.
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / Include / Ppi / PttPassThruPpi.h
CommitLineData
f4e7aa05
TH
1/*++\r
2\r
3 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
4 \r
5 This program and the accompanying materials are licensed and made available under\r
6 the terms and conditions of the BSD License that accompanies this distribution. \r
7 The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php. \r
9 \r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12 \r
13--*/\r
14\r
15#ifndef _EFI_PTT_PASS_THRU_PPI_H\r
16#define _EFI_PTT_PASS_THRU_PPI_H\r
17\r
18#define PTT_PASS_THRU_PPI_GUID \\r
19 { \\r
20 0xc5068bac, 0xa7dc, 0x42f1, 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b \\r
21 }\r
22// {C5068BAC-A7DC-42f1-AE80-CAA24BB4904B}\r
23//static const GUID <<name>> = \r
24//{ 0xc5068bac, 0xa7dc, 0x42f1, { 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b } };\r
25\r
26\r
27\r
28//#define EFI_PTT_PROTOCOL_GUID HECI_PROTOCOL_GUID\r
29\r
30typedef struct _PTT_PASS_THRU_PPI PTT_PASS_THRU_PPI;\r
31\r
32/**\r
33 This service enables the sending of commands to the TPM2.\r
34\r
35 @param[in] InputParameterBlockSize Size of the TPM2 input parameter block.\r
36 @param[in] InputParameterBlock Pointer to the TPM2 input parameter block.\r
37 @param[in,out] OutputParameterBlockSize Size of the TPM2 output parameter block.\r
38 @param[in] OutputParameterBlock Pointer to the TPM2 output parameter block.\r
39\r
40 @retval EFI_SUCCESS The command byte stream was successfully sent to the device and a response was successfully received.\r
41 @retval EFI_DEVICE_ERROR The command was not successfully sent to the device or a response was not successfully received from the device.\r
42 @retval EFI_BUFFER_TOO_SMALL The output parameter block is too small. \r
43**/\r
44typedef\r
45EFI_STATUS\r
46(EFIAPI *TPM2_SUBMIT_COMMAND) (\r
47 IN PTT_PASS_THRU_PPI *This,\r
48 IN UINT32 InputParameterBlockSize,\r
49 IN UINT8 *InputParameterBlock,\r
50 IN OUT UINT32 *OutputParameterBlockSize,\r
51 IN UINT8 *OutputParameterBlock\r
52 );\r
53\r
54/**\r
55 This service requests use TPM2.\r
56\r
57 @retval EFI_SUCCESS Get the control of TPM2 chip.\r
58 @retval EFI_NOT_FOUND TPM2 not found.\r
59 @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
60**/\r
61typedef\r
62EFI_STATUS\r
63(EFIAPI *TPM2_REQUEST_USE_TPM) (\r
64 IN PTT_PASS_THRU_PPI *This\r
65 );\r
66\r
67typedef struct {\r
68 EFI_GUID ProviderGuid;\r
69 TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;\r
70 TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;\r
71} PTT_TPM2_DEVICE_INTERFACE;\r
72\r
73\r
74/**\r
75 This service register TPM2 device.\r
76\r
77 @param Tpm2Device TPM2 device\r
78\r
79 @retval EFI_SUCCESS This TPM2 device is registered successfully.\r
80 @retval EFI_UNSUPPORTED System does not support register this TPM2 device.\r
81 @retval EFI_ALREADY_STARTED System already register this TPM2 device.\r
82**/\r
83typedef\r
84EFI_STATUS\r
85(EFIAPI *TPM2_REGISTER_TPM2_DEVICE_LIB) (\r
86 IN PTT_PASS_THRU_PPI *This,\r
87 IN PTT_TPM2_DEVICE_INTERFACE *Tpm2Device\r
88 );\r
89 \r
90typedef struct _PTT_PASS_THRU_PPI {\r
91 TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;\r
92 TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;\r
93 TPM2_REGISTER_TPM2_DEVICE_LIB Tpm2RegisterTpm2DeviceLib;\r
94} PTT_PASS_THRU_PPI;\r
95\r
96extern EFI_GUID gPttPassThruPpiGuid;\r
97\r
98#endif // _EFI_HECI_H\r