1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) Microsoft Corporation
6 #ifndef __TPM_FTPM_TEE_H__
7 #define __TPM_FTPM_TEE_H__
9 #include <linux/tee_drv.h>
10 #include <linux/tpm.h>
11 #include <linux/uuid.h>
13 /* The TAFs ID implemented in this TA */
14 #define FTPM_OPTEE_TA_SUBMIT_COMMAND (0)
15 #define FTPM_OPTEE_TA_EMULATE_PPI (1)
17 /* max. buffer size supported by fTPM */
18 #define MAX_COMMAND_SIZE 4096
19 #define MAX_RESPONSE_SIZE 4096
22 * struct ftpm_tee_private - fTPM's private data
23 * @chip: struct tpm_chip instance registered with tpm framework.
24 * @state: internal state
25 * @session: fTPM TA session identifier.
26 * @resp_len: cached response buffer length.
27 * @resp_buf: cached response buffer.
28 * @ctx: TEE context handler.
29 * @shm: Memory pool shared with fTPM TA in TEE.
31 struct ftpm_tee_private
{
32 struct tpm_chip
*chip
;
35 u8 resp_buf
[MAX_RESPONSE_SIZE
];
36 struct tee_context
*ctx
;
40 #endif /* __TPM_FTPM_TEE_H__ */