4.104.114.84.95
Last change
on this file since f9c74e5 was
f9c74e5,
checked in by Joel Sherrill <joel.sherrill@…>, on 07/17/02 at 17:19:04
|
2002-07-17 Jay Monkman <jtm@…>
- irq_bsp_irq_asm.S: Update to reflect irq_asm modifications.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[4564566] | 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 | |
---|
| 24 | ExecuteITHandler : |
---|
| 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 | |
---|
| 41 | IRQ_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 | |
---|
[f9c74e5] | 54 | mov pc, lr |
---|
[4564566] | 55 | |
---|
| 56 | /* |
---|
| 57 | * Function to acknowledge the IT controller |
---|
| 58 | */ |
---|
| 59 | .globl AckControler |
---|
[f9c74e5] | 60 | |
---|
| 61 | #if 0 |
---|
[4564566] | 62 | AckControler: |
---|
| 63 | ldr r0, =INTEOI3 |
---|
| 64 | mov r1, #EOI |
---|
| 65 | str r1, [r0] |
---|
| 66 | |
---|
| 67 | b ReturnFromAck /* return to ISR handler */ |
---|
[f9c74e5] | 68 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.