3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
19 #ifndef __EFI_TPM_MP_DRIVER_PROTOCOL_H__
20 #define __EFI_TPM_MP_DRIVER_PROTOCOL_H__
23 #define EFI_TPM_MP_DRIVER_PROTOCOL_GUID \
24 { 0xde161cfe, 0x1e60, 0x42a1, 0x8c, 0xc3, 0xee, 0x7e, 0xf0, 0x73, 0x52, 0x12 }
27 EFI_FORWARD_DECLARATION (EFI_TPM_MP_DRIVER_PROTOCOL
);
29 #define TPM_DRIVER_STATUS 0
30 #define TPM_DEVICE_STATUS 1
32 #define TPM_DRIVER_OK 0
33 #define TPM_DRIVER_FAILED 1
34 #define TPM_DRIVER_NOT_OPENED 2
35 #define TPM_DEVICE_OK 0
36 #define TPM_DEVICE_UNRECOVERABLE 1
37 #define TPM_DEVICE_RECOVERABLE 2
38 #define TPM_DEVICE_NOT_FOUND 3
41 // Prototypes for the TPM MP Driver Protocol
45 This service Open the TPM interface
47 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
49 @retval EFI_SUCCESS Operation completed successfully
50 @retval EFI_DEVICE_ERROR The command was unsuccessful
51 @retval EFI_NOT_FOUND The component was not running
56 (EFIAPI
*EFI_TPM_MP_INIT
) (
57 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
61 This service close the TPM interface and deactivate TPM
63 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
65 @retval EFI_SUCCESS Operation completed successfully
66 @retval EFI_DEVICE_ERROR The command was unsuccessful
67 @retval EFI_NOT_FOUND The component was not running
72 (EFIAPI
*EFI_TPM_MP_CLOSE
) (
73 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
77 This service get the current status infomation of TPM
79 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
80 @param[in] ReqStatusType Requested type of status information, driver or device.
81 @param[in] Status Pointer to the returned status.
83 @retval EFI_SUCCESS Operation completed successfully
84 @retval EFI_DEVICE_ERROR The command was unsuccessful
85 @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect
86 @retval EFI_BUFFER_TOO_SMALL The receive buffer is too small
87 @retval EFI_NOT_FOUND The component was not running
92 (EFIAPI
*EFI_TPM_MP_GET_STATUS_INFO
) (
93 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
,
94 IN UINT32 ReqStatusType
,
99 This service transmit data to the TPM and get response from TPM
101 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
102 @param[in] TransmitBuf Pointer to a buffer containing TPM transmit data.
103 @param[in] TransmitBufLen Sizeof TPM input buffer in bytes.
104 @param[in] ReceiveBuf Pointer to a buffer containing TPM receive data.
105 @param[in] ReceiveBufLen On input, size of TPM receive buffer in bytes.
106 On output, number of bytes written.
108 @retval EFI_SUCCESS Operation completed successfully
109 @retval EFI_DEVICE_ERROR The command was unsuccessful
110 @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect
111 @retval EFI_BUFFER_TOO_SMALL The receive buffer is too small
112 @retval EFI_NOT_FOUND The component was not running
117 (EFIAPI
*EFI_TPM_MP_TRANSMIT
) (
118 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
,
119 IN UINT8
*TransmitBuffer
,
120 IN UINT32 TransmitBufferLen
,
121 OUT UINT8
*ReceiveBuf
,
122 IN OUT UINT32
*ReceiveBufLen
127 typedef struct _EFI_TPM_MP_DRIVER_PROTOCOL
{
128 EFI_TPM_MP_INIT Init
;
129 EFI_TPM_MP_CLOSE Close
;
130 EFI_TPM_MP_GET_STATUS_INFO GetStatusInfo
;
131 EFI_TPM_MP_TRANSMIT Transmit
;
132 } EFI_TPM_MP_DRIVER_PROTOCOL
;
134 extern EFI_GUID gEfiTpmMpDriverProtocolGuid
;