blob: 419643a0246ba8a733b2ee5f6b50bf584876920e [file] [log] [blame]
Jens Wiklandereadf26f2018-09-25 16:40:18 +02001/* 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 Opaniukfc1fe012019-04-09 15:38:14 +02009#include <search.h>
10#include <tee/optee_ta_avb.h>
11
Jens Wiklandereadf26f2018-09-25 16:40:18 +020012/**
13 * struct sandbox_tee_state - internal state of the sandbox TEE
Igor Opaniukfc1fe012019-04-09 15:38:14 +020014 * @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 Wiklandereadf26f2018-09-25 16:40:18 +020020 */
21struct sandbox_tee_state {
22 u32 session;
23 int num_shms;
24 void *ta;
Igor Opaniukfc1fe012019-04-09 15:38:14 +020025 u64 ta_avb_rollback_indexes[TA_AVB_MAX_ROLLBACK_LOCATIONS];
26 u32 ta_avb_lock_state;
27 struct hsearch_data pstorage_htab;
Jens Wiklandereadf26f2018-09-25 16:40:18 +020028};
29
30#endif /*__SANDBOXTEE_H*/