<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fbos/usr, 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-25T22:02:51Z</updated>
<entry>
<title>usr: Simplify init.S</title>
<updated>2024-11-25T22:02:51Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-25T22:02:51Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=30d6ab8c6b40b2897fa3f49cce0302cc6c3a66e6'/>
<id>urn:sha1:30d6ab8c6b40b2897fa3f49cce0302cc6c3a66e6</id>
<content type='text'>
There appears to be no reasonable way to call 'wfi' from user space and
making kernel space look the other way. Moreover, it also looks like
clearing TW is not working either. Hence, we will have to implement
'idle' entirely from kernel space and be reasonable about it.

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>Enable exception handling from user mode</title>
<updated>2024-11-22T22:00:46Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-22T22:00:46Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=7f6b234625a53d2ceb9ec80dc0172aac1cedb358'/>
<id>urn:sha1:7f6b234625a53d2ceb9ec80dc0172aac1cedb358</id>
<content type='text'>
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à &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>usr: Rename foo/bar to fizz/buzz</title>
<updated>2024-11-22T15:09:53Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-22T14:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=573a8c6b490a080cf728cdcb11e5a14ddf50556d'/>
<id>urn:sha1:573a8c6b490a080cf728cdcb11e5a14ddf50556d</id>
<content type='text'>
When creating the user space binaries I forgot about their proper names,
which is funny on its own. Anyways, let's get them the name they were
intended.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;

alksjdlkajd

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>
<entry>
<title>usr: Bootstrap the initramfs for the kernel</title>
<updated>2024-11-18T14:56:37Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-18T14:56:37Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=d79436a1170e4d5ffde77416313587f320c8e590'/>
<id>urn:sha1:d79436a1170e4d5ffde77416313587f320c8e590</id>
<content type='text'>
Introduce a sample `foo` program which already calls the
`write_and_block` system call which is yet to be implemented by this
kernel. Moreover, the same CPIO format is used for the initramfs as with
Linux, so we can pass it with QEMU without worries.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
</feed>
