[En-Nut-Discussion] arm port (RFC: Changing ARM mode)

Alain M. alainm at pobox.com
Tue Jan 13 19:39:25 CET 2009


Rocendo Bracamontes del toro escreveu:
> 
>   void NutSleep (uint32_t ms)
>    {
>        ENTRY_KERNEL_MODE(); // change mode to supervisor when applicable
> 
>       ..... code execute at kernel level here ....
> 
>        EXIT_KERNEL_MODE(); exit supervisor mode, enter user mode when
> applicable
>   }

I am no expert in the matter, but in my undertanding this is not very 
good. The problem is that SWI is a CALL, not a command has one parameter 
for the function and parametters have to be fetch from the user stack. 
This calls for an entire different achitecture.

Alain



More information about the En-Nut-Discussion mailing list