| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
At the beginning I carried over things from the Linux kernel just in
case I would need them in the future. As this project is very much at a
stage where I'm already happy with it, let's remove unneeded complexity.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
As documented in the code, we are not implementing any kind of memory
protection, so in theory any process (regardless if running in user or
kernel space) would be able to tamper with other processes' stack.
Hence, don't even pretend that we are separating stacks and share the
same global stack everywhere. This simplifies things a bit.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Originally I was planning to detect the machine model just in case we
needed to do workaround for special cases. But since apparently even
VisionFive2 brings its own CPU frequency base on DT, this is not even
needed. Hence, fetching the model is now a cool message being shown on
boot.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
If the 'timebase-frequency' property is available under the 'cpus' node
from the DTB blob, it makes sense to try to fetch this value from there
instead of hardcoding it. For other use-cases, where this information is
not available through DT (e.g. ACPI on the VisionFive2 board), we will
have to hardcode it with a default value even if it's not the proper
one.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In initrd tests, and in general, we only need to check that the function
did something. As in, that it set the entry addresses somewhere and did
not leave them NULL. This is going to be performed from now on on CI and
regular tests. And, just if you want to go the extra mile, we will run
specific tests that check on memory addresses but that are not
guaranteed to work.
This is to be replaced in the future by having some proper debugging
output. As in, having a message at kernel boot time specifying the
addresses being used among other info. This needs a more complex printk
utility, of course.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This was broken since I first introduced the test on initrd on
40ffc517e20c ("Initial parsing of the provided initrd file") but it
always was as a work in progress test.
Now that the initrd parsing has separation of concerns with the global
'tasks' variable since f4986dab75fa ("Accept tasks as a parameter on
initrd extraction"), we can have a proper test written for this.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
| |
This allows this functionality to be properly extracted for unit tests.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The given initrd is a CPIO archive of multiple ELF executables. We are
already able to parse the CPIO archive to detect where each file is
located, this commit adds the mapping for each ELF executable to the
corresponding task_struct.
Note that this is still heavily under construction, since we cannot
simply jump into the entry point of an executable as we have not yet
setup the proper layout from performing context switches.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We expect a CPIO archive with the 'newc' format for the initrd. Parse
this archive from the given initrd address and fetch the address for
each ELF executable while also pairing which task correspond to which
ELF.
This commit leaves to do the actual parsing of the ELF file for each
task, while also leaving some string utilities to be refined.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
|
|
The kernel entry has a pointer to the DTB blob as a parameter. From this
pointer we can parse the the DTB blob to find the properties
"chosen->linux,initrd-start" and "chosen->linux,initrd-start". These
properties are guaranteed to have 64-bit addresses which point where the
initrd is in memory, which we need to fetch the binaries to be loaded.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|