<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fbos/kernel/trap.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-04T13:23:44Z</updated>
<entry>
<title>Move documentation to the proper places</title>
<updated>2024-12-04T13:23:44Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-04T13:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=ad072dbf39036eaeb2879bd39f5195175d8b1280'/>
<id>urn:sha1:ad072dbf39036eaeb2879bd39f5195175d8b1280</id>
<content type='text'>
Code documentation was scattered between header and source files. Since
the norm was already to have this documentation into header files, move
some comments from source files to their header counterparts. This
hopefully makes things more consistent.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Prepend the name of the task on debug</title>
<updated>2024-12-02T19:47:19Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-02T19:47:19Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=32e880127366fabc3e8b4fecb642f1cc06b8fd71'/>
<id>urn:sha1:32e880127366fabc3e8b4fecb642f1cc06b8fd71</id>
<content type='text'>
On 'printk' and 'sys_write' calls, prepend the name of the task that is
being executed for each message. This is an easy way to show off that we
are doing the right thing with the 'tp' register, even if we don't do
much with it.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Document what we mean by scheduling on this kernel</title>
<updated>2024-11-30T22:42:08Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-30T22:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=a7287a7891d9ead98221c3de79d46d487e0d68ac'/>
<id>urn:sha1:a7287a7891d9ead98221c3de79d46d487e0d68ac</id>
<content type='text'>
The notion of 'scheduling' a process on this kernel is effectively the
same as starting the process anew. This is pretty bananas for any
general purpose kernel, but this is not our case.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Rename 'switch_to' to 'set_return_address_to'</title>
<updated>2024-11-30T21:28:51Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-30T21:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=f560a5312f524caaa427f4f548b97ab3f32904b8'/>
<id>urn:sha1:f560a5312f524caaa427f4f548b97ab3f32904b8</id>
<content type='text'>
The original name came from a previous hack the did not work but somehow
the old name remained. Now it was more misleading than anything else, so
let's rename it to something that is closer to what it actually does.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>dt: Fetch the CPU frequency as well</title>
<updated>2024-11-26T12:59:54Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-26T12:59:54Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=7870d56b155c2be73cdacfba94eeb893cd55628e'/>
<id>urn:sha1:7870d56b155c2be73cdacfba94eeb893cd55628e</id>
<content type='text'>
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à &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>Enable the timer from the SBI interface</title>
<updated>2024-11-22T14:46:59Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-22T14:46:59Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=dcda5731ecbbce70edeaa7662e9ea0fc190a1943'/>
<id>urn:sha1:dcda5731ecbbce70edeaa7662e9ea0fc190a1943</id>
<content type='text'>
A basic interrupt handler has been implemented which tracks the seconds
that have been elapsing along the way. Depending on the value of these
seconds, then a task has to be called.

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