1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
4  */
5 
6 #ifndef APP_FW_STRUCTURES_H
7 #define APP_FW_STRUCTURES_H
8 
9 #include <debug.h>
10 #include <pthread.h>
11 #include <stdbool.h>
12 #include <stdlib.h>
13 #include <unistd.h>
14 #include <utils_def.h>
15 
16 struct app_process_data {
17 	unsigned long app_id;
18 	int fd_rmm_to_app_process;
19 	int fd_app_process_to_rmm;
20 	pid_t pid;
21 };
22 
23 struct app_data_cfg {
24 	unsigned long app_id;
25 	void *el2_shared_page;
26 	/*
27 	 * This thread ID is valid in the corresponding app process, not in the
28 	 * main RMM process!
29 	 */
30 	pthread_t thread_id;
31 	/*
32 	 * Points to a dynamically allocated buffer that will hold a copy of the
33 	 * app instance's heap. It is used to emulate the RMM EL2 code's direct
34 	 * access to El0 app heap memory.
35 	 */
36 	void *app_heap;
37 	size_t heap_size;
38 	uint32_t exit_flag; /* App Exit Flag */
39 };
40 
41 #endif /* APP_FW_STRUCTURES_H */
42