Lines Matching defs:trap
1 /* $NetBSD: trap.c,v 1.159 2024/01/20 00:15:31 thorpej Exp $ */
36 * from: Utah $Hdr: trap.c 1.37 92/12/20$
38 * @(#)trap.c 8.5 (Berkeley) 1/4/94
42 __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.159 2024/01/20 00:15:31 thorpej Exp $");
72 #include <machine/trap.h>
87 void trap(struct frame *fp, int type, u_int code, u_int v);
102 "Trace trap",
104 "SSIR trap",
108 "Async system trap"
172 * trap and syscall both need the following work done before returning
200 * Deal with user mode writebacks (from trap, or from sigreturn).
233 * XXX: Temporary until all m68k ports share common trap()/userret() code.
245 * Trap is called from locore to handle most types of processor traps,
250 trap(struct frame *fp, int type, u_int code, u_int v)
278 printf("trap type %d, code = 0x%x, v = 0x%x\n", type, code, v);
282 * Let the kernel debugger see the trap frame that
300 printf("trap during panic!\n");
313 panic("trap");
394 printf("Kernel Illegal Instruction trap.\n");
396 printf("Kernel FPU trap.\n");
436 case T_CHKINST|T_USER: /* CHK instruction trap */
442 case T_TRAPVINST|T_USER: /* TRAPV instruction trap */
451 * HP-UX uses trap #1 for breakpoints,
452 * NetBSD/m68k uses trap #2,
453 * SUN 3.x uses trap #15,
454 * DDB and KGDB uses trap #15 (for kernel breakpoints;
466 printf("unexpected kernel trace trap, type = %d\n", type);
472 case T_TRACE|T_USER: /* user trace trap */
475 * SunOS uses Trap #2 for a "CPU cache flush".
485 case T_TRACE: /* tracing a trap instruction */
486 case T_TRAP15|T_USER: /* SUN user trace trap */
497 case T_ASTFLT: /* system async trap, cannot happen */
500 case T_ASTFLT|T_USER: /* user async trap */
516 * If this was not an AST trap, we are all done.
542 printf("trap: T_MMUFLT pid=%d, code=%x, v=%x, pc=%x, sr=%x\n",
567 printf("trap: bad kernel %s access at 0x%x\n",