OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [arm/] [vegaplus/] [irq/] [bsp_irq_asm.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/* 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  
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
 
54
  mov pc, lr
55
 
56
/*
57
 * Function to acknowledge the IT controller
58
 */
59
        .globl AckControler
60
 
61
#if 0
62
AckControler:
63
  ldr   r0, =INTEOI3
64
  mov   r1, #EOI
65
  str   r1, [r0]
66
 
67
  b     ReturnFromAck           /* return to ISR handler */
68
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.