TcgPpVendorLibNull.c 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /** @file
  2. NULL TCG 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/TcgPpVendorLib.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] OperationRequest TPM physical presence operation request.
  14. @param[in, out] ManagementFlags BIOS TPM Management Flags.
  15. @param[out] ResetRequired If reset is required to vendor settings in effect.
  16. True, it indicates the reset is required.
  17. False, it indicates the reset is not required.
  18. @return TPM Operation Response to OS Environment.
  19. **/
  20. UINT32
  21. EFIAPI
  22. TcgPpVendorLibExecutePendingRequest (
  23. IN UINT32 OperationRequest,
  24. IN OUT UINT32 *ManagementFlags,
  25. OUT BOOLEAN *ResetRequired
  26. )
  27. {
  28. ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);
  29. return TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE;
  30. }
  31. /**
  32. Check if there is a valid physical presence command request.
  33. This API should be invoked in BIOS boot phase to process pending request.
  34. Caution: This function may receive untrusted input.
  35. If OperationRequest < 128, then ASSERT().
  36. @param[in] OperationRequest TPM physical presence operation request.
  37. @param[in] ManagementFlags BIOS TPM Management Flags.
  38. @param[out] RequestConfirmed If the physical presence operation command required user confirm from UI.
  39. True, it indicates the command doesn't require user confirm.
  40. False, it indicates the command need user confirm from UI.
  41. @retval TRUE Physical Presence operation command is valid.
  42. @retval FALSE Physical Presence operation command is invalid.
  43. **/
  44. BOOLEAN
  45. EFIAPI
  46. TcgPpVendorLibHasValidRequest (
  47. IN UINT32 OperationRequest,
  48. IN UINT32 ManagementFlags,
  49. OUT BOOLEAN *RequestConfirmed
  50. )
  51. {
  52. ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);
  53. return FALSE;
  54. }
  55. /**
  56. The callback for TPM vendor specific physical presence which is called for
  57. Submit TPM Operation Request to Pre-OS Environment and
  58. Submit TPM Operation Request to Pre-OS Environment 2.
  59. This API should be invoked in OS runtime phase to interface with ACPI method.
  60. Caution: This function may receive untrusted input.
  61. If OperationRequest < 128, then ASSERT().
  62. @param[in] OperationRequest TPM physical presence operation request.
  63. @param[in] ManagementFlags BIOS TPM Management Flags.
  64. @return Return Code for Submit TPM Operation Request to Pre-OS Environment and
  65. Submit TPM Operation Request to Pre-OS Environment 2.
  66. **/
  67. UINT32
  68. EFIAPI
  69. TcgPpVendorLibSubmitRequestToPreOSFunction (
  70. IN UINT32 OperationRequest,
  71. IN UINT32 ManagementFlags
  72. )
  73. {
  74. ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);
  75. return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;
  76. }
  77. /**
  78. The callback for TPM vendor specific physical presence which is called for
  79. Get User Confirmation Status for Operation.
  80. This API should be invoked in OS runtime phase to interface with ACPI method.
  81. Caution: This function may receive untrusted input.
  82. If OperationRequest < 128, then ASSERT().
  83. @param[in] OperationRequest TPM physical presence operation request.
  84. @param[in] ManagementFlags BIOS TPM Management Flags.
  85. @return Return Code for Get User Confirmation Status for Operation.
  86. **/
  87. UINT32
  88. EFIAPI
  89. TcgPpVendorLibGetUserConfirmationStatusFunction (
  90. IN UINT32 OperationRequest,
  91. IN UINT32 ManagementFlags
  92. )
  93. {
  94. ASSERT (OperationRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION);
  95. return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
  96. }