[okl4-developer] Adding a privileged mode functionality
Geoffrey Lee
glee at ok-labs.com
Fri Oct 19 02:37:49 EST 2007
On Thu, Oct 18, 2007 at 04:44:59PM +1000, Martin P. Lawitzky wrote:
> Hi,
>
> I need to add certain functions to L4 that require the privileged mode
> and can be invoked from user space. In particular, I need some
> co-processor functions.
>
> My first idea was adding syscalls for these purposes, but I found here:
> http://osdir.com/ml/micro-kernel.l4.l4ka.general/2006-11/msg00017.html
> that adding syscalls is not supposed.
>
> Another idea was adding privileged threads besides root and sigma to be
> called via IPC. But this also seems not to be the supposed way.
>
> So, my question is: What is the supposed way to make additional
> privileged-mode code accessible to user space?
What privileged code are you trying to run? If you want to use
processor instructions that require supervisor privileges then running
in the roottask is not going to help you, because the roottask runs
with user privileges. The only difference is threads in the root
address space are special in the sense they can make privileged L4 system
calls.
One option is to create a system call that does this in a controlled
manner, the other option is if you know the instruction will definitely
trap in a recoverable fashion, you can take the trap and have the
L4 kernel do this on your behalf, and restore the state transparently
once you are done. Either way this will involve modifications to the
L4 kernel.
If you simply want to do things like insert a memory mapping or
create a thread, then you don't need write any kernel code, there
are APIs to do such operations already (either directly on top of L4 or
with Iguana in the OKL4 tarball).
- gl
>
> I'm new to L4 and would be happy about your advice.
>
>
> Thanks in advance,
>
> Martin
>
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
>
More information about the Developer
mailing list