SecurityPkg/TrEEPhysicalPresenceLib: remove TrEE.
[mirror_edk2.git] / SecurityPkg / Library / TrEEPpVendorLibNull / TrEEPpVendorLibNull.c
CommitLineData
4610b23a
JY
1/** @file\r
2 NULL TrEE PP Vendor library instance that does not support any vendor specific PPI.\r
3\r
4Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <Library/DebugLib.h>\r
16#include <Library/TrEEPpVendorLib.h>\r
17\r
18/**\r
19 Check and execute the requested physical presence command.\r
20\r
21 This API should be invoked in BIOS boot phase to process pending request.\r
22 \r
23 Caution: This function may receive untrusted input.\r
24 \r
25 If OperationRequest < 128, then ASSERT().\r
26\r
27 @param[in] PlatformAuth platform auth value. NULL means no platform auth change.\r
28 @param[in] OperationRequest TPM physical presence operation request.\r
29 @param[in, out] ManagementFlags BIOS TPM Management Flags.\r
30 @param[out] ResetRequired If reset is required to vendor settings in effect.\r
31 True, it indicates the reset is required.\r
32 False, it indicates the reset is not required.\r
33\r
34 @return TPM Operation Response to OS Environment.\r
35**/\r
36UINT32\r
37EFIAPI\r
38TrEEPpVendorLibExecutePendingRequest (\r
39 IN TPM2B_AUTH *PlatformAuth, OPTIONAL\r
40 IN UINT32 OperationRequest,\r
41 IN OUT UINT32 *ManagementFlags,\r
42 OUT BOOLEAN *ResetRequired\r
43 )\r
44{\r
45 ASSERT (OperationRequest >= TREE_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
46 return TREE_PP_OPERATION_RESPONSE_BIOS_FAILURE;\r
47}\r
48\r
49/**\r
50 Check if there is a valid physical presence command request.\r
51\r
52 This API should be invoked in BIOS boot phase to process pending request.\r
53 \r
54 Caution: This function may receive untrusted input.\r
55\r
56 If OperationRequest < 128, then ASSERT().\r
57\r
58 @param[in] OperationRequest TPM physical presence operation request.\r
59 @param[in] ManagementFlags BIOS TPM Management Flags.\r
60 @param[out] RequestConfirmed If the physical presence operation command required user confirm from UI.\r
61 True, it indicates the command doesn't require user confirm.\r
62 False, it indicates the command need user confirm from UI.\r
63\r
64 @retval TRUE Physical Presence operation command is valid.\r
65 @retval FALSE Physical Presence operation command is invalid.\r
66**/\r
67BOOLEAN\r
68EFIAPI\r
69TrEEPpVendorLibHasValidRequest (\r
70 IN UINT32 OperationRequest,\r
71 IN UINT32 ManagementFlags,\r
72 OUT BOOLEAN *RequestConfirmed\r
73 )\r
74{\r
75 ASSERT (OperationRequest >= TREE_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
76 return FALSE;\r
77}\r
78\r
79/**\r
80 The callback for TPM vendor specific physical presence which is called for\r
81 Submit TPM Operation Request to Pre-OS Environment and\r
82 Submit TPM Operation Request to Pre-OS Environment 2.\r
83\r
84 This API should be invoked in OS runtime phase to interface with ACPI method.\r
85\r
86 Caution: This function may receive untrusted input.\r
87 \r
88 If OperationRequest < 128, then ASSERT().\r
89\r
90 @param[in] OperationRequest TPM physical presence operation request.\r
91 @param[in] ManagementFlags BIOS TPM Management Flags.\r
92\r
93 @return Return Code for Submit TPM Operation Request to Pre-OS Environment and\r
94 Submit TPM Operation Request to Pre-OS Environment 2.\r
95**/\r
96UINT32\r
97EFIAPI\r
98TrEEPpVendorLibSubmitRequestToPreOSFunction (\r
99 IN UINT32 OperationRequest,\r
100 IN UINT32 ManagementFlags\r
101 )\r
102{\r
103 ASSERT (OperationRequest >= TREE_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
104 return TREE_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;\r
105}\r
106\r
107/**\r
108 The callback for TPM vendor specific physical presence which is called for\r
109 Get User Confirmation Status for Operation.\r
110\r
111 This API should be invoked in OS runtime phase to interface with ACPI method.\r
112\r
113 Caution: This function may receive untrusted input.\r
114 \r
115 If OperationRequest < 128, then ASSERT().\r
116\r
117 @param[in] OperationRequest TPM physical presence operation request.\r
118 @param[in] ManagementFlags BIOS TPM Management Flags.\r
119\r
120 @return Return Code for Get User Confirmation Status for Operation.\r
121**/\r
122UINT32\r
123EFIAPI\r
124TrEEPpVendorLibGetUserConfirmationStatusFunction (\r
125 IN UINT32 OperationRequest,\r
126 IN UINT32 ManagementFlags\r
127 )\r
128{\r
129 ASSERT (OperationRequest >= TREE_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
130 return TREE_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;\r
131}\r