Genode / RISC OS hybrid system
Michael Grunditz (8594) 259 posts |
I thought it might be better to have this as a separate thread. I have done a basic bringup of RISC OS and Genode playing nice together. Test platform is iMX8M because Genode already works on it and I ported RISC OS to it. This is what I have done this far:
Graphics is very simple to achive so I will not do that right now. In fact I might use RISC OS for it.. but letting Genodes drivers set it up before i write RISC OS frambuffer address to the gfx chip.There is very little use of having graphics directly in Genode in this scenario. In the not so near future I plan to have Genode apps (such as up to date web browser) graphics and ui events be redirected to riscos. This will provide a secure app environment, but still behave like a RISC OS app. Most drivers will be handled by Genode. Genode have a smart little way of using Linux drivers. It requuires some patching , but is way better than writing them from scratch. Genode also have a compatible license for that. I also plan for a ARM32 emulator ,, but that is just a fantasy right now. I think that it needs to be done by someone who knows a lot about cpu emulation. I don’t. My Genode work will be GPL and the RISC OS part will stay with the apache license. I post regular photos and video on Twitter. My twitter id is @QtARM, go check it out if you have something that can do Twitter. |
Steve Pampling (1551) 8154 posts |
Treating Genode as a fat HAL seems a good idea
The real fantasy would be having it also emulate the 26 bit mode CPU to cope with the
Sensible segmentation.
This forum is about as close as I ever get to social media, so I will await updates here. |
Michael Grunditz (8594) 259 posts |
So .. The year of 2023 is going to be the year of doing this.. get Genode and RISC OS together! I have started on bringing up Genode on a core that doesn’t support 32bit execution. When that is more or less finished I aim for 32bit emulation. I will try to write updates on it here and twitter/mastodon. Running demo scenario, which unfortunately ends in mmu fault in framebuffer. I can’t interact yet due to lack of usb driver. |
nemo (145) 2529 posts |
What’s your Mastodon, Michael? |
Michael Grunditz (8594) 259 posts |
Mastodon @ mickenx @ mstdn.social Twitter @QtARM . |
Michael Grunditz (8594) 259 posts |
ARM emulator work started , using the unicorn emulator. Bringing up that kind of software on Genode is a real challenge. There are a lot of memory/cache handling that needs attention. Genode and the kernel I am using , “base-hw” , is a really thin layer above the hardware. Anyway 32bit ARM BBC BASIC: |
nemo (145) 2529 posts |
I presume you’re aiming for effectively a 2nd processor environment – RAM & ROM but no memory-mapped hardware whatsoever, RO-to-Host communication through a magic SWI range? |
Michael Grunditz (8594) 259 posts |
I aim to have wimp running mostly in genode, which is very difficult to achieve. But I am optimistic. I will not start a complete rom. The emulator only supports 1:1 mmu mappings it seems and that is very incompatible with riscos. . Right now I am thinking of having the cpu emulation in a separate server like task. But yes , communication from arm code to host will be swi and or memory. Oh hey.. I just solved EL switching in Genode. Before today I could only start Genode in EL1 since the switch in Genode didn’t work. It probably was that u-boot left me in a unknown cpu state. I added cpu clearing to startup , and with that el switching works. |
nemo (145) 2529 posts |
If by “1:1” you mean you can’t move pages around, then how would task swapping work… byte copying? Eek. If you mean any one physical page can only be mapped to one logical address, then screen handling aside, what would that adversely affect other than memory hiding (which is related to task swapping)? |
Michael Grunditz (8594) 259 posts |
I mean: mapping mem 0×4000 will result in 0×4000 virtual , no matter how you do your translation tables. I hope I am wrong about that :-) |
nemo (145) 2529 posts |
That’s not ideal. Can Genode map your real pages underneath the emulator? VirtualRO → VirtualHost → PhysicalHost rather than VirtualRO → PhysicalRO → VirtualHost |
Michael Grunditz (8594) 259 posts |
Possible. My blog on genodians.org is now live: https://genodians.org/mickenx/2023-01-18-genode-and-riscos-continued |
nemo (145) 2529 posts |
<Clicks ❤️ button> |
Steve Pampling (1551) 8154 posts |
Er, only 9 days and this? I can’t wait to see what happens in February. |
Colin Ferris (399) 1809 posts |
would this work with other processers? |
Michael Grunditz (8594) 259 posts |
Yes. The soc needs to be supported by Genode. |
nemo (145) 2529 posts |
Including Risc-V I notice. |
Andrew McCarthy (3688) 605 posts |
How’s it going, Michael? |