[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/24] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop impl
From: |
Warner Losh |
Subject: |
[PATCH 06/24] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation |
Date: |
Tue, 19 Oct 2021 10:44:29 -0600 |
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>
---
bsd-user/arm/target_arch_cpu.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h
index c71ec000b3..94c9109c3f 100644
--- a/bsd-user/arm/target_arch_cpu.h
+++ b/bsd-user/arm/target_arch_cpu.h
@@ -35,6 +35,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) {
--
2.32.0
- Re: [PATCH 08/24] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions, (continued)
- [PATCH 09/24] bsd-user/arm/target_arch_cpu.h: Implement system call dispatch, Warner Losh, 2021/10/19
- [PATCH 12/24] bsd-user/arm/target_arch_sigtramp.h: Signal Trampoline for arm, Warner Losh, 2021/10/19
- [PATCH 06/24] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation,
Warner Losh <=
- [PATCH 10/24] bsd-user/arm/target_arch_reg.h: Implement core dump register copying, Warner Losh, 2021/10/19
- [PATCH 11/24] bsd-user/arm/target_arch_vmparam.h: Parameters for arm address space, Warner Losh, 2021/10/19
- [PATCH 13/24] bsd-user/arm/target_arch_thread.h: Routines to create and switch to a thread, Warner Losh, 2021/10/19