aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2020-01-17 15:01:40 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2020-01-17 15:01:40 +0100
commitd0dbc02e5e48a6849a74dec4e7e0084e058d7e00 (patch)
tree02f624fe359037e39dd5e30d485971c8f593f959 /src
parent753b222b3f4973a9a689aae5286a3e29ccee21fb (diff)
downloadrpi-MMU-example-d0dbc02e5e48a6849a74dec4e7e0084e058d7e00.tar.gz
rpi-MMU-example-d0dbc02e5e48a6849a74dec4e7e0084e058d7e00.zip
get rid of reset handler
Diffstat (limited to 'src')
-rw-r--r--src/arm/PL1/kernel/interrupt_vector.S5
-rw-r--r--src/arm/PL1/kernel/interrupts.c11
2 files changed, 4 insertions, 12 deletions
diff --git a/src/arm/PL1/kernel/interrupt_vector.S b/src/arm/PL1/kernel/interrupt_vector.S
index 1ec80f7..3afc193 100644
--- a/src/arm/PL1/kernel/interrupt_vector.S
+++ b/src/arm/PL1/kernel/interrupt_vector.S
@@ -8,9 +8,12 @@ _interrupt_vectors:
b irq_handler_caller
b fiq_handler_caller
+// from what I've heard, reset is never used on the Pi;
+// in our case it should run once - when stage1 of the kernel
+// jumps to stage2
reset_handler_caller:
ldr sp, =_supervisor_stack_top
- ldr r5, =reset_handler
+ ldr r5, =setup
bx r5
undef_handler_caller:
diff --git a/src/arm/PL1/kernel/interrupts.c b/src/arm/PL1/kernel/interrupts.c
index 5695e6f..0832cad 100644
--- a/src/arm/PL1/kernel/interrupts.c
+++ b/src/arm/PL1/kernel/interrupts.c
@@ -4,17 +4,6 @@
#include "armclock.h"
#include "scheduler.h"
-// defined in setup.c
-void __attribute__((noreturn)) setup(void);
-
-// from what I've heard, reset is never used on the Pi;
-// in our case it should run once - when stage1 of the kernel
-// jumps to stage2
-void reset_handler(void)
-{
- setup();
-}
-
void undefined_instruction_vector(void)
{
error("Undefined instruction occured");