| 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|