Tcg2PpVendorLibNull.c 4.3 KB

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