aboutsummaryrefslogtreecommitdiff
path: root/usr/src/init.S
Commit message (Collapse)AuthorAgeFilesLines
* usr: Simplify init.SMiquel Sabaté Solà2024-11-251-4/+1
| | | | | | | | | There appears to be no reasonable way to call 'wfi' from user space and making kernel space look the other way. Moreover, it also looks like clearing TW is not working either. Hence, we will have to implement 'idle' entirely from kernel space and be reasonable about it. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Simplify scheduling by introducing an init processMiquel Sabaté Solà2024-11-241-0/+8
Scheduling is easier if there is an init process which does nothing. This way we don't have to perform hacks in order to idle in S privilege mode while touching special registers in weird ways. For now this process is kind of costly since 'wfi' is not accepted in this context, but this can be further tuned down in the future by setting TW=1 on 'mstatus', or by handling the exception and allowing it if it comes from the proper process. All of that being said, there is still work to be done as things fail when optimitzations are on. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>