diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-28 21:54:42 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-28 21:54:42 +0100 |
commit | 700f4c412d42c9b9811269045c0e363a0331bba9 (patch) | |
tree | 260feed1ca657843d993c1ae73e93f25a17cede1 /interrupt_vector.S | |
parent | 80c9af17330ac442a4c3d6d55b4041cbe923e9b4 (diff) | |
download | rpi-MMU-example-700f4c412d42c9b9811269045c0e363a0331bba9.tar.gz rpi-MMU-example-700f4c412d42c9b9811269045c0e363a0331bba9.zip |
split kernel into 2 stages; second stage gets copied to 0x0 and runs from there
Diffstat (limited to 'interrupt_vector.S')
-rw-r--r-- | interrupt_vector.S | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/interrupt_vector.S b/interrupt_vector.S index d20bf6d..6037b7c 100644 --- a/interrupt_vector.S +++ b/interrupt_vector.S @@ -1,22 +1,45 @@ -.section ".interrupts.vector" - -.global abort_handler -.local generic_handler -.global _interrupt_vectors _interrupt_vectors: - b generic_handler - b generic_handler - b generic_handler + b reset_handler_caller + b undef_handler_caller + b svc_handler_caller b abort_handler_caller b abort_handler_caller - b generic_handler - b generic_handler - -.section ".interrupts.text" + b generic_handler_caller + b irq_handler_caller + b fiq_handler_caller + +reset_handler_caller: + ldr sp, =_stack_top + ldr r5, =reset_handler + bx r5 + +undef_handler_caller: + ldr sp, =_stack_top + ldr r5, =undefined_instruction_vector + bx r5 -generic_handler: - b generic_handler +svc_handler_caller: + ldr sp, =_stack_top + ldr r5, =supervisor_call_handler + bx r5 + abort_handler_caller: - mov sp, #0x8000 + ldr sp, =_stack_top ldr r5, =abort_handler bx r5 + +generic_handler_caller: + ldr sp, =_stack_top + ldr r5, =generic_handler + bx r5 + +irq_handler_caller: + ldr sp, =_stack_top + ldr r5, =irq_handler + bx r5 + +fiq_handler_caller: + ldr sp, =_stack_top + ldr r5, =fiq_handler + bx r5 + |