18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 1994, 1995, 1996, 1999, 2000 by Ralf Baechle 78c2ecf20Sopenharmony_ci * Copyright (C) 1999, 2000 by Silicon Graphics 88c2ecf20Sopenharmony_ci * Copyright (C) 2002 Maciej W. Rozycki 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#include <linux/init.h> 118c2ecf20Sopenharmony_ci#include <linux/kernel.h> 128c2ecf20Sopenharmony_ci#include <linux/sched.h> 138c2ecf20Sopenharmony_ci#include <linux/sched/debug.h> 148c2ecf20Sopenharmony_ci#include <linux/sched/signal.h> 158c2ecf20Sopenharmony_ci#include <asm/traps.h> 168c2ecf20Sopenharmony_ci#include <linux/uaccess.h> 178c2ecf20Sopenharmony_ci#include <asm/addrspace.h> 188c2ecf20Sopenharmony_ci#include <asm/ptrace.h> 198c2ecf20Sopenharmony_ci#include <asm/tlbdebug.h> 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cistatic int ip32_be_handler(struct pt_regs *regs, int is_fixup) 228c2ecf20Sopenharmony_ci{ 238c2ecf20Sopenharmony_ci int data = regs->cp0_cause & 4; 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci if (is_fixup) 268c2ecf20Sopenharmony_ci return MIPS_BE_FIXUP; 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci printk("Got %cbe at 0x%lx\n", data ? 'd' : 'i', regs->cp0_epc); 298c2ecf20Sopenharmony_ci show_regs(regs); 308c2ecf20Sopenharmony_ci dump_tlb_all(); 318c2ecf20Sopenharmony_ci while(1); 328c2ecf20Sopenharmony_ci force_sig(SIGBUS); 338c2ecf20Sopenharmony_ci} 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_civoid __init ip32_be_init(void) 368c2ecf20Sopenharmony_ci{ 378c2ecf20Sopenharmony_ci board_be_handler = ip32_be_handler; 388c2ecf20Sopenharmony_ci} 39