Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 1994, 1995, 1996, 1999, 2000 by Ralf Baechle
0007  * Copyright (C) 1999, 2000 by Silicon Graphics
0008  * Copyright (C) 2002  Maciej W. Rozycki
0009  */
0010 #include <linux/init.h>
0011 #include <linux/kernel.h>
0012 #include <linux/sched.h>
0013 #include <linux/sched/debug.h>
0014 #include <linux/sched/signal.h>
0015 #include <asm/traps.h>
0016 #include <linux/uaccess.h>
0017 #include <asm/addrspace.h>
0018 #include <asm/ptrace.h>
0019 #include <asm/tlbdebug.h>
0020 
0021 static int ip32_be_handler(struct pt_regs *regs, int is_fixup)
0022 {
0023     int data = regs->cp0_cause & 4;
0024 
0025     if (is_fixup)
0026         return MIPS_BE_FIXUP;
0027 
0028     printk("Got %cbe at 0x%lx\n", data ? 'd' : 'i', regs->cp0_epc);
0029     show_regs(regs);
0030     dump_tlb_all();
0031     while(1);
0032     force_sig(SIGBUS);
0033 }
0034 
0035 void __init ip32_be_init(void)
0036 {
0037     mips_set_be_handler(ip32_be_handler);
0038 }