2 This library is to support TCG PC Client Platform Physical Presence Interface Specification
3 Family, >= 96 && <128 storage Specific PPI Operation.
5 Caution: This function may receive untrusted input.
7 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
8 This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #ifndef _TCG_PHYSICAL_PRESENCE_STORAGE_LIB_H_
19 #define _TCG_PHYSICAL_PRESENCE_STORAGE_LIB_H_
22 // UEFI TCG2 library definition bit of the BIOS Storage Management Flags
24 #define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID BIT1
25 #define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID BIT2
26 #define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID BIT3
31 #define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT (TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID |\
32 TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID)
35 Check and execute the pending TPM request.
37 The TPM request may come from OS or BIOS. This API will display request information and wait
38 for user confirmation if TPM request exists. The TPM request will be sent to TPM device after
39 the TPM request is confirmed, and one or more reset may be required to make TPM request to
42 This API should be invoked after console in and console out are all ready as they are required
43 to display request information and get user input to confirm the request.
45 @param[in] PlatformAuth platform auth value. NULL means no platform auth change.
49 TcgPhysicalPresenceStorageLibProcessRequest (
54 Check if the pending TPM request needs user input to confirm.
56 The TPM request may come from OS. This API will check if TPM request exists and need user
57 input to confirmation.
59 @retval TRUE TPM needs input to confirm user physical presence.
60 @retval FALSE TPM doesn't need input to confirm user physical presence.
65 TcgPhysicalPresenceStorageLibNeedUserConfirm(
70 The handler for TPM physical presence function:
71 Submit TPM Operation Request to Pre-OS Environment and
72 Submit TPM Operation Request to Pre-OS Environment 2.
74 Caution: This function may receive untrusted input.
76 @param[in] OperationRequest TPM physical presence operation request.
77 @param[in] RequestParameter TPM physical presence operation request parameter.
79 @return Return Code for Submit TPM Operation Request to Pre-OS Environment and
80 Submit TPM Operation Request to Pre-OS Environment 2.
84 TcgPhysicalPresenceStorageLibSubmitRequestToPreOSFunction (
85 IN UINT32 OperationRequest
,
86 IN UINT32 RequestParameter
90 The handler for TPM physical presence function:
91 Return TPM Operation Response to OS Environment.
93 This API should be invoked in OS runtime phase to interface with ACPI method.
95 @param[out] MostRecentRequest Most recent operation request.
96 @param[out] Response Response to the most recent operation request.
98 @return Return Code for Return TPM Operation Response to OS Environment.
102 TcgPhysicalPresenceStorageLibReturnOperationResponseToOsFunction (
103 OUT UINT32
*MostRecentRequest
,
108 The handler for TPM physical presence function:
109 Return TPM Operation flag variable.
111 @return Return Code for Return TPM Operation flag variable.
115 TcgPhysicalPresenceStorageLibReturnStorageFlags (
121 Install string package.
123 @param ImageHandle The image handle.
124 @param SystemTable The system table.
126 @retval EFI_SUCEESS Install string package success.
127 @retval Other Return error status.
132 TcgPhysicalPresenceStorageLibConstructor (
133 IN EFI_HANDLE ImageHandle
,
134 IN EFI_SYSTEM_TABLE
*SystemTable
138 Unloads the library and its installed protocol.
140 @param[in] ImageHandle Handle that identifies the image to be unloaded.
141 @param[in] SystemTable System Table
143 @retval EFI_SUCCESS The image has been unloaded.
147 TcgPhysicalPresenceStorageLibDestructor (
148 IN EFI_HANDLE ImageHandle
,
149 IN EFI_SYSTEM_TABLE
*SystemTable