[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Memory protection for the FireBee?
On 26/08/2015 10:51, markus@mubf.de wrote:
Its not only that the Coldfire MMU is different from the m68k MMU's,
it's that it is _totally_ different.
Excellent description, Markus!
This is the first time that the MMU facts are clearly exposed.
... and - just to add another level of complexity - Linux (and other
decent operating systems) for sure don't have stupid system calls
like Super() that allow arbitrary user processes to go into
supervisor mode at their own desire and open up a supervisor stack at
arbirtrary memory addresses.
Maybe the situation is not so bad.
Why do people want to use memory protection?
Answer: to safely run clean software. And clean user software usually
don't switch to supervisor.
I saw in FreeMiNT sources something like "fake supervisor mode". From
what I understood, when that mode is enabled Super() does not really
switch to supervisor mode. It does some black magic (privilege violation
handler?) to get the program running, anyway. This can be acceptable if
the program just executes a few instructions in supervisor mode, such as
reading TOS variables. Maybe I'm completely mistaken, these are only old
reminiscences in my mind.
So IF FreeMiNT's "fake supervisor mode" works as I understood, it may be
a solution to workaround all supervisor stack trouble with MMU enabled:
FreeMiNT could take care of its own stacks, and the user programs would
never really switch to supervisor mode, anyway.
BTW, why is it so important to enable memory protection on the FireBee?
Sure, that would be cleaner, but would it change something for real users?
--
Vincent Rivière