qapi: Require boxed for conditional command and event arguments
[qemu/armbru.git] / bsd-user / arm / target_arch_sysarch.h
blob5cb7864197d3ca0caf28938d6c6ef01af71acf05
1 /*
2 * arm sysarch() system call emulation
4 * Copyright (c) 2013 Stacey D. Son
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef TARGET_ARCH_SYSARCH_H
21 #define TARGET_ARCH_SYSARCH_H
23 #include "target_syscall.h"
24 #include "target_arch.h"
26 static inline abi_long do_freebsd_arch_sysarch(CPUARMState *env, int op,
27 abi_ulong parms)
29 int ret = 0;
31 switch (op) {
32 case TARGET_FREEBSD_ARM_SYNC_ICACHE:
33 case TARGET_FREEBSD_ARM_DRAIN_WRITEBUF:
34 break;
36 case TARGET_FREEBSD_ARM_SET_TP:
37 target_cpu_set_tls(env, parms);
38 break;
40 case TARGET_FREEBSD_ARM_GET_TP:
41 ret = target_cpu_get_tls(env);
42 break;
44 default:
45 ret = -TARGET_EINVAL;
46 break;
48 return ret;
51 static inline void do_freebsd_arch_print_sysarch(
52 const struct syscallname *name, abi_long arg1, abi_long arg2,
53 abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6)
56 switch (arg1) {
57 case TARGET_FREEBSD_ARM_SYNC_ICACHE:
58 gemu_log("%s(ARM_SYNC_ICACHE, ...)", name->name);
59 break;
61 case TARGET_FREEBSD_ARM_DRAIN_WRITEBUF:
62 gemu_log("%s(ARM_DRAIN_WRITEBUF, ...)", name->name);
63 break;
65 case TARGET_FREEBSD_ARM_SET_TP:
66 gemu_log("%s(ARM_SET_TP, 0x" TARGET_ABI_FMT_lx ")", name->name, arg2);
67 break;
69 case TARGET_FREEBSD_ARM_GET_TP:
70 gemu_log("%s(ARM_GET_TP, 0x" TARGET_ABI_FMT_lx ")", name->name, arg2);
71 break;
73 default:
74 gemu_log("UNKNOWN OP: %d, " TARGET_ABI_FMT_lx ")", (int)arg1, arg2);
78 #endif /* TARGET_ARCH_SYSARCH_H */