[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 17/36] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop i
From: |
Warner Losh |
Subject: |
[PATCH v4 17/36] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation |
Date: |
Thu, 4 Nov 2021 21:18:58 -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>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
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 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) {
--
2.33.0
- Re: [PATCH v4 01/36] bsd-user/mips*: Remove, (continued)
- [PATCH v4 08/36] bsd-user/x86_64/target_arch_signal.h: Remove target_sigcontext, Warner Losh, 2021/11/04
- [PATCH v4 12/36] bsd-user/arm/target_arch_sysarch.h: Use consistent include guards, Warner Losh, 2021/11/04
- [PATCH v4 10/36] bsd-user/x86_64/target_arch_signal.h: Fill in mcontext_t, Warner Losh, 2021/11/04
- [PATCH v4 17/36] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation,
Warner Losh <=
- [PATCH v4 05/36] bsd-user/i386/target_arch_signal.h: use new target_os_ucontext.h, Warner Losh, 2021/11/04
- [PATCH v4 15/36] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions, Warner Losh, 2021/11/04
- [PATCH v4 06/36] bsd-user/i386/target_arch_signal.h: Update mcontext_t to match FreeBSD, Warner Losh, 2021/11/04
- [PATCH v4 09/36] bsd-user/x86_64/target_arch_signal.h: use new target_os_ucontext.h, Warner Losh, 2021/11/04
- [PATCH v4 11/36] bsd-user/x86_64: Move functions into signal.c, Warner Losh, 2021/11/04
- [PATCH v4 18/36] bsd-user/arm/target_arch_cpu.h: Implement trivial EXCP exceptions, Warner Losh, 2021/11/04
- [PATCH v4 13/36] bsd-user/arm/target_syscall.h: Add copyright and update name, Warner Losh, 2021/11/04