cpu specific kernel call

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


... I forgot to mention that you have to introduce a new unique ID for
your call in [1] like:

! constexpr Call_arg call_id_my_command() { return 21; }

The ID should be above 20 (0..20 are existing user syscalls) and below
100 (the core syscalls start there). Best practice would be using the
lowest free user syscall ID (21).

Cheers

[1] repos/base-hw/include/kernel/interface.h

On 04.03.21 10:10, Martin Stein wrote:
> 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



More information about the users mailing list