diff options
author | Warner Losh | 2021-09-23 16:47:16 +0200 |
---|---|---|
committer | Warner Losh | 2022-01-08 06:58:51 +0100 |
commit | 06efe3bfce17576a829fcc7de4d271fe84ca8c9d (patch) | |
tree | 38ab6bf8d80e8041046dc1bc9dc8aa8e2bf6a8b9 /bsd-user/arm | |
parent | bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs (diff) | |
download | qemu-06efe3bfce17576a829fcc7de4d271fe84ca8c9d.tar.gz qemu-06efe3bfce17576a829fcc7de4d271fe84ca8c9d.tar.xz qemu-06efe3bfce17576a829fcc7de4d271fe84ca8c9d.zip |
bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation
Add a boiler plate CPU loop that does nothing except return an error for
all traps.
Signed-off-by: Sean Bruno <sbruno@FreeBSD.org>
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'bsd-user/arm')
-rw-r--r-- | bsd-user/arm/target_arch_cpu.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index fa45d9335d..2484bdc2f7 100644 --- a/bsd-user/arm/target_arch_cpu.h +++ b/bsd-user/arm/target_arch_cpu.h @@ -36,6 +36,28 @@ static inline void target_cpu_init(CPUARMState *env, } } +static inline void target_cpu_loop(CPUARMState *env) +{ + int trapnr; + target_siginfo_t info; + CPUState *cs = env_cpu(env); + + for (;;) { + cpu_exec_start(cs); + trapnr = cpu_exec(cs); + cpu_exec_end(cs); + process_queued_cpu_work(cs); + switch (trapnr) { + default: + fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n", + trapnr); + cpu_dump_state(cs, stderr, 0); + abort(); + } /* switch() */ + process_pending_signals(env); + } /* for (;;) */ +} + static inline void target_cpu_clone_regs(CPUARMState *env, target_ulong newsp) { if (newsp) { |