3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 #ifndef __EFI_TPM_MP_DRIVER_PROTOCOL_H__
25 #define __EFI_TPM_MP_DRIVER_PROTOCOL_H__
28 #define EFI_TPM_MP_DRIVER_PROTOCOL_GUID \
29 { 0xde161cfe, 0x1e60, 0x42a1, 0x8c, 0xc3, 0xee, 0x7e, 0xf0, 0x73, 0x52, 0x12 }
32 EFI_FORWARD_DECLARATION (EFI_TPM_MP_DRIVER_PROTOCOL
);
34 #define TPM_DRIVER_STATUS 0
35 #define TPM_DEVICE_STATUS 1
37 #define TPM_DRIVER_OK 0
38 #define TPM_DRIVER_FAILED 1
39 #define TPM_DRIVER_NOT_OPENED 2
40 #define TPM_DEVICE_OK 0
41 #define TPM_DEVICE_UNRECOVERABLE 1
42 #define TPM_DEVICE_RECOVERABLE 2
43 #define TPM_DEVICE_NOT_FOUND 3
46 // Prototypes for the TPM MP Driver Protocol
50 This service Open the TPM interface
52 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
54 @retval EFI_SUCCESS Operation completed successfully
55 @retval EFI_DEVICE_ERROR The command was unsuccessful
56 @retval EFI_NOT_FOUND The component was not running
61 (EFIAPI
*EFI_TPM_MP_INIT
) (
62 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
66 This service close the TPM interface and deactivate TPM
68 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
70 @retval EFI_SUCCESS Operation completed successfully
71 @retval EFI_DEVICE_ERROR The command was unsuccessful
72 @retval EFI_NOT_FOUND The component was not running
77 (EFIAPI
*EFI_TPM_MP_CLOSE
) (
78 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
82 This service get the current status infomation of TPM
84 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
85 @param[in] ReqStatusType Requested type of status information, driver or device.
86 @param[in] Status Pointer to the returned status.
88 @retval EFI_SUCCESS Operation completed successfully
89 @retval EFI_DEVICE_ERROR The command was unsuccessful
90 @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect
91 @retval EFI_BUFFER_TOO_SMALL The receive buffer is too small
92 @retval EFI_NOT_FOUND The component was not running
97 (EFIAPI
*EFI_TPM_MP_GET_STATUS_INFO
) (
98 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
,
99 IN UINT32 ReqStatusType
,
104 This service transmit data to the TPM and get response from TPM
106 @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL.
107 @param[in] TransmitBuf Pointer to a buffer containing TPM transmit data.
108 @param[in] TransmitBufLen Sizeof TPM input buffer in bytes.
109 @param[in] ReceiveBuf Pointer to a buffer containing TPM receive data.
110 @param[in] ReceiveBufLen On input, size of TPM receive buffer in bytes.
111 On output, number of bytes written.
113 @retval EFI_SUCCESS Operation completed successfully
114 @retval EFI_DEVICE_ERROR The command was unsuccessful
115 @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect
116 @retval EFI_BUFFER_TOO_SMALL The receive buffer is too small
117 @retval EFI_NOT_FOUND The component was not running
122 (EFIAPI
*EFI_TPM_MP_TRANSMIT
) (
123 IN EFI_TPM_MP_DRIVER_PROTOCOL
*This
,
124 IN UINT8
*TransmitBuffer
,
125 IN UINT32 TransmitBufferLen
,
126 OUT UINT8
*ReceiveBuf
,
127 IN OUT UINT32
*ReceiveBufLen
132 typedef struct _EFI_TPM_MP_DRIVER_PROTOCOL
{
133 EFI_TPM_MP_INIT Init
;
134 EFI_TPM_MP_CLOSE Close
;
135 EFI_TPM_MP_GET_STATUS_INFO GetStatusInfo
;
136 EFI_TPM_MP_TRANSMIT Transmit
;
137 } EFI_TPM_MP_DRIVER_PROTOCOL
;
139 extern EFI_GUID gEfiTpmMpDriverProtocolGuid
;