GSoC 2013 - RTEMS Virtualization Layer Project

Progress, Issues, Design

POK Hardware Interrupt Handling

I finished a first working version of the new interrupt handling for the hardware interrupts on POK. I did not change the handling of system-calls or exceptions.

In this post I will describe the old handling system, the dedicated callback functions for the IDT, a general ISR handler, the meta handler structure and the control flow for registering a handler and an interruption.

Midterm Explanation

It is midterm evaluation time, so half the time is up and I want to write about the changes I bring into the RTEMS project. This post will explain the patch I created for midterm.

Generation of Libpart Target

This post is about code generation in POK and how the libpart target can be included in the automatic generation process. First I will discuss where the configuration for the generation is done; Second I talk about the reasons, why I won’t intercept this process and which solution I settled with.

How Late Is It?

The big question is: How can we pass the time to RTEMS? POK doesn’t provide a mechanism to pass time to a partition, however, the partition can ask how late it is. But this doesn’t help. Hence, we need to design a new mechanism in POK and RTEMS to let the two work together.

Caution: This is a very long post!

Hello World - Describing the Build Process

The good news first: Hello World runs!

To get there you need five steps:

  1. Build the rtems-guest example in POK.
  2. Copy libpart.a part1/ to virtPok/
  3. Build virtPok BSP
  4. Copy hello binary to POK partition and rebuild kernel binary
  5. make run

Memory Partition and Pointers

I had the issue, that the file POK uses as buffer to tell the kernel what to print on the screen, was outside of the partition. Well, outside as in the filepointer was pointing to a memory location, which was outside the memory slice configured in the AADL model (model.aadl). So when modelling the partition, that should contain the guest, keep in mind to define enough memory for the binary.

As you can see the kernel uses the model.aadl parameters to check the partition, even if your ELF binary is using different memory sizes.

RTEMS I386 Split - How to Support a Virtualized CPU

There are several x86 instructions that are not allowed in a virtualized environment. Hence, I introduced a new CPU model called virtual in the i386 branch of RTEMS, which is equal to the native branch, except sensitive instructions like hlt, cli, sli.