mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
- 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
27 lines
635 B
ArmAsm
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
|