Page 1 of 1

Changing Usermodes

Posted: Fri Nov 14, 2014 1:50 pm
by Valnar92
Hello everybody,

I've got a question out of interest.
As already mentioned in another topic, Erika works by default in the Supervisor mode.
Are there any functions or configurations yet to switch to another user mode and, if not, are there planned any methods?

Thanks in advance ;)
Greets Alex

P.S. I'm using the Infineon Aurix with the EE V2.4.0

Re: Changing Usermodes

Posted: Fri Nov 14, 2014 2:48 pm
by paolo.gai
Hi!

ERIKA 2.4.0 includes an AUTOSAR-like full memory Protection implementation for AURIX!

Check for example the default templates under
tricore/infineon_TriBoard-TC2X5_V2.0/Stack Monitoring, Service Protection and Memory Protection automatic tests

Ciao,

PJ

Re: Changing Usermodes

Posted: Fri Nov 14, 2014 2:49 pm
by e.guidieri
Hello Alex,

well with the last ERIKA release (the one you claim to use), there is something a way better for AURIX.
We just released the full memory protection support for ERIKA on AURIX, that use seperation between supervisor and user (User-1 "TriCore speeking") code plus MPU.

Check this out:

http://erika.tuxfamily.org/wiki/index.p ... on_Support

Errico

*Simultaneus posting with PJ :)

Re: Changing Usermodes

Posted: Mon Nov 17, 2014 2:33 pm
by Valnar92
Hi there,

first, thanks for the responses (good timing :) )
I think, that the declaration of the functions which shall run in SV mode as trusted is a very good idea.
However, is this convention of the function naming like TRUSTED_... the only possibility to use the trusted functions or may functions like the init functions of Low Level Drivers be used without changing the declaration/Definition of the function (which should be a high amount of work) or using a function wrapper?

Greets Alex

Re: Changing Usermodes

Posted: Mon Nov 17, 2014 2:56 pm
by e.guidieri
Valnar92 wrote:Hi there,

first, thanks for the responses (good timing :) )
I think, that the declaration of the functions which shall run in SV mode as trusted is a very good idea.
However, is this convention of the function naming like TRUSTED_... the only possibility to use the trusted functions or may functions like the init functions of Low Level Drivers be used without changing the declaration/Definition of the function (which should be a high amount of work) or using a function wrapper?

Greets Alex
You need to use wrappers functions, this is the mechanism that has been chosen by AUTOSAR standard and we just follow that.

In any case some refactoring at declaration/definition level need to be done to place the code in the right sections, using MemMap.h header file (as showed by the wiki page linked in my previous post).

Errico