Adding a Kernel Module in base-hw

Christian Helmuth christian.helmuth at ...1...
Mon Jan 19 11:48:05 CET 2015

Hello Franc,

On Mon, Jan 19, 2015 at 03:34:06PM +0530, Franc sylvester wrote:
> I am stuck at one point because of lack of understanding in Genode,
> Actually I want to execute some assembly instruction in privileged mode in
> base-hw kernel from a user script.
> So I need to know, How will I add a kernel module which will execute
> assembly instruction and how can I call this module from the user space.
> And if there is already any such modules exist in Genode that will really
> help me to understand the flow mechanism, Let me know.

The answer to your question heavily depends on the task you address.
>From my point of view, it's better to stay away from any "general"
solution to load code into the kernel resp. execute arbitrary
instructions in kernel mode. At last, base-hw is a microkernel and
should stay that way.

To give an example, we extended base-hw for USB SOF interrupt
filtering for the Raspberry Pi last autumn to highly reduce the impact
on the system load. Therefore, we implemented a special case in the
interrupt handling code

The feature does not affect the kernel integrity as it just moves one
single aspect of the driver into the kernel: Filter high-frequency
interrupts that do not have to be handled in user mode. The kernel
interrupt handler drops all incoming interrupts of the DWC device
while the incoming frame number is smaller than the frame number
scheduled by the user-level device driver.

Could you provide us with more information about what you like to
achieve? Is it really necessary to add a new system call? Would it be
feasible to introduce an abstraction that solves the issue?

Christian Helmuth
Genode Labs · · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

More information about the users mailing list