Adding a Kernel Module in base-hw

Franc sylvester sylvaster.franc at ...9...
Thu Apr 16 13:52:12 CEST 2015


Thanks Martin,

I have one more doubt regarding reading the general purpose register in
Genode.
I want to read the General purpose register value. Can you give me some
clue on this

Regards,
Franc

On Thu, Apr 16, 2015 at 5:13 PM, Martin Stein <martin.stein at ...1...>
wrote:

> Hi Franc,
>
> On 16.04.2015 12:01, Franc sylvester wrote:
> > I used this explanation to write a system call but i am not able to get
> > user argument value inside the system call.
> > Can  you provide some more information to get argument value inside the
> > system call.
>
> As you can see in the other system calls in [1] it should be sufficient
> in the userland to do:
>
> ret = call(call_id_<NAME>(), (Call_arg)arg_0, (Call_arg)arg_1, ...);
>
> This method can mangle up to 6 arguments into the appropriate registers
> (on ARM registers R0...R5, for details see [2]). In the kernel, you can
> then read these arguments by calling the following methods on the
> Kernel::Thread object of the user:
>
> arg_0 = user_arg_0();
> arg_1 = user_arg_1();
> ...
>
> To pass a return value to the user, call the following on the users
> Kernel::Thread object:
>
> user_arg_0(ret);
>
> The return value is then returned by the initially mentioned function in
> the userland.
>
> Cheers,
> Martin
>
> [1] base-hw/include/kernel/interface.h
> [2] base-hw/src/base/arm/kernel/interface.cc
>
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live
> exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20150416/a5957e5a/attachment.html>


More information about the users mailing list