[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Super()
Hi!
Few days ago there was a discuss about disabling supermode etc. We agreed,
that the way of doing it, that makes sense, is to let programs continue in
user mode after Super()/Supexec(), catch possible exceptions with the
exception handler, and emulate the expected behaviour if it is proved safe.
There are only two exceptions that count: this is the privilege violation
and the bus error.
The privilege violation seems easy. However, the bus error is much worse.
The Motorola 68030 manual states that:
"(while initiating the bus error exception) the processor ... saves the
vector offset, program counter and the internal copy of the status register
on the stack. The saved program counter value is the logical address of the
instruction that was executing at the time the fault was detected. This is
NOT NECESSARILY the instruction that initiated the bus cycle, since the
processor overlaps execution of instructions."
In other words, when the mid-instruction bus error occurs, the stacked PC
may or may not point to the offending instruction. I guess, that this will
be mainly the case for writes, not reads, but I am not 100% sure. And this
is 68030, on newer models it can be only worse, I am afraid.
Anyways, when the stacked PC does not point to the right place, instruction
decoding and checking, what is the fault's cause, does not seem possible to
be done in software.
Any ideas?
--
CVV
Konrad M.Kokoszkiewicz, http://draco.atari.org
** Ea natura multitudinis est,
** aut seruit humiliter, aut superbe dominatur.
** Taka to już natura pospólstwa, albo służalczo się płaszczy,
** albo bezczelnie się panoszy. (Liwiusz XXIV, 25).