aboutsummaryrefslogtreecommitdiff
path: root/src/exceptions/fiq.S
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-31 19:05:50 -0700
committerChristian Cunningham <cc@localhost>2022-01-31 19:05:50 -0700
commita1f49718aee378fa075303c86106309091d56b80 (patch)
treedaa43fe9db527b69bc3b5e9cd967e6e5de5f5e29 /src/exceptions/fiq.S
parent09d5025fc34644a6e04380a61da15ba5d8e3f775 (diff)
Break exceptions off to own files
Diffstat (limited to 'src/exceptions/fiq.S')
-rw-r--r--src/exceptions/fiq.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/exceptions/fiq.S b/src/exceptions/fiq.S
new file mode 100644
index 0000000..f323a02
--- /dev/null
+++ b/src/exceptions/fiq.S
@@ -0,0 +1,26 @@
+.section ".text.exceptions"
+.globl fiq
+fiq:
+ cpsid aif
+ stmfd sp!, {r0-r12,lr}
+ bl c_fiq_handler
+ cmp r0, #1
+ bne 1f
+ mrs r1, spsr
+ and r1, r1, #0x1f
+ cmp r1, #0x10
+ bne 1f
+ ldmfd sp!, {r0-r12,lr}
+ sub lr, #4
+ push {r3}
+ ldr r3, =irqlr
+ str lr, [r3, #0]
+ pop {r3}
+ cps #0x13
+ b schedule
+1:
+ ldmfd sp!, {r0-r12,lr}
+ subs pc, lr, #4
+
+.section .data
+fiq_msg: .asciz "FIQ\n"