[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/37] bsd-user/arm/target_arch_cpu.h: Implement data abort except
From: |
Warner Losh |
Subject: |
[PULL 20/37] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions |
Date: |
Sat, 8 Jan 2022 00:37:20 -0700 |
Implement EXCP_PREFETCH_ABORT AND EXCP_DATA_ABORT. Both of these data
exceptions cause a SIGSEGV.
Signed-off-by: Kyle 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>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
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 9f9b380b137..905a5ffaffa 100644
--- a/bsd-user/arm/target_arch_cpu.h
+++ b/bsd-user/arm/target_arch_cpu.h
@@ -65,6 +65,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.33.1
- [PULL 11/37] bsd-user/x86_64: Move functions into signal.c, (continued)
- [PULL 11/37] bsd-user/x86_64: Move functions into signal.c, Warner Losh, 2022/01/08
- [PULL 19/37] bsd-user/arm/target_arch_cpu.h: Implement trivial EXCP exceptions, Warner Losh, 2022/01/08
- [PULL 25/37] bsd-user/arm/target_arch_thread.h: Routines to create and switch to a thread, Warner Losh, 2022/01/08
- [PULL 26/37] bsd-user/arm/target_arch_elf.h: arm defines for ELF, Warner Losh, 2022/01/08
- [PULL 27/37] bsd-user/arm/target_arch_elf.h: arm get hwcap, Warner Losh, 2022/01/08
- [PULL 05/37] bsd-user/i386/target_arch_signal.h: use new target_os_ucontext.h, Warner Losh, 2022/01/08
- [PULL 12/37] bsd-user/target_os_signal.h: Move signal prototypes to target_os_ucontext.h, Warner Losh, 2022/01/08
- [PULL 02/37] bsd-user/freebsd: Create common target_os_ucontext.h file, Warner Losh, 2022/01/08
- [PULL 07/37] bsd-user/i386: Move the inlines into signal.c, Warner Losh, 2022/01/08
- [PULL 13/37] bsd-user/arm/target_arch_sysarch.h: Use consistent include guards, Warner Losh, 2022/01/08
- [PULL 20/37] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions,
Warner Losh <=
- [PULL 09/37] bsd-user/x86_64/target_arch_signal.h: use new target_os_ucontext.h, Warner Losh, 2022/01/08
- [PULL 08/37] bsd-user/x86_64/target_arch_signal.h: Remove target_sigcontext, Warner Losh, 2022/01/08
- [PULL 14/37] bsd-user/arm/target_syscall.h: Add copyright and update name, Warner Losh, 2022/01/08
- [PULL 18/37] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation, Warner Losh, 2022/01/08
- [PULL 35/37] bsd-user/arm/signal.c: arm get_ucontext_sigreturn, Warner Losh, 2022/01/08
- [PULL 16/37] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions, Warner Losh, 2022/01/08
- [PULL 15/37] bsd-user/arm/target_arch_cpu.c: Target specific TLS routines, Warner Losh, 2022/01/08
- [PULL 21/37] bsd-user/arm/target_arch_cpu.h: Implement system call dispatch, Warner Losh, 2022/01/08
- [PULL 23/37] bsd-user/arm/target_arch_vmparam.h: Parameters for arm address space, Warner Losh, 2022/01/08
- [PULL 17/37] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs, Warner Losh, 2022/01/08