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 BSD_USER_ARCH_SYSARCH_H_
21 #define BSD_USER_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
,
32 case TARGET_FREEBSD_ARM_SYNC_ICACHE
:
33 case TARGET_FREEBSD_ARM_DRAIN_WRITEBUF
:
36 case TARGET_FREEBSD_ARM_SET_TP
:
37 target_cpu_set_tls(env
, parms
);
40 case TARGET_FREEBSD_ARM_GET_TP
:
41 ret
= target_cpu_get_tls(env
);
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
)
57 case TARGET_FREEBSD_ARM_SYNC_ICACHE
:
58 gemu_log("%s(ARM_SYNC_ICACHE, ...)", name
->name
);
61 case TARGET_FREEBSD_ARM_DRAIN_WRITEBUF
:
62 gemu_log("%s(ARM_DRAIN_WRITEBUF, ...)", name
->name
);
65 case TARGET_FREEBSD_ARM_SET_TP
:
66 gemu_log("%s(ARM_SET_TP, 0x" TARGET_ABI_FMT_lx
")", name
->name
, arg2
);
69 case TARGET_FREEBSD_ARM_GET_TP
:
70 gemu_log("%s(ARM_GET_TP, 0x" TARGET_ABI_FMT_lx
")", name
->name
, arg2
);
74 gemu_log("UNKNOWN OP: %d, " TARGET_ABI_FMT_lx
")", (int)arg1
, arg2
);
78 #endif /*!BSD_USER_ARCH_SYSARCH_H_ */