GodMode9/arm11/source/arm/vectors.s
Wolfvak 2f86686388 renamed most low level functions and other stuff to fit with the current theme
- added initial SCU twiddling
- added very untested and unusable SMP code
- fixed race condition that happened on boot
- added initial MMU code (just super basic identity mapping, no caching set up or anything)
- enabled some of the fancier ARMv6 features
- reorganized ARM11 files into their own folders
- possibly more stuff I'm forgetting about
2019-06-03 02:27:41 +02:00

27 lines
635 B
ArmAsm

#include <arm.h>
.arm
.section .text
.align 2
@ temporarily use dumb vectors redirected from the bootrom, rather
@ than MMU-mapped pages
.global irq_vector
.type irq_vector, %function
irq_vector:
sub lr, lr, #4 @ Fix return address
srsfd sp!, #SR_SVC_MODE @ Store IRQ mode LR and SPSR on the SVC stack
cps #SR_SVC_MODE @ Switch to SVC mode
push {r0-r4, r12, lr} @ Preserve registers
and r4, sp, #7 @ Fix SP to be 8byte aligned
sub sp, sp, r4
bl GIC_MainHandler
add sp, sp, r4
pop {r0-r4, r12, lr}
rfeia sp! @ Return from exception