Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/mips/trap.c
Show First 20 Lines • Show All 781 Lines • ▼ Show 20 Lines | case T_BUS_ERR_LD_ST + T_USER: /* BERR asserted to cpu */ | ||||
addr = trapframe->pc; | addr = trapframe->pc; | ||||
if (!msg) | if (!msg) | ||||
msg = "BUS_ERR"; | msg = "BUS_ERR"; | ||||
log_bad_page_fault(msg, trapframe, type); | log_bad_page_fault(msg, trapframe, type); | ||||
break; | break; | ||||
case T_SYSCALL + T_USER: | case T_SYSCALL + T_USER: | ||||
{ | { | ||||
int error; | |||||
td->td_sa.trapframe = trapframe; | td->td_sa.trapframe = trapframe; | ||||
error = syscallenter(td); | syscallenter(td); | ||||
#if !defined(SMP) && (defined(DDB) || defined(DEBUG)) | #if !defined(SMP) && (defined(DDB) || defined(DEBUG)) | ||||
if (trp == trapdebug) | if (trp == trapdebug) | ||||
trapdebug[TRAPSIZE - 1].code = td->td_sa.code; | trapdebug[TRAPSIZE - 1].code = td->td_sa.code; | ||||
else | else | ||||
trp[-1].code = td->td_sa.code; | trp[-1].code = td->td_sa.code; | ||||
#endif | #endif | ||||
trapdebug_enter(td->td_frame, -td->td_sa.code); | trapdebug_enter(td->td_frame, -td->td_sa.code); | ||||
/* | /* | ||||
* The sync'ing of I & D caches for SYS_ptrace() is | * The sync'ing of I & D caches for SYS_ptrace() is | ||||
* done by procfs_domem() through procfs_rwmem() | * done by procfs_domem() through procfs_rwmem() | ||||
* instead of being done here under a special check | * instead of being done here under a special check | ||||
* for SYS_ptrace(). | * for SYS_ptrace(). | ||||
*/ | */ | ||||
syscallret(td, error); | syscallret(td); | ||||
return (trapframe->pc); | return (trapframe->pc); | ||||
} | } | ||||
#if defined(KDTRACE_HOOKS) || defined(DDB) | #if defined(KDTRACE_HOOKS) || defined(DDB) | ||||
case T_BREAK: | case T_BREAK: | ||||
#ifdef KDTRACE_HOOKS | #ifdef KDTRACE_HOOKS | ||||
if (!usermode && dtrace_invop_jump_addr != 0) { | if (!usermode && dtrace_invop_jump_addr != 0) { | ||||
dtrace_invop_jump_addr(trapframe); | dtrace_invop_jump_addr(trapframe); | ||||
▲ Show 20 Lines • Show All 895 Lines • Show Last 20 Lines |