Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 1 | /* |
| 2 | * interrupt.S - trampoline default exceptions/interrupts to C handlers |
| 3 | * |
| 4 | * Copyright (c) 2005-2007 Analog Devices Inc. |
| 5 | * Licensed under the GPL-2 or later. |
| 6 | */ |
| 7 | |
Mike Frysinger | 6c50788 | 2009-08-24 20:48:04 -0400 | [diff] [blame] | 8 | #include <config.h> |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 9 | #include <asm/blackfin.h> |
| 10 | #include <asm/entry.h> |
| 11 | |
| 12 | .text |
| 13 | |
| 14 | /* default entry point for exceptions */ |
| 15 | ENTRY(_trap) |
Mike Frysinger | 6c50788 | 2009-08-24 20:48:04 -0400 | [diff] [blame] | 16 | CONFIG_BFIN_SCRATCH_REG = sp; |
| 17 | sp.l = LO(L1_SRAM_SCRATCH_END - 20); |
| 18 | sp.h = HI(L1_SRAM_SCRATCH_END - 20); |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 19 | SAVE_ALL_SYS |
| 20 | r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ |
| 21 | sp += -12; |
| 22 | call _trap_c; |
| 23 | sp += 12; |
| 24 | RESTORE_ALL_SYS |
Mike Frysinger | 6c50788 | 2009-08-24 20:48:04 -0400 | [diff] [blame] | 25 | sp = CONFIG_BFIN_SCRATCH_REG; |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 26 | rtx; |
| 27 | ENDPROC(_trap) |
| 28 | |
| 29 | /* default entry point for interrupts */ |
| 30 | ENTRY(_evt_default) |
| 31 | SAVE_ALL_SYS |
| 32 | r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ |
| 33 | sp += -12; |
| 34 | call _bfin_panic; |
| 35 | sp += 12; |
| 36 | RESTORE_ALL_SYS |
| 37 | rti; |
| 38 | ENDPROC(_evt_default) |