patch-2.1.40 linux/arch/sparc64/kernel/traps.c
Next file: linux/arch/sparc64/kernel/ttable.S
Previous file: linux/arch/sparc64/kernel/sys_sparc32.c
Back to the patch index
Back to the overall index
- Lines: 74
- Date:
Sun May 18 17:10:37 1997
- Orig file:
v2.1.39/linux/arch/sparc64/kernel/traps.c
- Orig date:
Mon Apr 14 16:28:10 1997
diff -u --recursive --new-file v2.1.39/linux/arch/sparc64/kernel/traps.c linux/arch/sparc64/kernel/traps.c
@@ -1,4 +1,4 @@
-/* $Id: traps.c,v 1.5 1997/04/14 06:56:55 davem Exp $
+/* $Id: traps.c,v 1.10 1997/05/18 08:42:16 davem Exp $
* arch/sparc/kernel/traps.c
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -22,6 +22,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/unistd.h>
+#include <asm/uaccess.h>
/* #define TRAP_DEBUG */
@@ -42,6 +43,8 @@
void syscall_trace_exit(struct pt_regs *regs)
{
+ printk("Syscall return check, reg dump.\n");
+ show_regs(regs);
}
void sparc64_dtlb_fault_handler (void)
@@ -116,25 +119,45 @@
show_regs(regs);
printk("Instruction DUMP:");
instruction_dump ((unsigned int *) regs->tpc);
+ while(1)
+ barrier();
if(regs->tstate & TSTATE_PRIV)
do_exit(SIGKILL);
do_exit(SIGSEGV);
}
-void do_illegal_instruction(struct pt_regs *regs, unsigned long pc, unsigned long npc,
- unsigned long tstate)
+void do_illegal_instruction(struct pt_regs *regs)
{
+ unsigned long pc = regs->tpc;
+ unsigned long tstate = regs->tstate;
+
lock_kernel();
if(tstate & TSTATE_PRIV)
die_if_kernel("Kernel illegal instruction", regs);
-#ifdef TRAP_DEBUG
- printk("Ill instr. at pc=%016lx instruction is %08x\n",
- regs->tpc, *(unsigned int *)regs->tpc);
+#if 1
+ {
+ unsigned int insn;
+
+ printk("Ill instr. at pc=%016lx ", pc);
+ get_user(insn, ((unsigned int *)pc));
+ printk("insn=[%08x]\n", insn);
+ }
#endif
current->tss.sig_address = pc;
current->tss.sig_desc = SUBSIG_ILLINST;
send_sig(SIGILL, current, 1);
unlock_kernel();
+
+ while(1)
+ barrier();
+}
+
+void do_mna(struct pt_regs *regs)
+{
+ printk("AIEEE: do_mna at %016lx\n", regs->tpc);
+ show_regs(regs);
+ while(1)
+ barrier();
}
void do_priv_instruction(struct pt_regs *regs, unsigned long pc, unsigned long npc,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov