Genode / RISC OS

I would like to tell you a bit of my project and why it is kind of a dead end. I have been interested in multi cpu core systems since it allows you to run completely different code at the same time without virtualisation. My first demo was with NetBSD running at one core and RISC OS on another. RISC OS was the main system, as in what you can see. It displayed NetBSD framebuffer in a window and also made it possible to interact with it. My second demo , which is also open source, was RISC OS running in parallel with Genode. I think it turned out quite well. I worked with it night and day in a few weeks before my crowd funded trip to Bristol. It isn’t just Genode code but also a lot of driver development in RISC OS. It also features the possibility to “download” files to RISC OS from Genode, but no real filesystem. It is strictly only for iMX8 because of my (ab)use of the message unit. The message unit is clearly not indented to work between the big cores, but it can be used for provoke interrupts and when this happen write / read its data registers. The keyboard is interrupt driven and the mouse movement is polled.

The original plan was to have RISC OS and Genode tightly integrated, but the more I think about it , the more I feel that it is impossible. RISC OS and Genode is very different. RISC OS i built for ARM ( and only ARM) and relies on SWI , software interrupts for everything. Other systems uses that for syscalls , but in a different way. RISC OS kernel and other parts is built in assembly. In order to have it integrated with Genode, it kind of need a full rewrite.

Besides the parallel system demo I also made a emulator based on the unicorn cpu emulator. In that I run BBC BASIC as the front end. It simulates a lot of RISC OS SWIs. For example supports loading of RISC OS kernel modules. It cannot do everything from a random module, but many things work. As a proof of concept I include the “Shared C Library” module. That allows to run RISC OS C applications. However, the emulator is CLI only and RISC OS is only “multitasking” in its graphical user interface. RISC OS is basically only one process. There is also no floating point in my emulator. RISC OS have a kernel module that traps illegal instructions, “fpu” instructions from a old controller and translate them to what the current cpu wants. That means that floating point is impossible from C code. In assembler I can use floating point.

So to summarise:
It has been a exciting journey, but I am afraid that this is the end of the road. I have learned a lot of Genode internals and had a lot of fun! Also as a side effect I ported Genode to RockChip SOCs rk3588 and rk3399.

Thanks for reading.

2 Likes

There might be some merit to that. Kind of reminds me of AROS (Amiga Replacement project, a clean-room rewrite I think?), though I haven’t followed the Amiga scene in 20 years so there might be more contenders now. Looks like you had quite an adventure, hope you stick around in the Genode ecosystem!

1 Like

There is a project in which RISC OS is implemented in Python. That is a super effort! Probably the most complex I have come across .

1 Like

Don’t worry … my interest in kernels will make me stay :smiley:

3 Likes