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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [armnommu/] [lib/] [irqs-ebsa.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/*
2
 * linux/arch/arm/lib/irqs.S
3
 *
4
 * Copyright (C) 1995, 1996 Russell King. (rmk@ecs.soton.ac.uk)
5
 *
6
 * Interrupt wrappers - handles disabling & re-enabling interrupts
7
 */
8
 
9
#include 
10
 
11
@ IRQ stubs
12
 
13
@ IRQ stubs entered with:
14
@ r0 = IRQ number
15
@ r1 = regs
16
@ r4 = IRQ_MSKD         (only for CTB_OS)
17
@ return 0 for normal irq
18
 
19
                .text
20
/*
21
 * Disable interrupt & print a message
22
 */
23
LC0:            .long   _intr_count
24
 
25
                .globl  _bad_IRQ_interrupt
26
_bad_IRQ_interrupt:
27
                mov     r9, lr
28
                mov     r5, #1
29
                mov     r5, r5, lsl r0
30
                strb    r5, [r4]
31
                bl      _bad_IRQ
32
                mov     r0, #0
33
                mov     pc, r9
34
 
35
                .globl  _fast_IRQ_interrupt
36
_fast_IRQ_interrupt:
37
                mov     r9, lr
38
                mov     r5, #1
39
                mov     r5, r5, lsl r0
40
                strb    r5, [r4]
41
                ldr     r6, LC0
42
                ldr     r7, [r6]
43
                add     r2, r7, #1
44
                str     r2, [r6]
45
                bl      _do_IRQ
46
                mrs     r2, cpsr
47
                orr     r2, r2, #I_BIT
48
                msr     cpsr, r2
49
                str     r7, [r6]
50
                sub     r4, r4, #0x400000
51
                strb    r5, [r4]
52
                mov     r0, #1
53
                mov     pc, r9
54
 
55
                .globl  _IRQ_interrupt
56
_IRQ_interrupt:
57
                mov     r9, lr
58
                mov     r5, #1
59
                mov     r5, r5, lsl r0
60
                strb    r5, [r4]                        @ Disable interrupt source
61
                ldr     r6, LC0
62
                ldr     r7, [r6]
63
                add     r2, r7, #1
64
                str     r2, [r6]
65
                mrs     r8, cpsr                        @ Enable interrupts
66
                bic     r2, r8, #I_BIT
67
                msr     cpsr, r2
68
                bl      _do_IRQ
69
                msr     cpsr, r8                        @ Restore interrupts
70
                str     r7, [r6]
71
                sub     r4, r4, #0x400000
72
                strb    r5, [r4]                        @ Re-enable interrupt source
73
                mov     r0, #0
74
                mov     pc, r9
75
 
76
                .globl  _timer_IRQ_interrupt
77
_timer_IRQ_interrupt:
78
                mov     r9, lr
79
                mov     r5, #1
80
                mov     r5, r5, lsl r0
81
                strb    r5, [r4]                        @ Disable interrupt source
82
                ldr     r6, LC0
83
                ldr     r7, [r6]
84
                add     r2, r7, #1
85
                str     r2, [r6]
86
                mrs     r8, cpsr
87
                bl      _do_IRQ
88
                msr     cpsr, r8                        @ Restore interrupts
89
                str     r7, [r6]
90
                sub     r4, r4, #0x400000
91
                strb    r5, [r4]                        @ Re-enable interrupt source
92
                mov     r0, #0
93
                mov     pc, r9
94
 
95
                .globl  _probe_IRQ_interrupt
96
_probe_IRQ_interrupt:
97
                mov     r9, lr
98
                mov     r5, #1
99
                mov     r5, r5, lsl r0
100
                add     r6, r4, #0x400000
101
                strb    r5, [r6]
102
                ldr     r6, LC0+4
103
                ldrb    r4, [r6]
104
                bic     r4, r4, r5
105
                strb    r4, [r6]
106
                mov     pc, r9
107
 
108
                .global _bad_IRQ
109
_bad_IRQ:       mov     r1, r0
110
                adr     r0, Lmsg
111
                b       _printk
112
 
113
Lmsg:           .ascii  "Bad interrupt %d received!\n\0"
114
                .align

powered by: WebSVN 2.1.0

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