]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Include/Library/TcgPpVendorLib.h
SecurityPkg: Fix typos in comments
[mirror_edk2.git] / SecurityPkg / Include / Library / TcgPpVendorLib.h
CommitLineData
4610b23a 1/** @file\r
07309c3d 2 This library is to support TCG Physical Presence Interface (PPI) specification\r
4610b23a
JY
3 >= 128 Vendor Specific PPI Operation.\r
4\r
5 The Vendor Specific PPI operation may change TPM state, BIOS TPM management\r
6 flags, and may need additional boot cycle.\r
7 \r
8 Caution: This function may receive untrusted input.\r
9\r
07309c3d 10Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
4610b23a
JY
11This program and the accompanying materials \r
12are licensed and made available under the terms and conditions of the BSD License \r
13which accompanies this distribution. The full text of the license may be found at \r
14http://opensource.org/licenses/bsd-license.php\r
15\r
16THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
17WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
18\r
19**/\r
20\r
21#ifndef _TCG_PP_VENDOR_LIB_H_\r
22#define _TCG_PP_VENDOR_LIB_H_\r
23\r
24//\r
25// The definition of physical presence operation actions\r
26//\r
27#define TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION 128\r
28\r
29//\r
30// The definition bit of the BIOS TPM Management Flags\r
31//\r
32#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_PROVISION BIT0\r
33#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_CLEAR BIT1\r
34#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_MAINTENANCE BIT2\r
35#define TCG_VENDOR_LIB_FLAG_RESET_TRACK BIT3\r
36\r
37//\r
38// The definition for TPM Operation Response to OS Environment\r
39//\r
40#define TCG_PP_OPERATION_RESPONSE_SUCCESS 0x0\r
41#define TCG_PP_OPERATION_RESPONSE_USER_ABORT 0xFFFFFFF0\r
42#define TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE 0xFFFFFFF1\r
43\r
44//\r
0ab475c9
ZC
45// The return code for Submit TPM Request to Pre-OS Environment\r
46// and Submit TPM Request to Pre-OS Environment 2\r
4610b23a
JY
47//\r
48#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS 0\r
49#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED 1\r
50#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE 2\r
51#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_BLOCKED_BY_BIOS_SETTINGS 3\r
52\r
53//\r
54// The return code for Get User Confirmation Status for Operation\r
55//\r
56#define TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED 0\r
57#define TCG_PP_GET_USER_CONFIRMATION_BIOS_ONLY 1\r
58#define TCG_PP_GET_USER_CONFIRMATION_BLOCKED_BY_BIOS_CONFIGURATION 2\r
59#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED 3\r
60#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED 4\r
61\r
62/**\r
63 Check and execute the requested physical presence command.\r
64\r
65 This API should be invoked in BIOS boot phase to process pending request.\r
66 \r
67 Caution: This function may receive untrusted input.\r
68 \r
69 If OperationRequest < 128, then ASSERT().\r
70\r
71 @param[in] OperationRequest TPM physical presence operation request.\r
72 @param[in, out] ManagementFlags BIOS TPM Management Flags.\r
73 @param[out] ResetRequired If reset is required to vendor settings in effect.\r
74 True, it indicates the reset is required.\r
75 False, it indicates the reset is not required.\r
76\r
77 @return TPM Operation Response to OS Environment.\r
78**/\r
79UINT32\r
80EFIAPI\r
81TcgPpVendorLibExecutePendingRequest (\r
82 IN UINT32 OperationRequest,\r
83 IN OUT UINT32 *ManagementFlags,\r
84 OUT BOOLEAN *ResetRequired\r
85 );\r
86\r
87/**\r
88 Check if there is a valid physical presence command request.\r
89\r
90 This API should be invoked in BIOS boot phase to process pending request.\r
91 \r
92 Caution: This function may receive untrusted input.\r
93\r
94 If OperationRequest < 128, then ASSERT().\r
95\r
96 @param[in] OperationRequest TPM physical presence operation request.\r
97 @param[in] ManagementFlags BIOS TPM Management Flags.\r
98 @param[out] RequestConfirmed If the physical presence operation command required user confirm from UI.\r
99 True, it indicates the command doesn't require user confirm.\r
100 False, it indicates the command need user confirm from UI.\r
101\r
102 @retval TRUE Physical Presence operation command is valid.\r
103 @retval FALSE Physical Presence operation command is invalid.\r
104**/\r
105BOOLEAN\r
106EFIAPI\r
107TcgPpVendorLibHasValidRequest (\r
108 IN UINT32 OperationRequest,\r
109 IN UINT32 ManagementFlags,\r
110 OUT BOOLEAN *RequestConfirmed\r
111 );\r
112\r
113/**\r
114 The callback for TPM vendor specific physical presence which is called for\r
115 Submit TPM Operation Request to Pre-OS Environment and\r
116 Submit TPM Operation Request to Pre-OS Environment 2.\r
117\r
118 This API should be invoked in OS runtime phase to interface with ACPI method.\r
119\r
120 Caution: This function may receive untrusted input.\r
121 \r
122 If OperationRequest < 128, then ASSERT().\r
123\r
124 @param[in] OperationRequest TPM physical presence operation request.\r
125 @param[in] ManagementFlags BIOS TPM Management Flags.\r
126\r
127 @return Return Code for Submit TPM Operation Request to Pre-OS Environment and\r
128 Submit TPM Operation Request to Pre-OS Environment 2.\r
129**/\r
130UINT32\r
131EFIAPI\r
132TcgPpVendorLibSubmitRequestToPreOSFunction (\r
133 IN UINT32 OperationRequest,\r
134 IN UINT32 ManagementFlags\r
135 );\r
136\r
137/**\r
138 The callback for TPM vendor specific physical presence which is called for\r
139 Get User Confirmation Status for Operation.\r
140\r
141 This API should be invoked in OS runtime phase to interface with ACPI method.\r
142\r
143 Caution: This function may receive untrusted input.\r
144 \r
145 If OperationRequest < 128, then ASSERT().\r
146\r
147 @param[in] OperationRequest TPM physical presence operation request.\r
148 @param[in] ManagementFlags BIOS TPM Management Flags.\r
149\r
150 @return Return Code for Get User Confirmation Status for Operation.\r
151**/\r
152UINT32\r
153EFIAPI\r
154TcgPpVendorLibGetUserConfirmationStatusFunction (\r
155 IN UINT32 OperationRequest,\r
156 IN UINT32 ManagementFlags\r
157 );\r
158\r
159#endif\r