From ee89199793683b3120a55f1c1887e12333c5ea7e Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Wed, 25 Nov 2020 16:53:24 -0700 Subject: Add ability to jump to a usermode init routine. This routine will has a newly allocated stack. I found out that when using the st-flash utility it likes to reset the device with the IPSR in HARD FAULT mode (?) so I have to manually hit the reset button to get it to work. --- src/user/init.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/user/init.c (limited to 'src/user/init.c') diff --git a/src/user/init.c b/src/user/init.c new file mode 100644 index 0000000..00f1b28 --- /dev/null +++ b/src/user/init.c @@ -0,0 +1,11 @@ +#include "user/syscall.h" +#include "kern/log.h" +#include "kern/common.h" + +void usermode_start() +{ + logs("I'm in usermode!\n"); + logs("I'm still in usermode!\n"); + logs("I'm super still in usermode!\n"); + for(;;); +} -- cgit