// SPDX-License-Identifier: GPL-2.01/***************************************************************************/23/*4* vectors.c -- high level trap setup for ColdFire5*6* Copyright (C) 1999-2007, Greg Ungerer <[email protected]>7*/89/***************************************************************************/1011#include <linux/kernel.h>12#include <linux/init.h>13#include <linux/irq.h>14#include <linux/cpu.h>15#include <asm/traps.h>16#include <asm/machdep.h>17#include <asm/coldfire.h>18#include <asm/mcfsim.h>19#include <asm/mcfwdebug.h>2021/***************************************************************************/2223#ifdef TRAP_DBG_INTERRUPT2425asmlinkage void dbginterrupt_c(struct frame *fp)26{27extern void dump(struct pt_regs *fp);28printk(KERN_DEBUG "%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__);29dump((struct pt_regs *) fp);30asm("halt");31}3233#endif3435/***************************************************************************/3637/* Assembler routines */38asmlinkage void buserr(void);39asmlinkage void trap(void);40asmlinkage void system_call(void);41asmlinkage void inthandler(void);4243void __init trap_init(void)44{45int i;4647/*48* There is a common trap handler and common interrupt49* handler that handle almost every vector. We treat50* the system call and bus error special, they get their51* own first level handlers.52*/53for (i = 3; (i <= 23); i++)54_ramvec[i] = trap;55for (i = 33; (i <= 63); i++)56_ramvec[i] = trap;57for (i = 24; (i <= 31); i++)58_ramvec[i] = inthandler;59for (i = 64; (i < 255); i++)60_ramvec[i] = inthandler;61_ramvec[255] = 0;6263_ramvec[2] = buserr;64_ramvec[32] = system_call;6566#ifdef TRAP_DBG_INTERRUPT67_ramvec[12] = dbginterrupt;68#endif69}7071/***************************************************************************/727374