On Tue, Oct 19, 2021 at 11:45 AM Warner Losh <i...@bsdimp.com> wrote: > > Implement EXCP_PREFETCH_ABORT AND EXCP_DATA_ABORT. Both of these data > exceptions cause a SIGSEGV. > > Signed-off-by: Klye Evans <kev...@freebsd.org> > Signed-off-by: Olivier Houchard <cog...@ci0.org> > Signed-off-by: Stacey Son <s...@freebsd.org> > Signed-off-by: Warner Losh <i...@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 >
Reviewed-by: Kyle Evans <kev...@freebsd.org>