blob: 71e0fc67088fb4323628ad0f1bca41fe7f59ecac [file] [log] [blame]
Mike Frysinger9171fc82008-03-30 15:46:13 -04001/*
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 Frysinger6c507882009-08-24 20:48:04 -04008#include <config.h>
Mike Frysinger9171fc82008-03-30 15:46:13 -04009#include <asm/blackfin.h>
10#include <asm/entry.h>
11
12.text
13
14/* default entry point for exceptions */
15ENTRY(_trap)
Mike Frysinger6c507882009-08-24 20:48:04 -040016 CONFIG_BFIN_SCRATCH_REG = sp;
17 sp.l = LO(L1_SRAM_SCRATCH_END - 20);
18 sp.h = HI(L1_SRAM_SCRATCH_END - 20);
Mike Frysinger9171fc82008-03-30 15:46:13 -040019 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 Frysinger6c507882009-08-24 20:48:04 -040025 sp = CONFIG_BFIN_SCRATCH_REG;
Mike Frysinger9171fc82008-03-30 15:46:13 -040026 rtx;
27ENDPROC(_trap)
28
29/* default entry point for interrupts */
30ENTRY(_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;
38ENDPROC(_evt_default)