]>
Commit | Line | Data |
---|---|---|
1 | /*++\r | |
2 | \r | |
3 | Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r | |
4 | \r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | --*/\r | |
8 | \r | |
9 | #ifndef _EFI_PTT_PASS_THRU_PPI_H\r | |
10 | #define _EFI_PTT_PASS_THRU_PPI_H\r | |
11 | \r | |
12 | #define PTT_PASS_THRU_PPI_GUID \\r | |
13 | { \\r | |
14 | 0xc5068bac, 0xa7dc, 0x42f1, 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b \\r | |
15 | }\r | |
16 | // {C5068BAC-A7DC-42f1-AE80-CAA24BB4904B}\r | |
17 | //static const GUID <<name>> = \r | |
18 | //{ 0xc5068bac, 0xa7dc, 0x42f1, { 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b } };\r | |
19 | \r | |
20 | \r | |
21 | \r | |
22 | //#define EFI_PTT_PROTOCOL_GUID HECI_PROTOCOL_GUID\r | |
23 | \r | |
24 | typedef struct _PTT_PASS_THRU_PPI PTT_PASS_THRU_PPI;\r | |
25 | \r | |
26 | /**\r | |
27 | This service enables the sending of commands to the TPM2.\r | |
28 | \r | |
29 | @param[in] InputParameterBlockSize Size of the TPM2 input parameter block.\r | |
30 | @param[in] InputParameterBlock Pointer to the TPM2 input parameter block.\r | |
31 | @param[in,out] OutputParameterBlockSize Size of the TPM2 output parameter block.\r | |
32 | @param[in] OutputParameterBlock Pointer to the TPM2 output parameter block.\r | |
33 | \r | |
34 | @retval EFI_SUCCESS The command byte stream was successfully sent to the device and a response was successfully received.\r | |
35 | @retval EFI_DEVICE_ERROR The command was not successfully sent to the device or a response was not successfully received from the device.\r | |
36 | @retval EFI_BUFFER_TOO_SMALL The output parameter block is too small. \r | |
37 | **/\r | |
38 | typedef\r | |
39 | EFI_STATUS\r | |
40 | (EFIAPI *TPM2_SUBMIT_COMMAND) (\r | |
41 | IN PTT_PASS_THRU_PPI *This,\r | |
42 | IN UINT32 InputParameterBlockSize,\r | |
43 | IN UINT8 *InputParameterBlock,\r | |
44 | IN OUT UINT32 *OutputParameterBlockSize,\r | |
45 | IN UINT8 *OutputParameterBlock\r | |
46 | );\r | |
47 | \r | |
48 | /**\r | |
49 | This service requests use TPM2.\r | |
50 | \r | |
51 | @retval EFI_SUCCESS Get the control of TPM2 chip.\r | |
52 | @retval EFI_NOT_FOUND TPM2 not found.\r | |
53 | @retval EFI_DEVICE_ERROR Unexpected device behavior.\r | |
54 | **/\r | |
55 | typedef\r | |
56 | EFI_STATUS\r | |
57 | (EFIAPI *TPM2_REQUEST_USE_TPM) (\r | |
58 | IN PTT_PASS_THRU_PPI *This\r | |
59 | );\r | |
60 | \r | |
61 | typedef struct {\r | |
62 | EFI_GUID ProviderGuid;\r | |
63 | TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;\r | |
64 | TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;\r | |
65 | } PTT_TPM2_DEVICE_INTERFACE;\r | |
66 | \r | |
67 | \r | |
68 | /**\r | |
69 | This service register TPM2 device.\r | |
70 | \r | |
71 | @param Tpm2Device TPM2 device\r | |
72 | \r | |
73 | @retval EFI_SUCCESS This TPM2 device is registered successfully.\r | |
74 | @retval EFI_UNSUPPORTED System does not support register this TPM2 device.\r | |
75 | @retval EFI_ALREADY_STARTED System already register this TPM2 device.\r | |
76 | **/\r | |
77 | typedef\r | |
78 | EFI_STATUS\r | |
79 | (EFIAPI *TPM2_REGISTER_TPM2_DEVICE_LIB) (\r | |
80 | IN PTT_PASS_THRU_PPI *This,\r | |
81 | IN PTT_TPM2_DEVICE_INTERFACE *Tpm2Device\r | |
82 | );\r | |
83 | \r | |
84 | typedef struct _PTT_PASS_THRU_PPI {\r | |
85 | TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;\r | |
86 | TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;\r | |
87 | TPM2_REGISTER_TPM2_DEVICE_LIB Tpm2RegisterTpm2DeviceLib;\r | |
88 | } PTT_PASS_THRU_PPI;\r | |
89 | \r | |
90 | extern EFI_GUID gPttPassThruPpiGuid;\r | |
91 | \r | |
92 | #endif // _EFI_HECI_H\r |