Tpm12DeviceLib.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /** @file
  2. This library abstract how to access TPM12 hardware device.
  3. Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _TPM12_DEVICE_LIB_H_
  7. #define _TPM12_DEVICE_LIB_H_
  8. #include <IndustryStandard/Tpm12.h>
  9. /**
  10. This service enables the sending of commands to the TPM12.
  11. @param[in] InputParameterBlockSize Size of the TPM12 input parameter block.
  12. @param[in] InputParameterBlock Pointer to the TPM12 input parameter block.
  13. @param[in,out] OutputParameterBlockSize Size of the TPM12 output parameter block.
  14. @param[in] OutputParameterBlock Pointer to the TPM12 output parameter block.
  15. @retval EFI_SUCCESS The command byte stream was successfully sent to the device and a response was successfully received.
  16. @retval EFI_DEVICE_ERROR The command was not successfully sent to the device or a response was not successfully received from the device.
  17. @retval EFI_BUFFER_TOO_SMALL The output parameter block is too small.
  18. **/
  19. EFI_STATUS
  20. EFIAPI
  21. Tpm12SubmitCommand (
  22. IN UINT32 InputParameterBlockSize,
  23. IN UINT8 *InputParameterBlock,
  24. IN OUT UINT32 *OutputParameterBlockSize,
  25. IN UINT8 *OutputParameterBlock
  26. );
  27. /**
  28. This service requests use TPM12.
  29. @retval EFI_SUCCESS Get the control of TPM12 chip.
  30. @retval EFI_NOT_FOUND TPM12 not found.
  31. @retval EFI_DEVICE_ERROR Unexpected device behavior.
  32. **/
  33. EFI_STATUS
  34. EFIAPI
  35. Tpm12RequestUseTpm (
  36. VOID
  37. );
  38. #endif