Lines Matching defs:ssp
113 struct savearea *ssp,
118 static void handleMck(struct savearea *ssp); /* Common machine check handler */
127 struct savearea *ssp,
148 perfASTHook(trapno, ssp, dsisr, (unsigned int)dar);
155 if(perfTrapHook(trapno, ssp, dsisr, (unsigned int)dar) == KERN_SUCCESS) return ssp; /* If it succeeds, we are done... */
160 if(tempDTraceTrapHook(trapno, ssp, dsisr, (unsigned int)dar) == KERN_SUCCESS) return ssp; /* If it succeeds, we are done... */
179 intr = (ssp->save_srr1 & MASK(MSR_EE)) != 0; /* Remember if we were enabled */
183 if (!USER_MODE(ssp->save_srr1)) {
194 perfmon_handle_pmi(ssp);
198 if (!Call_Debugger(trapno, ssp))
199 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
219 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
228 handleMck(ssp); /* Common to both user and kernel */
240 if(ssp->save_hdr.save_misc3) { /* Was it a handled exception? */
241 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL); /* Go panic */
246 (int)ssp->save_srr0 - 4, (int)dar, (int)dsisr, (int)ssp->save_lr, 0);
259 (int)ssp->save_srr0 - 4, (int)((savearea_comm *)ssp)->save_misc2, (int)dsisr, (int)ssp->save_lr, 0);
269 if (!Call_Debugger(trapno, ssp))
270 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
274 if (ssp->save_srr1 & MASK(SRR1_PRG_TRAP)) {
275 if (!Call_Debugger(trapno, ssp))
276 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
278 unresolved_kernel_trap(trapno, ssp,
292 kdb_trap(trapno, ssp);
303 kdp_dump_trap(trapno, ssp);
307 if(ssp->save_dsisr & dsiInvMode) { /* Did someone try to reserve cache inhibited? */
325 ssp->save_srr0 += 4; /* Point to next instruction */
332 ssp->save_srr0 += 4; /* Point to next instruction */
335 unresolved_kernel_trap(trapno, ssp, dsisr, dar, "Unexpected page fault under dtrace_probe");
345 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
347 ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
348 ssp->save_dsisr = (ssp->save_dsisr &
360 ssp->save_srr0 = thread->recover;
363 unresolved_kernel_trap(trapno, ssp, dsisr, dar, "copyin/out has no recovery point");
367 unresolved_kernel_trap(trapno, ssp, dsisr, dar, "Unexpected UMW page fault under dtrace_probe");
385 ssp->save_srr0 = thread->recover;
388 unresolved_kernel_trap(trapno, ssp, dsisr, dar, "copyin/out has no recovery point");
392 ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
393 ssp->save_dsisr = (ssp->save_dsisr &
408 kdb_trap(trapno, ssp);
420 code = vm_fault(map, vm_map_trunc_page(ssp->save_srr0),
424 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
426 ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
427 ssp->save_srr1 = (ssp->save_srr1 &
438 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
442 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
468 unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
472 perfmon_handle_pmi(ssp);
494 cpu_number(), trapno, dsisr, dar, ssp->save_srr0, ssp->save_srr1);
503 handleMck(ssp); /* Common to both user and kernel */
508 if (!Call_Debugger(trapno, ssp))
510 ssp->save_srr0, ssp->save_srr1);
523 (int)ssp->save_srr0 - 4, (int)dar, (int)dsisr, (int)ssp->save_lr, 0);
525 if(ssp->save_hdr.save_misc3) { /* Was it a handled exception? */
542 (int)ssp->save_srr0 - 4, (int)((savearea_comm *)ssp)->save_misc2, (int)dsisr, (int)ssp->save_lr, 0);
549 subcode = ssp->save_srr0;
553 if (ssp->save_srr1 & MASK(SRR1_PRG_FE)) {
560 subcode = ssp->save_fpscr;
563 else if (ssp->save_srr1 & MASK(SRR1_PRG_ILL_INS)) {
568 subcode = ssp->save_srr0;
569 } else if ((unsigned int)ssp->save_srr1 & MASK(SRR1_PRG_PRV_INS)) {
574 subcode = ssp->save_srr0;
575 } else if (ssp->save_srr1 & MASK(SRR1_PRG_TRAP)) {
578 if (copyin(ssp->save_srr0, (char *) &inst, 4 )) panic("copyin failed\n");
582 if(diagTrap(ssp, inst & 0xF)) { /* Call the trap code */
583 ssp->save_srr0 += 4ULL; /* If we eat the trap, bump pc */
592 ret = dtrace_user_probe((ppc_saved_state_t *)ssp); /* Go check if it is for real and process if so... */
609 subcode = ssp->save_srr0;
615 ret = dtrace_user_probe((ppc_saved_state_t *)ssp); /* Call the probe function if so... */
627 subcode = ssp->save_srr0;
633 if(ssp->save_dsisr & dsiInvMode) { /* Did someone try to reserve cache inhibited? */
649 ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to retry fault */
650 ssp->save_dsisr = (ssp->save_dsisr &
661 code = vm_fault(map, vm_map_trunc_page(ssp->save_srr0),
667 subcode = ssp->save_srr0;
669 ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
670 ssp->save_srr1 = (ssp->save_srr1 &
683 bsd_uprofil(&tv, ssp->save_srr0);
707 buf += sprintf(buf, " %08x",*(&ssp->save_r0+i));
711 buf += sprintf(buf, "cr = 0x%08X\t\t",ssp->save_cr);
712 buf += sprintf(buf, "xer = 0x%08X\n",ssp->save_xer);
713 buf += sprintf(buf, "lr = 0x%016llX\t\t",ssp->save_lr);
714 buf += sprintf(buf, "ctr = 0x%016llX\n",ssp->save_ctr);
715 buf += sprintf(buf, "srr0(iar) = 0x%016llX\t\t",ssp->save_srr0);
716 buf += sprintf(buf, "srr1(msr) = 0x%016llX\n",ssp->save_srr1,
723 if (ssp->save_srr1 & MASK(MSR_PR)) {
724 char *addr = (char*)ssp->save_r1;
729 if (!copyin(ssp->save_r1,(char*)stack_buf,
749 if (USER_MODE(ssp->save_srr1)) {
758 return ssp;
770 int syscall_trace(int retval, struct savearea *ssp)
780 argc = mach_trap_table[-((unsigned int)ssp->save_r0)].mach_trap_arg_count;
786 kdarg[i] = (int)*(&ssp->save_r3 + i);
788 KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_SC, (-(ssp->save_r0))) | DBG_FUNC_START,
800 int syscall_trace_end(int retval, struct savearea *ssp)
802 KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_SC,(-((unsigned int)ssp->save_r0))) | DBG_FUNC_END,
815 struct savearea *ssp)
824 if (!USER_MODE(ssp->save_srr1))
890 struct savearea *ssp,
903 kprintf(" srr0: %016llX\n", ssp->save_srr0); /* (TEST/DEBUG) */
904 kprintf(" srr1: %016llX\n", ssp->save_srr1); /* (TEST/DEBUG) */
905 kprintf(" dar: %016llX\n", ssp->save_dar); /* (TEST/DEBUG) */
906 kprintf(" xcp: %08X\n", ssp->save_exception); /* (TEST/DEBUG) */
907 kprintf(" ins0: %08X\n", ssp->save_instr[0]); /* (TEST/DEBUG) */
908 kprintf(" ins1: %08X\n", ssp->save_instr[1]); /* (TEST/DEBUG) */
909 kprintf(" ins2: %08X\n", ssp->save_instr[2]); /* (TEST/DEBUG) */
910 kprintf(" ins3: %08X\n", ssp->save_instr[3]); /* (TEST/DEBUG) */
911 kprintf(" ins4: %08X\n", ssp->save_instr[4]); /* (TEST/DEBUG) */
912 kprintf(" ins5: %08X\n", ssp->save_instr[5]); /* (TEST/DEBUG) */
913 kprintf(" ins6: %08X\n", ssp->save_instr[6]); /* (TEST/DEBUG) */
914 kprintf(" ins7: %08X\n", ssp->save_instr[7]); /* (TEST/DEBUG) */
932 cpu_number(), trap_name, dar, ssp->save_srr0);
934 print_backtrace(ssp);
952 (void)Call_Debugger(trapno, ssp);
958 void handleMck(struct savearea *ssp) { /* Common machine check handler */
965 cpu, corr[ssp->save_hdr.save_misc3], ssp->save_srr0, ssp->save_srr1, ssp->save_dsisr, ssp->save_dar); /* Tell us about it */
966 printf("Machine check (%d) - AsyncSrc = %016llX, CoreFIR = %016llx\n", cpu, ssp->save_xdat0, ssp->save_xdat1);
967 printf("Machine check (%d) - L2FIR = %016llX, BusFir = %016llx\n", cpu, ssp->save_xdat2, ssp->save_xdat3);
969 if(ssp->save_hdr.save_misc3) return; /* Leave the the machine check was recovered */
974 ssp->save_srr0, ssp->save_srr1, ssp->save_dsisr, ssp->save_dar,
975 ssp->save_xdat0, ssp->save_xdat1, ssp->save_xdat2, ssp->save_xdat3);