tpm_ftpm_tee.h 863 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) Microsoft Corporation
  4. */
  5. #ifndef __TPM_FTPM_TEE_H__
  6. #define __TPM_FTPM_TEE_H__
  7. #include <linux/tee_drv.h>
  8. #include <linux/tpm.h>
  9. #include <linux/uuid.h>
  10. /* The TAFs ID implemented in this TA */
  11. #define FTPM_OPTEE_TA_SUBMIT_COMMAND (0)
  12. #define FTPM_OPTEE_TA_EMULATE_PPI (1)
  13. /* max. buffer size supported by fTPM */
  14. #define MAX_COMMAND_SIZE 4096
  15. #define MAX_RESPONSE_SIZE 4096
  16. /**
  17. * struct ftpm_tee_private - fTPM's private data
  18. * @chip: struct tpm_chip instance registered with tpm framework.
  19. * @session: fTPM TA session identifier.
  20. * @ctx: TEE context handler.
  21. * @shm: Memory pool shared with fTPM TA in TEE.
  22. */
  23. struct ftpm_tee_private {
  24. struct tpm_chip *chip;
  25. u32 session;
  26. struct tee_context *ctx;
  27. struct tee_shm *shm;
  28. };
  29. #endif /* __TPM_FTPM_TEE_H__ */