[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
STiNG & MiNT "bug"
Hi,
I mailed Peter R, the STiNG author, about details on this and got an
information. From what I understood his mail, Peter uses the privilege
violation handler to switch his code to supervisor mode. I.e. there's
apparently some code in STiNG that is designed to run in both user and
supervisor mode (he didn't explain what for), and this code, before
executing other privileged instructions, uses ori #0,sr. This causes the
privilege violation exception to be taken, then STiNG privilege violation
handler recovers from it and the code continues execution in supervisor
mode.
The conflict between STiNG and MiNT is that our kernel installs own
privilege violation handler at the begin of the XBRA chain, so STiNG's
handler, if it was loaded before MiNT, gets masked out and that ori #0,sr
causes a real privilege violation exception. Peter wants us to fix the
MiNT so that it would install its privilege violation handler at the end
of the XBRA chain (i.e. just before the ROM handler), so that STiNGs
handler might survive MiNT loading.
My question is if we really should do it. At least, the privilege
violation handler is a part of fatal error recovery mechanism in the
system and I am not sure if it should be used for such things as STiNG
does. So I have an impression that there's no bug in MiNT at this point,
the kernel does good stuff intercepting this vector arbitrarily.
At the other hand I can see no objections, perhaps except that I am not
sure how does it behave on a real privilege violation exception caused by
a buggy or old 68000 program.
Konrad M.Kokoszkiewicz
mail:draco@bl.pg.gda.pl
http://www.orient.uw.edu.pl/~conradus/
** Quem Iuppiter vult perdere, dementat prius.
*******************************************************
** Kogo Jowisz chce zgubic, temu wpierw rozum odbiera.