File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 2
2
#define _TIMERANDIRQ_H_
3
3
extern void timer_init ();
4
4
extern void enable_irq ();
5
+ extern void disable_irq ();
5
6
#endif
Original file line number Diff line number Diff line change 1
1
#include<entry.h>
2
2
3
+ .macro CLI
4
+ msr daifset , # 2 //close interrupt
5
+ .endm
6
+
7
+ .macro STI
8
+ msr daifclr , # 2 //open interrupt
9
+ .endm
10
+
3
11
.macro handler label
4
12
. align 7
5
13
b \label
@@ -43,10 +51,11 @@ b \label
43
51
ldp x28 , x29 , [ sp , # 16 * 14 ]
44
52
ldr x30 , [ sp , # 16 * 15 ]
45
53
add sp , sp , 256
46
- eret
47
54
.endm
48
55
56
+
49
57
.macro unimplement_entry type
58
+ CLI
50
59
saveall
51
60
mov x0 , #\type
52
61
mrs x1 , esr_el1
@@ -56,6 +65,7 @@ bl unimplement_handler
56
65
//exception vectors
57
66
. align 11
58
67
. global vectors
68
+
59
69
vectors:
60
70
handler sync_invalid_el1t // Synchronous EL1t
61
71
handler irq_invalid_el1t // IRQ EL1t
@@ -123,10 +133,13 @@ error_invalid_el0_32:
123
133
unimplement_entry ERROR_INVALID_EL0_32
124
134
125
135
el1_irq:
136
+ CLI
126
137
saveall
127
138
bl handle_irq
128
139
restore
129
-
140
+ STI
141
+ eret
142
+
130
143
.globl irq_vector_init
131
144
. extern vectors
132
145
irq_vector_init:
You can’t perform that action at this time.
0 commit comments