[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/24] bsd-user/arm/target_arch_cpu.h: Implement data abort excep
From: |
Warner Losh |
Subject: |
[PATCH 08/24] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions |
Date: |
Tue, 19 Oct 2021 10:44:31 -0600 |
Implement EXCP_PREFETCH_ABORT AND EXCP_DATA_ABORT. Both of these data
exceptions cause a SIGSEGV.
Signed-off-by: Klye Evans <kevans@FreeBSD.org>
Signed-off-by: Olivier Houchard <cognet@ci0.org>
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/arm/target_arch_cpu.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h
index f22384676a..62d6ee89b6 100644
--- a/bsd-user/arm/target_arch_cpu.h
+++ b/bsd-user/arm/target_arch_cpu.h
@@ -60,6 +60,17 @@ static inline void target_cpu_loop(CPUARMState *env)
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
break;
+ case EXCP_PREFETCH_ABORT:
+ /* See arm/arm/trap.c prefetch_abort_handler() */
+ case EXCP_DATA_ABORT:
+ /* See arm/arm/trap.c data_abort_handler() */
+ info.si_signo = TARGET_SIGSEGV;
+ info.si_errno = 0;
+ /* XXX: check env->error_code */
+ info.si_code = 0;
+ info.si_addr = env->exception.vaddress;
+ queue_signal(env, info.si_signo, &info);
+ break;
case EXCP_DEBUG:
{
--
2.32.0
- Re: [PATCH 04/24] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions, (continued)
- [PATCH 01/24] bsd-user/arm/target_arch_sysarch.h: Use consistent include guards, Warner Losh, 2021/10/19
- [PATCH 05/24] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs, Warner Losh, 2021/10/19
- [PATCH 07/24] bsd-user/arm/target_arch_cpu.h: Implment trivial EXCP exceptions, Warner Losh, 2021/10/19
- [PATCH 08/24] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions,
Warner Losh <=
- [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