<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fbos/test/test_initrd.c, branch main</title>
<subtitle>A RISC-V operating system devoted to running fizz/buzz processes.
</subtitle>
<id>https://git.mssola.com/os/fbos/atom?h=main</id>
<link rel='self' href='https://git.mssola.com/os/fbos/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/'/>
<updated>2024-12-03T07:00:53Z</updated>
<entry>
<title>test: Remove asserts on specific entry addrs</title>
<updated>2024-12-03T07:00:53Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-03T07:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=95c4b00e90e24d3bcb5d3b6e56f0e29b725ba9ce'/>
<id>urn:sha1:95c4b00e90e24d3bcb5d3b6e56f0e29b725ba9ce</id>
<content type='text'>
These asserts where needed when I was iterating on the initrd handling
code, but they are admittedly too specific and prone to errors. Hence,
get rid off them.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Remove stack pointer for each process</title>
<updated>2024-12-03T06:59:01Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-03T06:59:01Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=065f42adc9af7fc4adc391bb6961460010c30d08'/>
<id>urn:sha1:065f42adc9af7fc4adc391bb6961460010c30d08</id>
<content type='text'>
Since 6132623dbf30 ("Share the same stack everywhere") the same stack is
used everywhere. Hence, it's rather pointless for each task to have a
pointer to a stack which is the same and that is never read.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Simplify the constant on the size of the stack</title>
<updated>2024-12-03T06:41:45Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-03T06:41:45Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=58fcecc381be82992f718a6ef9bf7ddcd3bca369'/>
<id>urn:sha1:58fcecc381be82992f718a6ef9bf7ddcd3bca369</id>
<content type='text'>
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à &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Share the same stack everywhere</title>
<updated>2024-12-02T20:02:35Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-02T20:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=6132623dbf3076da11cdb85c494fadd7ee0f0a93'/>
<id>urn:sha1:6132623dbf3076da11cdb85c494fadd7ee0f0a93</id>
<content type='text'>
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à &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: Only test initrd addresses on debug</title>
<updated>2024-11-25T06:45:26Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-25T06:35:35Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=ea542e18e7bc7e9d401aefd044bf0317676867ca'/>
<id>urn:sha1:ea542e18e7bc7e9d401aefd044bf0317676867ca</id>
<content type='text'>
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à &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>test: Fix test on initrd</title>
<updated>2024-11-24T22:55:25Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-24T22:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=51ec9306dce1684e35ebdcbf2f091359971fcc57'/>
<id>urn:sha1:51ec9306dce1684e35ebdcbf2f091359971fcc57</id>
<content type='text'>
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à &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Accept tasks as a parameter on initrd extraction</title>
<updated>2024-11-24T22:27:13Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-24T22:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=f4986dab75fa612f4f3d525187cd04c029d9bc6b'/>
<id>urn:sha1:f4986dab75fa612f4f3d525187cd04c029d9bc6b</id>
<content type='text'>
This allows this functionality to be properly extracted for unit tests.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add basic parsing for underlying ELF executables</title>
<updated>2024-11-22T06:58:15Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-22T06:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=8231af9d8d759ae89c8214ca2410b0feab9dfb8c'/>
<id>urn:sha1:8231af9d8d759ae89c8214ca2410b0feab9dfb8c</id>
<content type='text'>
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à &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Initial parsing of the provided initrd file</title>
<updated>2024-11-21T12:09:21Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-21T12:09:21Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=40ffc517e20c381ce8fdb3a881726a26a52e35db'/>
<id>urn:sha1:40ffc517e20c381ce8fdb3a881726a26a52e35db</id>
<content type='text'>
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à &lt;mikisabate@gmail.com&gt;
</content>
</entry>
</feed>
