]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.c
SecurityPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / SecurityPkg / Library / TcgPpVendorLibNull / TcgPpVendorLibNull.c
CommitLineData
4610b23a
JY
1/** @file\r
2 NULL TCG PP Vendor library instance that does not support any vendor specific PPI.\r
3\r
b3548d32 4Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
289b714b 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
4610b23a
JY
6\r
7**/\r
8\r
9#include <Library/DebugLib.h>\r
10#include <Library/TcgPpVendorLib.h>\r
11\r
12/**\r
13 Check and execute the requested physical presence command.\r
14\r
15 This API should be invoked in BIOS boot phase to process pending request.\r
b3548d32 16\r
4610b23a 17 Caution: This function may receive untrusted input.\r
b3548d32 18\r
4610b23a
JY
19 If OperationRequest < 128, then ASSERT().\r
20\r
21 @param[in] OperationRequest TPM physical presence operation request.\r
22 @param[in, out] ManagementFlags BIOS TPM Management Flags.\r
23 @param[out] ResetRequired If reset is required to vendor settings in effect.\r
24 True, it indicates the reset is required.\r
25 False, it indicates the reset is not required.\r
26\r
27 @return TPM Operation Response to OS Environment.\r
28**/\r
29UINT32\r
30EFIAPI\r
31TcgPpVendorLibExecutePendingRequest (\r
32 IN UINT32 OperationRequest,\r
33 IN OUT UINT32 *ManagementFlags,\r
34 OUT BOOLEAN *ResetRequired\r
35 )\r
36{\r
37 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
38 return TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE;\r
39}\r
40\r
41/**\r
42 Check if there is a valid physical presence command request.\r
43\r
44 This API should be invoked in BIOS boot phase to process pending request.\r
b3548d32 45\r
4610b23a
JY
46 Caution: This function may receive untrusted input.\r
47\r
48 If OperationRequest < 128, then ASSERT().\r
49\r
50 @param[in] OperationRequest TPM physical presence operation request.\r
51 @param[in] ManagementFlags BIOS TPM Management Flags.\r
52 @param[out] RequestConfirmed If the physical presence operation command required user confirm from UI.\r
53 True, it indicates the command doesn't require user confirm.\r
54 False, it indicates the command need user confirm from UI.\r
55\r
56 @retval TRUE Physical Presence operation command is valid.\r
57 @retval FALSE Physical Presence operation command is invalid.\r
58**/\r
59BOOLEAN\r
60EFIAPI\r
61TcgPpVendorLibHasValidRequest (\r
62 IN UINT32 OperationRequest,\r
63 IN UINT32 ManagementFlags,\r
64 OUT BOOLEAN *RequestConfirmed\r
65 )\r
66{\r
67 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
68 return FALSE;\r
69}\r
70\r
71/**\r
72 The callback for TPM vendor specific physical presence which is called for\r
73 Submit TPM Operation Request to Pre-OS Environment and\r
74 Submit TPM Operation Request to Pre-OS Environment 2.\r
75\r
76 This API should be invoked in OS runtime phase to interface with ACPI method.\r
77\r
78 Caution: This function may receive untrusted input.\r
b3548d32 79\r
4610b23a
JY
80 If OperationRequest < 128, then ASSERT().\r
81\r
82 @param[in] OperationRequest TPM physical presence operation request.\r
83 @param[in] ManagementFlags BIOS TPM Management Flags.\r
84\r
85 @return Return Code for Submit TPM Operation Request to Pre-OS Environment and\r
86 Submit TPM Operation Request to Pre-OS Environment 2.\r
87**/\r
88UINT32\r
89EFIAPI\r
90TcgPpVendorLibSubmitRequestToPreOSFunction (\r
91 IN UINT32 OperationRequest,\r
92 IN UINT32 ManagementFlags\r
93 )\r
94{\r
95 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
96 return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;\r
97}\r
98\r
99/**\r
100 The callback for TPM vendor specific physical presence which is called for\r
101 Get User Confirmation Status for Operation.\r
102\r
103 This API should be invoked in OS runtime phase to interface with ACPI method.\r
104\r
105 Caution: This function may receive untrusted input.\r
b3548d32 106\r
4610b23a
JY
107 If OperationRequest < 128, then ASSERT().\r
108\r
109 @param[in] OperationRequest TPM physical presence operation request.\r
110 @param[in] ManagementFlags BIOS TPM Management Flags.\r
111\r
112 @return Return Code for Get User Confirmation Status for Operation.\r
113**/\r
114UINT32\r
115EFIAPI\r
116TcgPpVendorLibGetUserConfirmationStatusFunction (\r
117 IN UINT32 OperationRequest,\r
118 IN UINT32 ManagementFlags\r
119 )\r
120{\r
121 ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);\r
122 return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;\r
123}\r