]>
Commit | Line | Data |
---|---|---|
4610b23a JY |
1 | /** @file\r |
2 | Ihis library is to support TCG Physical Presence Interface (PPI) specification\r | |
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 | |
10 | Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r | |
11 | This program and the accompanying materials \r | |
12 | are licensed and made available under the terms and conditions of the BSD License \r | |
13 | which accompanies this distribution. The full text of the license may be found at \r | |
14 | http://opensource.org/licenses/bsd-license.php\r | |
15 | \r | |
16 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
17 | WITHOUT 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 | |
45 | // The return code for Sumbit TPM Request to Pre-OS Environment\r | |
46 | // and Sumbit TPM Request to Pre-OS Environment 2\r | |
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 | |
79 | UINT32\r | |
80 | EFIAPI\r | |
81 | TcgPpVendorLibExecutePendingRequest (\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 | |
105 | BOOLEAN\r | |
106 | EFIAPI\r | |
107 | TcgPpVendorLibHasValidRequest (\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 | |
130 | UINT32\r | |
131 | EFIAPI\r | |
132 | TcgPpVendorLibSubmitRequestToPreOSFunction (\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 | |
152 | UINT32\r | |
153 | EFIAPI\r | |
154 | TcgPpVendorLibGetUserConfirmationStatusFunction (\r | |
155 | IN UINT32 OperationRequest,\r | |
156 | IN UINT32 ManagementFlags\r | |
157 | );\r | |
158 | \r | |
159 | #endif\r |