2 This library is used by other modules to send TPM12 command.
4 Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. <BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. 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.
15 #ifndef _TPM12_COMMAND_LIB_H_
16 #define _TPM12_COMMAND_LIB_H_
18 #include <IndustryStandard/Tpm12.h>
21 Send Startup command to TPM1.2.
23 @param TpmSt Startup Type.
25 @retval EFI_SUCCESS Operation completed successfully.
26 @retval EFI_DEVICE_ERROR Unexpected device behavior.
31 IN TPM_STARTUP_TYPE TpmSt
35 Send SaveState command to TPM1.2.
37 @retval EFI_SUCCESS Operation completed successfully.
38 @retval EFI_DEVICE_ERROR Unexpected device behavior.
47 Send ForceClear command to TPM1.2.
49 @retval EFI_SUCCESS Operation completed successfully.
50 @retval EFI_DEVICE_ERROR Unexpected device behavior.
63 } TPM12_PCR_SELECTION
;
66 TPM12_PCR_SELECTION pcrSelection
;
67 TPM_LOCALITY_SELECTION localityAtRelease
;
68 TPM_COMPOSITE_HASH digestAtRelease
;
69 } TPM12_PCR_INFO_SHORT
;
72 TPM_STRUCTURE_TAG tag
;
74 TPM12_PCR_INFO_SHORT pcrInfoRead
;
75 TPM12_PCR_INFO_SHORT pcrInfoWrite
;
76 TPM_NV_ATTRIBUTES permission
;
78 BOOLEAN bWriteSTClear
;
81 } TPM12_NV_DATA_PUBLIC
;
86 Send NV DefineSpace command to TPM1.2.
88 @param PubInfo The public parameters of the NV area.
89 @param EncAuth The encrypted AuthData, only valid if the attributes require subsequent authorization.
91 @retval EFI_SUCCESS Operation completed successfully.
92 @retval EFI_DEVICE_ERROR Unexpected device behavior.
97 IN TPM12_NV_DATA_PUBLIC
*PubInfo
,
98 IN TPM_ENCAUTH
*EncAuth
102 Send NV ReadValue command to TPM1.2.
104 @param NvIndex The index of the area to set.
105 @param Offset The offset into the area.
106 @param DataSize The size of the data area.
107 @param Data The data to set the area to.
109 @retval EFI_SUCCESS Operation completed successfully.
110 @retval EFI_DEVICE_ERROR Unexpected device behavior.
115 IN TPM_NV_INDEX NvIndex
,
117 IN OUT UINT32
*DataSize
,
122 Send NV WriteValue command to TPM1.2.
124 @param NvIndex The index of the area to set.
125 @param Offset The offset into the NV Area.
126 @param DataSize The size of the data parameter.
127 @param Data The data to set the area to.
129 @retval EFI_SUCCESS Operation completed successfully.
130 @retval EFI_DEVICE_ERROR Unexpected device behavior.
135 IN TPM_NV_INDEX NvIndex
,