Genode's core as kernel on the Microblaze CPU architecture
last edited 1 year ago by nfeskeThe vision behind the challenge of running Genode on the Microblaze architecture is converging the Genode OS Framework project with the Genode FPGA Graphics project. Combined, both projects would open up exciting opportunities with regard to hardware-software co-design projects. Genode could then be used as operating system on system-on-chip solutions, leveraging the high-level programming model of Genode for embedded applications and achieving application portability among the range of minimal-complexity FPGA-based platforms up to standard PC hardware. There exist both the GNU compiler collection and binutils for this architecture, which is a precondition to port the source code of the Genode OS Framework. Furthermore, with the recent addition of an MMU to the Microblaze, this architecture now fulfills all functional preconditions to leverage the benefits of Genode with regard to ultra-low TCB complexity.
Approach
We suggest the Spartan 3A Starter Kit board as a development platform, which is an inexpensive and very popular entry-level FPGA board. Running Genode on the Microblaze can be achieved in two ways, either by porting an existing kernel to the Microblaze and run Genode's core on top, or by executing core as OS kernel. The latter approach is an interesting experiment to explore the feasibility of using core's interface as a kernel interface and thereby further reducing TCB complexity. Microblaze is a suitable architecture for pursuing this experiment because it is a clean and easy-to-understand architecture with a straight-forward user/supervisor mode execution model.
The project includes the following tasks:
- The creation of a simplistic kernel from scratch, which handles exceptions and interrupts, and provides a mechanism for performing system calls. When using core as kernel, the system-call interface will consist of only two system call, which are sending and receiving RPC messages. For implementing the low-level code, the source code of Xilinx' libxil is a good reference.
- Setting up a periodic timer interrupt using a system timer, connected to the Microblaze
- Creating a page-table abstraction to construct address spaces, which we will use as the back end of core's region-manager service
- Introducing preemptive scheduling between threads including the switching of contexts inner and inter address space. As a reference, there exists the source code of the xil kernel provided by Xilinx.
- Implementing the RPC system call for transferring messages between threads
- Incorporating core's code into the kernel skeleton step by step
- Finding a way to supply multiple programs contained as as a single image to the Microblaze platform
- Letting core start the init process
References
- http://www.xilinx.com/products/design_resources/proc_central/microblaze.htm
- Official Microblaze website at Xilinx.com
- http://fpga-graphics.org
- Website of the Genode FX project, which is a hardware-software solution for implementing fully fledged GUIs? on commodity FPGAs?.
- http://shop.trenz-electronic.de/catalog/default.php?cPath=1_47
- Trenz Electronic is a supplier of inexpensive Spartan3A Starter Kit boards

