[VirtLayer] Changes to the interrupt handling in POK
claudiodcsilva at gmail.com
Sun Aug 18 18:01:48 UTC 2013
Ok. That clarifies the next steps.
You are correct; POK should be tested first without RTEMS integration.
My question was more about the separation between the RTEMS part of the
interrupt handler and the POK part. If RTEMS registers a handler it will
monopolize it; i.e. there is no possibility to run a POK handler and then
an RTEMS handler. This is required to maintain segregation and to prevent
RTEMS from interfering with POK. If RTEMS registers a handler for a vector
already user by POK (e.g. clock tick interrupt), POK cannot be overruled
and be dependent on RTEMS to run its own code. But for a first iteration
it's OK to ignore this.
On Sun, Aug 18, 2013 at 3:03 PM, Philipp Eppelt <
philipp.eppelt at mailbox.tu-dresden.de> wrote:
> currently I have no RTEMS partition running on POK, as these changes
> must first be validated with pure POK partitions. Also I haven't written
> the code to get a interrupt handler through the partition abstraction.
> CLOCK_HANDLER is a macro which is incrementing the tick counter and
> invoking the scheduler in the POK kernel.
> To register IRQ handlers from a partition, e.g. an RTEMS partition, I
> need to create a new syscall first, to get the callback function into
> the meta_handler list.
> So when RTEMS tries to attach to an interrupt, the virtualization layer
> implementation of POK is invoked and registers a predefined handler via
> a syscall with the meta_handler for this irq number. When the interrupt
> occurs the registered handler is invoked with the vector number as an
> argument. Then the handler invokes C_dispatch_isr() in RTEMS passing the
> vector number along.
> That's the plan, for the next week.
> On 08/18/2013 02:45 PM, Cláudio Silva wrote:
> > Good job Philipp. It seems a nice first iteration for interrupt
> > virtualization. Did you get to try it?
> > If I got it right, the POK part of the interrupt handler (CLOCK_HANDLER
> > ??) is running after the virtualized RTEMS handler?
> > Regards,
> > Cláudio
> > On Sun, Aug 18, 2013 at 12:18 AM, Philipp Eppelt
> > <philipp.eppelt at mailbox.tu-dresden.de
> > <mailto:philipp.eppelt at mailbox.tu-dresden.de>> wrote:
> > Hi,
> > lately I worked a lot to extend POK with necessary features to
> > accommodate an RTEMS partition.
> > Since hello world works, I need a way to pass clock ticks to the
> > partition running on POK. Therefore the interrupt handling needs to
> > support custom handlers.
> > If everything works out, I can enable the virtualization layer to
> > register an interrupt vector and if it occurs RTEMS is notified by
> > invoking C_dispatch_isr().
> > Blog:
> > Source:
> > https://github.com/phipse/pok
> > Cheers,
> > Philipp
> > _______________________________________________
> > rtems-devel mailing list
> > rtems-devel at rtems.org <mailto:rtems-devel at rtems.org>
> > http://www.rtems.org/mailman/listinfo/rtems-devel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel