diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-09-13 13:45:05 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-09-13 13:45:05 +0000 |
commit | 456456632d24d9a7ca068d9f8f93f3c50f93e705 (patch) | |
tree | b1bead1e51711bee065a6eb802f5af762059d141 /c/src/lib/libbsp/arm/vegaplus/irq/bsp_irq_asm.S | |
parent | 2000-09-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-456456632d24d9a7ca068d9f8f93f3c50f93e705.tar.bz2 |
2000-09-13 Emmanuel Raguet <raguet@crf.canon.fr>
* vegaplus BSP submitted by Emmanuel Raguet <raguet@crf.canon.fr> and
Eric Valette <valette@crf.canon.fr>.
* vegaplus/bsp_specs, configure.in, console/Makefile.am,
include/Makefile.am, include/bsp.h, include/registers.h,
irq/Makefile.am, irq/bsp_irq_asm.S, irq/bsp_irq_init.c, irq/irq.c,
irq/irq.h, start/Makefile.am, start/start.S, startup/Makefile.am,
startup/bspstart.c, startup/exit.c, startup/linkcmds,
wrapup/Makefile.am: New files.
Diffstat (limited to 'c/src/lib/libbsp/arm/vegaplus/irq/bsp_irq_asm.S')
-rw-r--r-- | c/src/lib/libbsp/arm/vegaplus/irq/bsp_irq_asm.S | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/vegaplus/irq/bsp_irq_asm.S b/c/src/lib/libbsp/arm/vegaplus/irq/bsp_irq_asm.S new file mode 100644 index 0000000000..7436c3d8fe --- /dev/null +++ b/c/src/lib/libbsp/arm/vegaplus/irq/bsp_irq_asm.S @@ -0,0 +1,67 @@ +/* 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.OARcorp.com/rtems/license.html. + * + */ + +#define __asm__ +#include <registers.h> + +/* + * Function to obtain, execute an IT handler and acknowledge the IT + */ + + .globl ExecuteITHandler + +ExecuteITHandler : + ldr r0, =INTPHAI3 /* read the vector number */ + ldr r0, [r0] + ldr r0, [r0] /* extract the IT handler @ */ + + /* + * re-enable interrupts at processor level as the current + * interrupt source is now masked via VEGA logic + */ + mrs r1, cpsr + and r1, r1, #0xFFFFFF3F + msr cpsr, r1 + + stmdb sp!,{lr} + ldr lr, =IRQ_return /* prepare the return from handler */ + mov pc, r0 /* EXECUTE INT HANDLER */ + +IRQ_return: + ldmia sp!,{lr} + ldr r2, =INTSTAT3 /* Ack the interrupt */ + ldr r2, [r2] + ldr r1, =INTACK3 + str r2, [r1] + /* + * disable interrupts_again and switch back to SVC mode + */ + mrs r0, cpsr + orr r0, r0, #0xc3 + msr cpsr, r0 + + b ReturnFromHandler /* return to ISR handler */ + +/* + * Function to acknowledge the IT controller + */ + .globl AckControler + +AckControler: + ldr r0, =INTEOI3 + mov r1, #EOI + str r1, [r0] + + b ReturnFromAck /* return to ISR handler */ + |