| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On systems with SMP multiple harts will try to run the kernel, and they
will appear at random. But in this kernel, in order to keep things
simple, we want to make sure that *only one* hart is running the show,
as it greatly simplifies things on these kinds of systems.
The solution is similar to what Linux does, which is to allow the first
hart to initialize things, but then (and different to what Linux does),
it will infinitely stall all the other harts that arrive at a random
later point in time.
In order to make this more apparent, I have also added a print message
showing which hart is being used to run the whole thing.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
On 'printk' and 'sys_write' calls, prepend the name of the task that is
being executed for each message. This is an easy way to show off that we
are doing the right thing with the 'tp' register, even if we don't do
much with it.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
|
|
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>
|