summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/arm/s3c2400/irq/bsp_irq_asm.S
blob: d3df84dd1173c1a760b31c8ad4233f27c1be1904 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* bsp_irq_asm.S
 *
 *  This file contains the implementation of the IRQ handler
 *  for a specific BSP
 *
 *  CopyRight (C) 2000 Canon Research France SA.
 *  Emmanuel Raguet,  mailto:raguet@crf.canon.fr
 *
 *  The license and distribution terms for this file may be
 *  found in found in the file LICENSE in this distribution or at
 *  http://www.rtems.com/license/LICENSE.
 *
 *  $Id$
 */

#define __asm__

/*
 * Function to obtain, execute an IT handler and acknowledge the IT
 */

        .globl bsp_interrupt_dispatch

bsp_interrupt_dispatch :

        ldr     r0, =0x14400014  /* Read rINTOFFSET */
        ldr     r1, [r0]

        ldr     r0, =bsp_vector_table
        ldr     r0, [r0, r1, LSL #2]    /* Read the address */

        stmdb     sp!,{lr}
        ldr     lr, =IRQ_return         /* prepare the return from handler  */

        mov pc, r0

IRQ_return:
        ldmia sp!,{lr}

        mov pc, lr