<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fbos/Makefile, 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-03T13:34:43Z</updated>
<entry>
<title>Run a hart lottery on SMP</title>
<updated>2024-12-03T13:34:43Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-03T13:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=2eead36f97faf5bdad1abd60a220c0af72a5526c'/>
<id>urn:sha1:2eead36f97faf5bdad1abd60a220c0af72a5526c</id>
<content type='text'>
On systems with SMP multiple harts will try to run the kernel, and they
will appear at random. But in this kernel, in order to keep things
simple, we want to make sure that *only one* hart is running the show,
as it greatly simplifies things on these kinds of systems.

The solution is similar to what Linux does, which is to allow the first
hart to initialize things, but then (and different to what Linux does),
it will infinitely stall all the other harts that arrive at a random
later point in time.

In order to make this more apparent, I have also added a print message
showing which hart is being used to run the whole thing.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Ensure the right optimitzation level on DEBUG</title>
<updated>2024-12-02T19:49:00Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-02T19:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=a8d3f77812e8b6377169cfb6bf073a464e195cd3'/>
<id>urn:sha1:a8d3f77812e8b6377169cfb6bf073a464e195cd3</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Simplify the qemu target by removing QEMU_BIOS</title>
<updated>2024-11-30T20:16:54Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-30T20:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=891742e62d79aeaf7dfd052df87777c2e4826357'/>
<id>urn:sha1:891742e62d79aeaf7dfd052df87777c2e4826357</id>
<content type='text'>
The QEMU_BIOS parameter was meant to help on old QEMU installations
which did not support the proper fw_dynamic workflow. That being said,
old QEMU versions might also not implement the proper SBI specification,
or it may have other unexpected issues.

Hence, just remove the option and force people to have a sufficiently
recent QEMU version.

Finally, I have updated the SVG showing off a QEMU run.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix gdb target by not removing ELF executable</title>
<updated>2024-11-29T21:43:56Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-29T21:39:32Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=15cd6b372a01483df39220735b7f5935e5365296'/>
<id>urn:sha1:15cd6b372a01483df39220735b7f5935e5365296</id>
<content type='text'>
GDB actually needs the ELF executable to run a session with symbols
loaded in. Hence, do not remove the `fbos.elf` file after calling
`objcopy`.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Allow the kernel to run as a Linux image</title>
<updated>2024-11-29T21:17:13Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-29T21:17:13Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=d51665904faa31c39106e4b2afa7541615072e72'/>
<id>urn:sha1:d51665904faa31c39106e4b2afa7541615072e72</id>
<content type='text'>
In order to run on real hardware, it's actually easier to re-use
workflows from existing bootloaders than loading things in memory
manually. In order to achieve this two things had to be settled:

1. The image has to have a Linux header as defined in the RISC-V port.
   This header will be taken into consideration by bootloaders in order to
   know where to jump, the image offset, the endianness of the image, etc.
2. The image cannot just be an ELF executable. Rather, we must translate
   it into binary form via `objcopy`.

With all of this at hand, I was able to make the kernel run on a
Starfive VisionFive 2 board, and I have recorded an example so it's
available as documentation.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Use mktemp when generating the archive</title>
<updated>2024-11-27T15:30:00Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-27T15:30:00Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=45fa70a9c9892c980561785db323016e6080177d'/>
<id>urn:sha1:45fa70a9c9892c980561785db323016e6080177d</id>
<content type='text'>
Instead of manually making a temporary directory, do it through
'mktemp', which feels cleaner.

Moreover, the base directory will now by named 'fbos' instead of the
cryptic 'tmp' one. This is quite relevant when you uncompress the
archive into another machine.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<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 string.S to the lib directory</title>
<updated>2024-11-26T21:38:35Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-26T21:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=053f93edecf6aa02ec29366621adf2de6522cdf3'/>
<id>urn:sha1:053f93edecf6aa02ec29366621adf2de6522cdf3</id>
<content type='text'>
It was weird enough to have it in the 'kernel' directory, as it's way
more fitting to have it on 'lib'.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add a make target for producing a release archive</title>
<updated>2024-11-25T20:21:17Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-25T20:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/os/fbos/commit/?id=816044987ec4fbee3b88e04aabcf0a2edf83f908'/>
<id>urn:sha1:816044987ec4fbee3b88e04aabcf0a2edf83f908</id>
<content type='text'>
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>
</feed>
