diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-25 12:23:11 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-25 12:25:05 -0700 |
commit | f06d29ca9da724866ae99ee2225d53f382d32bcd (patch) | |
tree | fbec7a13e7e05654898116037d7506637aa0ebff /include/kern/priv.h | |
parent | d7d50cc81f72d1275140d7a15c52b6f9e272896f (diff) | |
download | stm32l4-f06d29ca9da724866ae99ee2225d53f382d32bcd.tar.gz stm32l4-f06d29ca9da724866ae99ee2225d53f382d32bcd.tar.bz2 stm32l4-f06d29ca9da724866ae99ee2225d53f382d32bcd.zip |
Add priv.h/c to allow switching to user mode. Change some things with the MPU in main() to actually work.
Diffstat (limited to 'include/kern/priv.h')
-rw-r--r-- | include/kern/priv.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/kern/priv.h b/include/kern/priv.h new file mode 100644 index 0000000..8940b23 --- /dev/null +++ b/include/kern/priv.h @@ -0,0 +1,14 @@ +#ifndef _KERN_PRIV_H_ +#define _KERN_PRIV_H_ + +#include "kern/common.h" + +uint32_t get_control_register(); + +void set_control_register(uint32_t reg); + +/* Enters user mode from privilieged mode. */ +void enter_user_mode(); + + +#endif /* _KERN_PRIV_H_ */ |