aboutsummaryrefslogtreecommitdiff
path: root/src/kern/main.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2020-11-25 16:53:24 -0700
committerJosh Rahm <joshuarahm@gmail.com>2020-11-25 16:53:24 -0700
commitee89199793683b3120a55f1c1887e12333c5ea7e (patch)
tree2996b7645b6ab727bd9c6ee7f7062626d3ff7023 /src/kern/main.c
parent6d22b0dfc7761a605758552d5824f8039ac5a00f (diff)
downloadstm32l4-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/kern/main.c')
-rw-r--r--src/kern/main.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/kern/main.c b/src/kern/main.c
index 3af8beb..4fddb0a 100644
--- a/src/kern/main.c
+++ b/src/kern/main.c
@@ -35,19 +35,7 @@ void configure_mpu()
int main()
{
configure_mpu();
-
- klogf("Outside of usermode, I can still log stuff using klogf()\n");
-
- enter_user_mode();
-
- logs("Now that I'm in user mode, I have to log stuff using a system call\n");
- logs(
- "because I no longer have direct accss to USART2 and cannot use\n"
- "klogf()\n");
-
-
- for (;;)
- ;
+ jump_to_user_mode();
}
#endif