Jens Wiklander | c7b443a | 2018-09-25 16:40:18 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2018 Linaro Limited |
| 4 | */ |
| 5 | |
| 6 | #ifndef __SANDBOXTEE_H |
| 7 | #define __SANDBOXTEE_H |
| 8 | |
Igor Opaniuk | 78b0b9d | 2019-04-09 15:38:14 +0200 | [diff] [blame] | 9 | #include <search.h> |
| 10 | #include <tee/optee_ta_avb.h> |
| 11 | |
Jens Wiklander | c7b443a | 2018-09-25 16:40:18 +0200 | [diff] [blame] | 12 | /** |
| 13 | * struct sandbox_tee_state - internal state of the sandbox TEE |
Igor Opaniuk | 78b0b9d | 2019-04-09 15:38:14 +0200 | [diff] [blame] | 14 | * @session: current open session |
| 15 | * @num_shms: number of registered shared memory objects |
| 16 | * @ta: Trusted Application of current session |
| 17 | * @ta_avb_rollback_indexes TA avb rollback indexes storage |
| 18 | * @ta_avb_lock_state TA avb lock state storage |
| 19 | * @pstorage_htab named persistent values storage |
Jens Wiklander | c7b443a | 2018-09-25 16:40:18 +0200 | [diff] [blame] | 20 | */ |
| 21 | struct sandbox_tee_state { |
| 22 | u32 session; |
| 23 | int num_shms; |
| 24 | void *ta; |
Igor Opaniuk | 78b0b9d | 2019-04-09 15:38:14 +0200 | [diff] [blame] | 25 | u64 ta_avb_rollback_indexes[TA_AVB_MAX_ROLLBACK_LOCATIONS]; |
| 26 | u32 ta_avb_lock_state; |
| 27 | struct hsearch_data pstorage_htab; |
Jens Wiklander | c7b443a | 2018-09-25 16:40:18 +0200 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | #endif /*__SANDBOXTEE_H*/ |