]> git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/Include/Library/Tpm12DeviceLib.h
SecurityPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / SecurityPkg / Include / Library / Tpm12DeviceLib.h
1 /** @file
2 This library abstract how to access TPM12 hardware device.
3
4 Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _TPM12_DEVICE_LIB_H_
10 #define _TPM12_DEVICE_LIB_H_
11
12 #include <IndustryStandard/Tpm12.h>
13
14 /**
15 This service enables the sending of commands to the TPM12.
16
17 @param[in] InputParameterBlockSize Size of the TPM12 input parameter block.
18 @param[in] InputParameterBlock Pointer to the TPM12 input parameter block.
19 @param[in,out] OutputParameterBlockSize Size of the TPM12 output parameter block.
20 @param[in] OutputParameterBlock Pointer to the TPM12 output parameter block.
21
22 @retval EFI_SUCCESS The command byte stream was successfully sent to the device and a response was successfully received.
23 @retval EFI_DEVICE_ERROR The command was not successfully sent to the device or a response was not successfully received from the device.
24 @retval EFI_BUFFER_TOO_SMALL The output parameter block is too small.
25 **/
26 EFI_STATUS
27 EFIAPI
28 Tpm12SubmitCommand (
29 IN UINT32 InputParameterBlockSize,
30 IN UINT8 *InputParameterBlock,
31 IN OUT UINT32 *OutputParameterBlockSize,
32 IN UINT8 *OutputParameterBlock
33 );
34
35 /**
36 This service requests use TPM12.
37
38 @retval EFI_SUCCESS Get the control of TPM12 chip.
39 @retval EFI_NOT_FOUND TPM12 not found.
40 @retval EFI_DEVICE_ERROR Unexpected device behavior.
41 **/
42 EFI_STATUS
43 EFIAPI
44 Tpm12RequestUseTpm (
45 VOID
46 );
47
48 #endif