]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2DeviceRefCodePkg/Include/Ppi/PttPassThruPpi.h
Vlv2DeviceRefCodePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / Include / Ppi / PttPassThruPpi.h
1 /*++
2
3 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 --*/
8
9 #ifndef _EFI_PTT_PASS_THRU_PPI_H
10 #define _EFI_PTT_PASS_THRU_PPI_H
11
12 #define PTT_PASS_THRU_PPI_GUID \
13 { \
14 0xc5068bac, 0xa7dc, 0x42f1, 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b \
15 }
16 // {C5068BAC-A7DC-42f1-AE80-CAA24BB4904B}
17 //static const GUID <<name>> =
18 //{ 0xc5068bac, 0xa7dc, 0x42f1, { 0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b } };
19
20
21
22 //#define EFI_PTT_PROTOCOL_GUID HECI_PROTOCOL_GUID
23
24 typedef struct _PTT_PASS_THRU_PPI PTT_PASS_THRU_PPI;
25
26 /**
27 This service enables the sending of commands to the TPM2.
28
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.
33
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.
37 **/
38 typedef
39 EFI_STATUS
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
46 );
47
48 /**
49 This service requests use TPM2.
50
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.
54 **/
55 typedef
56 EFI_STATUS
57 (EFIAPI *TPM2_REQUEST_USE_TPM) (
58 IN PTT_PASS_THRU_PPI *This
59 );
60
61 typedef struct {
62 EFI_GUID ProviderGuid;
63 TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;
64 TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;
65 } PTT_TPM2_DEVICE_INTERFACE;
66
67
68 /**
69 This service register TPM2 device.
70
71 @param Tpm2Device TPM2 device
72
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.
76 **/
77 typedef
78 EFI_STATUS
79 (EFIAPI *TPM2_REGISTER_TPM2_DEVICE_LIB) (
80 IN PTT_PASS_THRU_PPI *This,
81 IN PTT_TPM2_DEVICE_INTERFACE *Tpm2Device
82 );
83
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;
88 } PTT_PASS_THRU_PPI;
89
90 extern EFI_GUID gPttPassThruPpiGuid;
91
92 #endif // _EFI_HECI_H