]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.c
Add TPM Physical Presence >=128 operation value support.
[mirror_edk2.git] / SecurityPkg / Library / TcgPpVendorLibNull / TcgPpVendorLibNull.c
... / ...
CommitLineData
1/** @file\r
2 NULL TCG 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/TcgPpVendorLib.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] OperationRequest TPM physical presence operation request.\r
28 @param[in, out] ManagementFlags BIOS TPM Management Flags.\r
29 @param[out] ResetRequired If reset is required to vendor settings in effect.\r
30 True, it indicates the reset is required.\r
31 False, it indicates the reset is not required.\r
32\r
33 @return TPM Operation Response to OS Environment.\r
34**/\r
35UINT32\r
36EFIAPI\r
37TcgPpVendorLibExecutePendingRequest (\r
38 IN UINT32 OperationRequest,\r
39 IN OUT UINT32 *ManagementFlags,\r
40 OUT BOOLEAN *ResetRequired\r
41 )\r
42{\r
43 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
44 return TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE;\r
45}\r
46\r
47/**\r
48 Check if there is a valid physical presence command request.\r
49\r
50 This API should be invoked in BIOS boot phase to process pending request.\r
51 \r
52 Caution: This function may receive untrusted input.\r
53\r
54 If OperationRequest < 128, then ASSERT().\r
55\r
56 @param[in] OperationRequest TPM physical presence operation request.\r
57 @param[in] ManagementFlags BIOS TPM Management Flags.\r
58 @param[out] RequestConfirmed If the physical presence operation command required user confirm from UI.\r
59 True, it indicates the command doesn't require user confirm.\r
60 False, it indicates the command need user confirm from UI.\r
61\r
62 @retval TRUE Physical Presence operation command is valid.\r
63 @retval FALSE Physical Presence operation command is invalid.\r
64**/\r
65BOOLEAN\r
66EFIAPI\r
67TcgPpVendorLibHasValidRequest (\r
68 IN UINT32 OperationRequest,\r
69 IN UINT32 ManagementFlags,\r
70 OUT BOOLEAN *RequestConfirmed\r
71 )\r
72{\r
73 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
74 return FALSE;\r
75}\r
76\r
77/**\r
78 The callback for TPM vendor specific physical presence which is called for\r
79 Submit TPM Operation Request to Pre-OS Environment and\r
80 Submit TPM Operation Request to Pre-OS Environment 2.\r
81\r
82 This API should be invoked in OS runtime phase to interface with ACPI method.\r
83\r
84 Caution: This function may receive untrusted input.\r
85 \r
86 If OperationRequest < 128, then ASSERT().\r
87\r
88 @param[in] OperationRequest TPM physical presence operation request.\r
89 @param[in] ManagementFlags BIOS TPM Management Flags.\r
90\r
91 @return Return Code for Submit TPM Operation Request to Pre-OS Environment and\r
92 Submit TPM Operation Request to Pre-OS Environment 2.\r
93**/\r
94UINT32\r
95EFIAPI\r
96TcgPpVendorLibSubmitRequestToPreOSFunction (\r
97 IN UINT32 OperationRequest,\r
98 IN UINT32 ManagementFlags\r
99 )\r
100{\r
101 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
102 return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;\r
103}\r
104\r
105/**\r
106 The callback for TPM vendor specific physical presence which is called for\r
107 Get User Confirmation Status for Operation.\r
108\r
109 This API should be invoked in OS runtime phase to interface with ACPI method.\r
110\r
111 Caution: This function may receive untrusted input.\r
112 \r
113 If OperationRequest < 128, then ASSERT().\r
114\r
115 @param[in] OperationRequest TPM physical presence operation request.\r
116 @param[in] ManagementFlags BIOS TPM Management Flags.\r
117\r
118 @return Return Code for Get User Confirmation Status for Operation.\r
119**/\r
120UINT32\r
121EFIAPI\r
122TcgPpVendorLibGetUserConfirmationStatusFunction (\r
123 IN UINT32 OperationRequest,\r
124 IN UINT32 ManagementFlags\r
125 )\r
126{\r
127 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
128 return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;\r
129}\r