--- /dev/null
+/** @file\r
+ This library is to support TCG PC Client Platform Physical Presence Interface Specification\r
+ Family, >= 96 && <128 storage Specific PPI Operation.\r
+ \r
+ Caution: This function may receive untrusted input.\r
+\r
+Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
+are licensed and made available under the terms and conditions of the BSD License \r
+which accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _TCG_PHYSICAL_PRESENCE_STORAGE_LIB_H_\r
+#define _TCG_PHYSICAL_PRESENCE_STORAGE_LIB_H_\r
+\r
+//\r
+// UEFI TCG2 library definition bit of the BIOS Storage Management Flags\r
+//\r
+#define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID BIT1\r
+#define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID BIT2\r
+#define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID BIT3\r
+\r
+//\r
+// Default value\r
+//\r
+#define TCG_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT (TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID |\\r
+ TCG_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID)\r
+\r
+/**\r
+ Check and execute the pending TPM request.\r
+\r
+ The TPM request may come from OS or BIOS. This API will display request information and wait \r
+ for user confirmation if TPM request exists. The TPM request will be sent to TPM device after\r
+ the TPM request is confirmed, and one or more reset may be required to make TPM request to \r
+ take effect.\r
+ \r
+ This API should be invoked after console in and console out are all ready as they are required\r
+ to display request information and get user input to confirm the request. \r
+\r
+ @param[in] PlatformAuth platform auth value. NULL means no platform auth change.\r
+**/\r
+VOID\r
+EFIAPI\r
+TcgPhysicalPresenceStorageLibProcessRequest (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Check if the pending TPM request needs user input to confirm.\r
+\r
+ The TPM request may come from OS. This API will check if TPM request exists and need user\r
+ input to confirmation.\r
+ \r
+ @retval TRUE TPM needs input to confirm user physical presence.\r
+ @retval FALSE TPM doesn't need input to confirm user physical presence.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+TcgPhysicalPresenceStorageLibNeedUserConfirm(\r
+ VOID\r
+ );\r
+\r
+/**\r
+ The handler for TPM physical presence function:\r
+ Submit TPM Operation Request to Pre-OS Environment and\r
+ Submit TPM Operation Request to Pre-OS Environment 2.\r
+\r
+ Caution: This function may receive untrusted input.\r
+ \r
+ @param[in] OperationRequest TPM physical presence operation request.\r
+ @param[in] RequestParameter TPM physical presence operation request parameter.\r
+\r
+ @return Return Code for Submit TPM Operation Request to Pre-OS Environment and\r
+ Submit TPM Operation Request to Pre-OS Environment 2.\r
+**/\r
+UINT32\r
+EFIAPI\r
+TcgPhysicalPresenceStorageLibSubmitRequestToPreOSFunction (\r
+ IN UINT32 OperationRequest,\r
+ IN UINT32 RequestParameter\r
+ );\r
+\r
+/**\r
+ The handler for TPM physical presence function:\r
+ Return TPM Operation Response to OS Environment.\r
+\r
+ This API should be invoked in OS runtime phase to interface with ACPI method.\r
+\r
+ @param[out] MostRecentRequest Most recent operation request.\r
+ @param[out] Response Response to the most recent operation request.\r
+\r
+ @return Return Code for Return TPM Operation Response to OS Environment.\r
+**/\r
+UINT32\r
+EFIAPI\r
+TcgPhysicalPresenceStorageLibReturnOperationResponseToOsFunction (\r
+ OUT UINT32 *MostRecentRequest,\r
+ OUT UINT32 *Response\r
+ );\r
+\r
+/**\r
+ The handler for TPM physical presence function:\r
+ Return TPM Operation flag variable.\r
+\r
+ @return Return Code for Return TPM Operation flag variable.\r
+**/\r
+UINT32\r
+EFIAPI\r
+TcgPhysicalPresenceStorageLibReturnStorageFlags (\r
+ VOID\r
+ );\r
+\r
+/**\r
+\r
+ Install string package.\r
+\r
+ @param ImageHandle The image handle.\r
+ @param SystemTable The system table.\r
+\r
+ @retval EFI_SUCEESS Install string package success.\r
+ @retval Other Return error status.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TcgPhysicalPresenceStorageLibConstructor (\r
+ IN EFI_HANDLE ImageHandle,\r
+ IN EFI_SYSTEM_TABLE *SystemTable\r
+ );\r
+\r
+/**\r
+ Unloads the library and its installed protocol.\r
+\r
+ @param[in] ImageHandle Handle that identifies the image to be unloaded.\r
+ @param[in] SystemTable System Table\r
+\r
+ @retval EFI_SUCCESS The image has been unloaded.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TcgPhysicalPresenceStorageLibDestructor (\r
+ IN EFI_HANDLE ImageHandle,\r
+ IN EFI_SYSTEM_TABLE *SystemTable\r
+ );\r
+\r
+#endif\r