source: rtems/c/src/lib/libbsp/arm/vegaplus/irq/bsp_irq_asm.S @ 7cc96f5

4.104.114.84.95
Last change on this file since 7cc96f5 was 4564566, checked in by Joel Sherrill <joel.sherrill@…>, on 09/13/00 at 13:45:05

2000-09-13 Emmanuel Raguet <raguet@…>

  • vegaplus BSP submitted by Emmanuel Raguet <raguet@…> and Eric Valette <valette@…>.
  • 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.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/* bsp_irq_asm.S
2 *
3 *  This file contains the implementation of the IRQ handler
4 *  for a specific BSP
5 *
6 *  CopyRight (C) 2000 Canon Research France SA.
7 *  Emmanuel Raguet,  mailto:raguet@crf.canon.fr
8 *
9 *  The license and distribution terms for this file may be
10 *  found in found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 */
14
15#define __asm__
16#include  <registers.h>
17               
18/*
19 * Function to obtain, execute an IT handler and acknowledge the IT
20 */
21
22        .globl ExecuteITHandler
23       
24ExecuteITHandler :     
25  ldr   r0, =INTPHAI3            /* read the vector number */
26  ldr   r0, [r0]       
27  ldr   r0, [r0]                /* extract the IT handler @ */
28
29  /*
30   * re-enable interrupts at processor level as the current
31   * interrupt source is now masked via VEGA logic
32   */
33  mrs   r1, cpsr
34  and   r1, r1, #0xFFFFFF3F
35  msr   cpsr, r1
36
37  stmdb   sp!,{lr}
38  ldr     lr, =IRQ_return         /* prepare the return from handler  */
39  mov     pc, r0                        /* EXECUTE INT HANDLER */
40
41IRQ_return:
42  ldmia sp!,{lr}
43  ldr   r2, =INTSTAT3           /* Ack the interrupt */
44  ldr   r2, [r2]
45  ldr   r1, =INTACK3
46  str   r2, [r1]
47  /*
48   * disable interrupts_again and switch back to SVC mode
49   */
50  mrs   r0, cpsr
51  orr   r0, r0, #0xc3
52  msr   cpsr, r0
53
54  b     ReturnFromHandler       /* return to ISR handler */
55       
56/*
57 * Function to acknowledge the IT controller
58 */
59        .globl AckControler
60       
61AckControler:     
62  ldr   r0, =INTEOI3
63  mov   r1, #EOI
64  str   r1, [r0]
65
66  b     ReturnFromAck           /* return to ISR handler */
67
Note: See TracBrowser for help on using the repository browser.