diff options
| author | reinoud <reinoud@NetBSD.org> | 2011-09-08 15:13:27 +0000 |
|---|---|---|
| committer | reinoud <reinoud@NetBSD.org> | 2011-09-08 15:13:27 +0000 |
| commit | f8f9c5cc7d9b074eccbcb8b2e282c7d28ccc08aa (patch) | |
| tree | b6b644a79e5fde6b74d093c73968fb2f62e7a63d /sys | |
| parent | f00bd0bcde3f25b66e5fee24e393a427c191e197 (diff) | |
Use the machdep.h and now use the md_check_syscall_opcode()
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/usermode/dev/cpu.c | 6 | ||||
| -rw-r--r-- | sys/arch/usermode/usermode/trap.c | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/usermode/dev/cpu.c b/sys/arch/usermode/dev/cpu.c index b414b1b6f75..c820fa0e10c 100644 --- a/sys/arch/usermode/dev/cpu.c +++ b/sys/arch/usermode/dev/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.39 2011/09/08 14:47:17 reinoud Exp $ */ +/* $NetBSD: cpu.c,v 1.40 2011/09/08 15:13:27 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> @@ -30,7 +30,7 @@ #include "opt_hz.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.39 2011/09/08 14:47:17 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.40 2011/09/08 15:13:27 reinoud Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -48,6 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.39 2011/09/08 14:47:17 reinoud Exp $"); #include <machine/cpu.h> #include <machine/mainbus.h> #include <machine/pcb.h> +#include <machine/machdep.h> #include <machine/thunk.h> #include <uvm/uvm_extern.h> @@ -297,7 +298,6 @@ printf("return of trampoline func, switching to userland\n"); panic("%s: shouldn't return", __func__); } -extern void syscall(void); void cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize, void (*func)(void *), void *arg) diff --git a/sys/arch/usermode/usermode/trap.c b/sys/arch/usermode/usermode/trap.c index d20a8b15f10..7ebb3caaec3 100644 --- a/sys/arch/usermode/usermode/trap.c +++ b/sys/arch/usermode/usermode/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.35 2011/09/08 14:49:42 reinoud Exp $ */ +/* $NetBSD: trap.c,v 1.36 2011/09/08 15:13:27 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk <reinoud@netbsd.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.35 2011/09/08 14:49:42 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.36 2011/09/08 15:13:27 reinoud Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.35 2011/09/08 14:49:42 reinoud Exp $"); #include <machine/cpu.h> #include <machine/pcb.h> #include <machine/pmap.h> +#include <machine/machdep.h> #include <machine/thunk.h> @@ -285,10 +286,10 @@ illegal_instruction_handler(int sig, siginfo_t *info, void *ctx) memcpy(&pcb->pcb_userland_ucp, uct, sizeof(ucontext_t)); /* if its a syscall, switch to the syscall entry */ -// if (syscall_check_opcode(info->si_addr)) { + if (md_check_syscall_opcode(info->si_addr)) { thunk_setcontext(&pcb->pcb_syscall_ucp); /* NOT REACHED */ -// } + } panic("should deliver a trap to the process : illegal instruction " "encountered\n"); |
