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