From 97612feede34cdd0099d72d0e6fa125dd65b5e9a Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 31 Dec 2019 17:43:13 +0100 Subject: reset is used by us in a hacky way and never really triggered by hardware; mark that --- interrupts.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/interrupts.c b/interrupts.c index 3102761..c6e3f17 100644 --- a/interrupts.c +++ b/interrupts.c @@ -1,19 +1,14 @@ #include "io.h" #include "svc_interface.h" -void setup(void); +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) { - static _Bool setup_done; - - if (!setup_done) - setup(); - - setup_done = 1; - - // TODO do something here - while(1); + setup(); } void undefined_instruction_vector(void) -- cgit v1.2.3