source: rtems/c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_asm.S @ 359e537

4.104.11
Last change on this file since 359e537 was 359e537, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 30, 2009 at 5:09:41 AM

Whitespace removal.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * Atmel AT91RM9200 Interrupt handler
3 *
4 * Copyright (c) 2004 by Jay Monkman <jtm@lopgindog.com>
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *
12 *  $Id$
13 */
14#define __asm__
15
16        .globl bsp_interrupt_dispatch
17bsp_interrupt_dispatch :
18/*
19 * Look at interrupt status register to determine source.
20 * From source, determine offset into expanded vector table
21 * and load vector into r0 and handler address into r1.
22 */
23        ldr     r0, =0xFFFFF100   /* AIC_CTL_BASE + AIC_IVR */
24        ldr     r1, [r0]
25        str     r1, [r0]          /* write back in case we are using protect */
26
27        ldr     r0, =0xFFFFF108   /* AIC_CTL_BASE + AIC_ISR */
28        ldr     r0, [r0]          /* Read interrupt vector  */
29
30        stmdb   sp!,{lr}
31        ldr     lr, =IRQ_return   /* prepare the return from handler  */
32
33        mov     pc, r1            /* execute handler */
34
35IRQ_return:
36        ldr   r2, =0xFFFFF130     /* AIC_CTL_BASE + AIC_EIOCR */
37        str   r1, [r2]
38
39        ldmia sp!,{lr}
40
41        mov pc, lr
Note: See TracBrowser for help on using the repository browser.