<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fbos/kernel/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-11-26T21:44:45Z</updated>
<entry>
<title>Move initrd.c into lib</title>
<updated>2024-11-26T21:44:45Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-26T21:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=b0ea42e4a95478197d4d7e73791dae012cda6a4a'/>
<id>urn:sha1:b0ea42e4a95478197d4d7e73791dae012cda6a4a</id>
<content type='text'>
Even if it's tightly coupled with the kernel (e.g. identifying specific
tasks from the kernel), in the end it's a library and so it should be
placed accordingly.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Move 'memcpy' to assembly</title>
<updated>2024-11-26T21:27:02Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-26T21:27:02Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=fa8f9e9f44d47f5b2d0b4cc6a2cc8f328e0caa80'/>
<id>urn:sha1:fa8f9e9f44d47f5b2d0b4cc6a2cc8f328e0caa80</id>
<content type='text'>
And apparently 'memmove' is not needed anymore, so we dodged a bullet
there.

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>kernel: Remove old code from initrd.c</title>
<updated>2024-11-24T22:03:34Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-24T22:03:34Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=1e81d5c0e4503c86f60ee21da76694ac0693a2e3'/>
<id>urn:sha1:1e81d5c0e4503c86f60ee21da76694ac0693a2e3</id>
<content type='text'>
And for the first time I saw this whole thing working with optimizations
on :)

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Simplify the entry address computation</title>
<updated>2024-11-24T21:37:20Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-24T21:37:20Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=ea8d5390ebe2f1917d07f4eed416661ade96c953'/>
<id>urn:sha1:ea8d5390ebe2f1917d07f4eed416661ade96c953</id>
<content type='text'>
We actually don't need to preserve the initially computed base address
for each binary, but we can just preserve the final entry address.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Simplify scheduling by introducing an init process</title>
<updated>2024-11-24T21:22:48Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-24T21:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=192208770d3866838a450462dd4b1fc8e2b5c91a'/>
<id>urn:sha1:192208770d3866838a450462dd4b1fc8e2b5c91a</id>
<content type='text'>
Scheduling is easier if there is an init process which does nothing.
This way we don't have to perform hacks in order to idle in S privilege
mode while touching special registers in weird ways.

For now this process is kind of costly since 'wfi' is not accepted in
this context, but this can be further tuned down in the future by
setting TW=1 on 'mstatus', or by handling the exception and allowing it
if it comes from the proper process.

All of that being said, there is still work to be done as things fail
when optimitzations are on.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix initrd parsing because of a path change</title>
<updated>2024-11-22T15:43:36Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-22T15:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=224ed7b13ceadd05d27e61d3a0fdd34beb0c7745'/>
<id>urn:sha1:224ed7b13ceadd05d27e61d3a0fdd34beb0c7745</id>
<content type='text'>
In commit 573a8c6b490a ("usr: Rename foo/bar to fizz/buzz") the path of
the user-space binaries have changed. The `initrd` parsing code makes
some decisions based on that naming, and so it needed to be updated as
well.

Fixes: 573a8c6b490a ("usr: Rename foo/bar to fizz/buzz")
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>
