1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2014, Linaro Limited
4  * Copyright (c) 2020, Arm Limited
5  */
6 #ifndef TEE_ARCH_SVC_H
7 #define TEE_ARCH_SVC_H
8 
9 struct thread_svc_regs;
10 
11 /* Registered as .handle_svc in struct tee_ta_ops for user TAs. */
12 bool user_ta_handle_svc(struct thread_svc_regs *regs);
13 
14 /* Separate SVC handler for calls from ldelf */
15 bool ldelf_handle_svc(struct thread_svc_regs *regs);
16 
17 /*
18  * Called from the assembly functions syscall_sys_return() and
19  * syscall_panic() to update the register values in the struct
20  * thread_svc_regs to return back to TEE Core from an erlier call to
21  * thread_enter_user_mode().
22  */
23 uint32_t tee_svc_sys_return_helper(uint32_t ret, bool panic,
24 				   uint32_t panic_code,
25 				   struct thread_svc_regs *regs);
26 
27 #endif /*TEE_ARCH_SVC_H*/
28