Changing Usermodes

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
Valnar92

Changing Usermodes

Post 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
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Changing Usermodes

Post 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
e.guidieri

Re: Changing Usermodes

Post 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 :)
Valnar92

Re: Changing Usermodes

Post 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
e.guidieri

Re: Changing Usermodes

Post 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
Locked