1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
4  */
5 
6 #ifndef RSI_HOST_CALL_H
7 #define RSI_HOST_CALL_H
8 
9 #include <rsi-walk.h>
10 #include <smc-rmi.h>
11 
12 struct rmi_rec_entry;
13 struct rmi_rec_exit;
14 
15 struct rsi_host_call_result {
16 	/*
17 	 * Result of RTT walk performed by RSI command.
18 	 */
19 	struct rsi_walk_result walk_result;
20 
21 	/*
22 	 * If @walk_result.abort is false,
23 	 * @smc_result contains X0 value to be returned to the Realm.
24 	 */
25 	unsigned long smc_result;
26 };
27 
28 struct rsi_host_call_result handle_rsi_host_call(struct rec *rec,
29 						 struct rmi_rec_exit *rec_exit);
30 
31 struct rsi_walk_result complete_rsi_host_call(struct rec *rec,
32 					      struct rmi_rec_entry *rec_entry);
33 
34 #endif /* RSI_HOST_CALL_H */
35