diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-25 16:53:24 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-25 16:53:24 -0700 |
commit | ee89199793683b3120a55f1c1887e12333c5ea7e (patch) | |
tree | 2996b7645b6ab727bd9c6ee7f7062626d3ff7023 /src/user/init.c | |
parent | 6d22b0dfc7761a605758552d5824f8039ac5a00f (diff) | |
download | stm32l4-ee89199793683b3120a55f1c1887e12333c5ea7e.tar.gz stm32l4-ee89199793683b3120a55f1c1887e12333c5ea7e.tar.bz2 stm32l4-ee89199793683b3120a55f1c1887e12333c5ea7e.zip |
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.
Diffstat (limited to 'src/user/init.c')
-rw-r--r-- | src/user/init.c | 11 |
1 files changed, 11 insertions, 0 deletions
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(;;); +} |