]>
Commit | Line | Data |
---|---|---|
1abfa4ce | 1 | /** @file\r |
07309c3d | 2 | This library is to support TCG PC Client Platform Physical Presence Interface Specification\r |
1abfa4ce JY |
3 | Family "2.0" part, >= 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 | |
b3548d32 | 7 | \r |
1abfa4ce JY |
8 | Caution: This function may receive untrusted input.\r |
9 | \r | |
b3548d32 | 10 | Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r |
289b714b | 11 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1abfa4ce JY |
12 | \r |
13 | **/\r | |
14 | \r | |
15 | #ifndef _TCG2_PP_VENDOR_LIB_H_\r | |
16 | #define _TCG2_PP_VENDOR_LIB_H_\r | |
17 | \r | |
18 | #include <IndustryStandard/Tpm20.h>\r | |
19 | #include <Protocol/Tcg2Protocol.h>\r | |
20 | #include <Library/Tcg2PhysicalPresenceLib.h>\r | |
21 | \r | |
22 | /**\r | |
23 | Check and execute the requested physical presence command.\r | |
24 | \r | |
25 | This API should be invoked in BIOS boot phase to process pending request.\r | |
b3548d32 | 26 | \r |
1abfa4ce | 27 | Caution: This function may receive untrusted input.\r |
b3548d32 | 28 | \r |
1abfa4ce JY |
29 | If OperationRequest < 128, then ASSERT().\r |
30 | \r | |
31 | @param[in] PlatformAuth platform auth value. NULL means no platform auth change.\r | |
32 | @param[in] OperationRequest TPM physical presence operation request.\r | |
33 | @param[in, out] ManagementFlags BIOS TPM Management Flags.\r | |
34 | @param[out] ResetRequired If reset is required to vendor settings in effect.\r | |
35 | True, it indicates the reset is required.\r | |
36 | False, it indicates the reset is not required.\r | |
37 | \r | |
38 | @return TPM Operation Response to OS Environment.\r | |
39 | **/\r | |
40 | UINT32\r | |
41 | EFIAPI\r | |
42 | Tcg2PpVendorLibExecutePendingRequest (\r | |
43 | IN TPM2B_AUTH *PlatformAuth, OPTIONAL\r | |
44 | IN UINT32 OperationRequest,\r | |
45 | IN OUT UINT32 *ManagementFlags,\r | |
46 | OUT BOOLEAN *ResetRequired\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 | |
b3548d32 | 53 | \r |
1abfa4ce JY |
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 | |
67 | BOOLEAN\r | |
68 | EFIAPI\r | |
69 | Tcg2PpVendorLibHasValidRequest (\r | |
70 | IN UINT32 OperationRequest,\r | |
71 | IN UINT32 ManagementFlags,\r | |
72 | OUT BOOLEAN *RequestConfirmed\r | |
73 | );\r | |
74 | \r | |
75 | /**\r | |
76 | The callback for TPM vendor specific physical presence which is called for\r | |
77 | Submit TPM Operation Request to Pre-OS Environment and\r | |
78 | Submit TPM Operation Request to Pre-OS Environment 2.\r | |
79 | \r | |
80 | This API should be invoked in OS runtime phase to interface with ACPI method.\r | |
81 | \r | |
82 | Caution: This function may receive untrusted input.\r | |
b3548d32 | 83 | \r |
1abfa4ce JY |
84 | If OperationRequest < 128, then ASSERT().\r |
85 | \r | |
86 | @param[in] OperationRequest TPM physical presence operation request.\r | |
87 | @param[in] ManagementFlags BIOS TPM Management Flags.\r | |
88 | @param[in] RequestParameter Extra parameter from the passed package.\r | |
89 | \r | |
90 | @return Return Code for Submit TPM Operation Request to Pre-OS Environment and\r | |
91 | Submit TPM Operation Request to Pre-OS Environment 2.\r | |
92 | **/\r | |
93 | UINT32\r | |
94 | EFIAPI\r | |
95 | Tcg2PpVendorLibSubmitRequestToPreOSFunction (\r | |
96 | IN UINT32 OperationRequest,\r | |
97 | IN UINT32 ManagementFlags,\r | |
98 | IN UINT32 RequestParameter\r | |
99 | );\r | |
100 | \r | |
101 | /**\r | |
102 | The callback for TPM vendor specific physical presence which is called for\r | |
103 | Get User Confirmation Status for Operation.\r | |
104 | \r | |
105 | This API should be invoked in OS runtime phase to interface with ACPI method.\r | |
106 | \r | |
107 | Caution: This function may receive untrusted input.\r | |
b3548d32 | 108 | \r |
1abfa4ce JY |
109 | If OperationRequest < 128, then ASSERT().\r |
110 | \r | |
111 | @param[in] OperationRequest TPM physical presence operation request.\r | |
112 | @param[in] ManagementFlags BIOS TPM Management Flags.\r | |
113 | \r | |
114 | @return Return Code for Get User Confirmation Status for Operation.\r | |
115 | **/\r | |
116 | UINT32\r | |
117 | EFIAPI\r | |
118 | Tcg2PpVendorLibGetUserConfirmationStatusFunction (\r | |
119 | IN UINT32 OperationRequest,\r | |
120 | IN UINT32 ManagementFlags\r | |
121 | );\r | |
122 | \r | |
123 | #endif\r |