Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/mips/trap.c
Show First 20 Lines • Show All 678 Lines • ▼ Show 20 Lines | kernel_fault: | ||||
/* | /* | ||||
* It is an error for the kernel to access user space except | * It is an error for the kernel to access user space except | ||||
* through the copyin/copyout routines. | * through the copyin/copyout routines. | ||||
*/ | */ | ||||
if (td->td_pcb->pcb_onfault == NULL) | if (td->td_pcb->pcb_onfault == NULL) | ||||
goto err; | goto err; | ||||
/* check for fuswintr() or suswintr() getting a page fault */ | |||||
/* XXX There must be a nicer way to do this. */ | |||||
if (td->td_pcb->pcb_onfault == fswintrberr) { | |||||
pc = (register_t)(intptr_t)td->td_pcb->pcb_onfault; | |||||
td->td_pcb->pcb_onfault = NULL; | |||||
return (pc); | |||||
} | |||||
goto dofault; | goto dofault; | ||||
case T_TLB_LD_MISS + T_USER: | case T_TLB_LD_MISS + T_USER: | ||||
ftype = VM_PROT_READ; | ftype = VM_PROT_READ; | ||||
goto dofault; | goto dofault; | ||||
case T_TLB_ST_MISS + T_USER: | case T_TLB_ST_MISS + T_USER: | ||||
ftype = VM_PROT_WRITE; | ftype = VM_PROT_WRITE; | ||||
▲ Show 20 Lines • Show All 1,012 Lines • Show Last 20 Lines |