Tcg2PpVendorLib.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /** @file
  2. This library is to support TCG PC Client Platform Physical Presence Interface Specification
  3. Family "2.0" part, >= 128 Vendor Specific PPI Operation.
  4. The Vendor Specific PPI operation may change TPM state, BIOS TPM management
  5. flags, and may need additional boot cycle.
  6. Caution: This function may receive untrusted input.
  7. Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
  8. SPDX-License-Identifier: BSD-2-Clause-Patent
  9. **/
  10. #ifndef _TCG2_PP_VENDOR_LIB_H_
  11. #define _TCG2_PP_VENDOR_LIB_H_
  12. #include <IndustryStandard/Tpm20.h>
  13. #include <Protocol/Tcg2Protocol.h>
  14. #include <Library/Tcg2PhysicalPresenceLib.h>
  15. /**
  16. Check and execute the requested physical presence command.
  17. This API should be invoked in BIOS boot phase to process pending request.
  18. Caution: This function may receive untrusted input.
  19. If OperationRequest < 128, then ASSERT().
  20. @param[in] PlatformAuth platform auth value. NULL means no platform auth change.
  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. @return TPM Operation Response to OS Environment.
  27. **/
  28. UINT32
  29. EFIAPI
  30. Tcg2PpVendorLibExecutePendingRequest (
  31. IN TPM2B_AUTH *PlatformAuth, OPTIONAL
  32. IN UINT32 OperationRequest,
  33. IN OUT UINT32 *ManagementFlags,
  34. OUT BOOLEAN *ResetRequired
  35. );
  36. /**
  37. Check if there is a valid physical presence command request.
  38. This API should be invoked in BIOS boot phase to process pending request.
  39. Caution: This function may receive untrusted input.
  40. If OperationRequest < 128, then ASSERT().
  41. @param[in] OperationRequest TPM physical presence operation request.
  42. @param[in] ManagementFlags BIOS TPM Management Flags.
  43. @param[out] RequestConfirmed If the physical presence operation command required user confirm from UI.
  44. True, it indicates the command doesn't require user confirm.
  45. False, it indicates the command need user confirm from UI.
  46. @retval TRUE Physical Presence operation command is valid.
  47. @retval FALSE Physical Presence operation command is invalid.
  48. **/
  49. BOOLEAN
  50. EFIAPI
  51. Tcg2PpVendorLibHasValidRequest (
  52. IN UINT32 OperationRequest,
  53. IN UINT32 ManagementFlags,
  54. OUT BOOLEAN *RequestConfirmed
  55. );
  56. /**
  57. The callback for TPM vendor specific physical presence which is called for
  58. Submit TPM Operation Request to Pre-OS Environment and
  59. Submit TPM Operation Request to Pre-OS Environment 2.
  60. This API should be invoked in OS runtime phase to interface with ACPI method.
  61. Caution: This function may receive untrusted input.
  62. If OperationRequest < 128, then ASSERT().
  63. @param[in] OperationRequest TPM physical presence operation request.
  64. @param[in] ManagementFlags BIOS TPM Management Flags.
  65. @param[in] RequestParameter Extra parameter from the passed package.
  66. @return Return Code for Submit TPM Operation Request to Pre-OS Environment and
  67. Submit TPM Operation Request to Pre-OS Environment 2.
  68. **/
  69. UINT32
  70. EFIAPI
  71. Tcg2PpVendorLibSubmitRequestToPreOSFunction (
  72. IN UINT32 OperationRequest,
  73. IN UINT32 ManagementFlags,
  74. IN UINT32 RequestParameter
  75. );
  76. /**
  77. The callback for TPM vendor specific physical presence which is called for
  78. Get User Confirmation Status for Operation.
  79. This API should be invoked in OS runtime phase to interface with ACPI method.
  80. Caution: This function may receive untrusted input.
  81. If OperationRequest < 128, then ASSERT().
  82. @param[in] OperationRequest TPM physical presence operation request.
  83. @param[in] ManagementFlags BIOS TPM Management Flags.
  84. @return Return Code for Get User Confirmation Status for Operation.
  85. **/
  86. UINT32
  87. EFIAPI
  88. Tcg2PpVendorLibGetUserConfirmationStatusFunction (
  89. IN UINT32 OperationRequest,
  90. IN UINT32 ManagementFlags
  91. );
  92. #endif