aboutsummaryrefslogtreecommitdiff
path: root/kernel/printk.c
Commit message (Collapse)AuthorAgeFilesLines
* Enable exception handling from user modeMiquel Sabaté Solà2024-11-221-2/+7
| | | | | | | | This allows us to actually catch system calls and start to run user space programs. That being said, the whole thing is still pretty brittle, and the scheduler is not quite there yet. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Check the return value from SBI ecallsMiquel Sabaté Solà2024-11-191-1/+4
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Setup the stack for an init taskMiquel Sabaté Solà2024-11-191-0/+23
Bootstrap an init task which holds at least the initial stack that is to be used when setting up the registers (such as `sp` and `tp`). In order to guarantee that the stack and the rest of the registers are set up correctly, this commit also provides a raw implementation of a `printk` function. Moreover, this commit also adds an argument that must be passed to `start_kernel`, which is the pointer to the embedded `fdt` blob. This argument will be used by later work so to fetch, at least, the base address for the initial ram disk. This was also used to test that the stack was working as expected. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>