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