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