[En-Nut-Discussion] arm port (RFC: Changing ARM mode)
Harald Kipp
harald.kipp at egnite.de
Thu Jan 15 18:14:52 CET 2009
I'll try to summarize our status. Please read this carefully and let me
know if something is missing or misunderstood.
1. Running in supervisor mode like now is plain wrong. At least the
application code should use the user mode registers.
2. Running applications in user mode is optimal, but the current code
wouldn't work anymore because NutEnterExitCritical() changes CPSR.
3. A final decision about how to switch to what mode when entering
kernel routines need further discussion and probably a sample for
testing. A preferable approach is to make this configurable, so the
application developer may decide.
4. Like item 3 regarding kernel routines, to some extend the same is
valid for interrupt routines. Application developers may prefer to run
interrupt routines in user mode for nesting interrupts.
5. As a first action we can change all ARM related crt routines to
properly set the user stack and enter NutInit in system mode. This is
easily done and shouldn't harm existing code.
Harald
More information about the En-Nut-Discussion
mailing list