aboutsummaryrefslogtreecommitdiff
path: root/interrupt_vector.S
diff options
context:
space:
mode:
authorvetch <vetch97@gmail.com>2020-01-02 17:49:42 +0100
committervetch <vetch97@gmail.com>2020-01-02 17:49:42 +0100
commit8d08aa3662ed44ef2f4b35b1e79f44adaf3229c9 (patch)
treeb803375047e56d8b9b0669e032a88edb18ff9d99 /interrupt_vector.S
parent5cb10bcc7d0c6d4159103f05ba228a09ca365fac (diff)
downloadrpi-MMU-example-8d08aa3662ed44ef2f4b35b1e79f44adaf3229c9.tar.gz
rpi-MMU-example-8d08aa3662ed44ef2f4b35b1e79f44adaf3229c9.zip
update, may not work now
Diffstat (limited to 'interrupt_vector.S')
-rw-r--r--interrupt_vector.S44
1 files changed, 37 insertions, 7 deletions
diff --git a/interrupt_vector.S b/interrupt_vector.S
index f71330b..3daef05 100644
--- a/interrupt_vector.S
+++ b/interrupt_vector.S
@@ -1,16 +1,42 @@
.section ".interrupt_vectors.text"
.global abort_handler
+.global irq_handler
.local generic_handler
.global _interrupt_vectors
+
_interrupt_vectors:
- b generic_handler
- b generic_handler
- b generic_handler
- b abort_handler_caller
- b abort_handler_caller
- b generic_handler
- b generic_handler
+ ldr pc,reset_handler
+ ldr pc,undefined_handler
+ ldr pc,swi_handler
+ ldr pc,prefetch_handler
+ ldr pc,data_handler
+ ldr pc,unused_handler
+ ldr pc,irq_handler_caller
+ ldr pc,fiq_handler
+ reset_handler: .word abort
+ undefined_handler: .word abort
+ swi_handler: .word abort
+ prefetch_handler: .word abort
+ data_handler: .word abort
+ unused_handler: .word abort
+ irq_handler_caller: .word irq
+ fiq_handler: .word abort
+ //b abort_handler_caller
+ //b abort_handler_caller
+ //b abort_handler_caller
+ //b abort_handler_caller
+ //b abort_handler_caller
+ //b abort_handler_caller
+ //b abort_handler_caller
+
+
+.globl enable_irq
+enable_irq:
+ mrs r0,cpsr
+ bic r0,r0,#0x80
+ msr cpsr_c,r0
+ bx lr
generic_handler:
b generic_handler
@@ -18,3 +44,7 @@ abort_handler_caller:
mov sp, #0x8000
ldr r5, =abort_handler
bx r5
+irq:
+ mov sp, #0x8000
+ ldr r5, =abort_handler
+ subs pc,lr,#4 \ No newline at end of file