cpu specific kernel call

Martin Stein martin.stein at genode-labs.com
Thu Mar 4 10:10:21 CET 2021


Hi Michael,

I'm not that much into the discussion, but I assume you are using the
base-hw kernel. In this kernel, public kernel calls (allowed in
userland) are located in [1]. If you don't have more than 5 arguments
and 1 return value to your call, you can simply use the same generic
'Kernel::call' function as in the other kernel calls. The RISCV back end
of this is located in [2] with the most interesting part being the
CALL_1_SWI define.

Does this help?

Cheers,
Martin

[1] repos/base-hw/include/kernel/interface.h
[2] repos/base-hw/src/core/spec/riscv/kernel/interface.cc

On 03.03.21 23:22, Michael Grunditz wrote:
> Hi,
> 
> I have a kernel call that starts RISC OS, and uses psci. I wonder , where 
> should I put that very aarch64 dependent code. I somehow need to be able 
> to call it from userspace.
> 
> Regarding kernel calls in general , what is the best way of calling them? 
> Right now I do "MOV x0,#number ; SVC" , probably not very Genode style! :)
> 
> 
> 
> 



More information about the users mailing list