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