Subject: Re: CAS and 020 bus error (was: Amiga 3000 video strangeness - next thing)
To: None <port-m68k@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: port-m68k
Date: 06/07/2007 22:11:30
frank@phoenix.owl.de (Frank Wille) writes:

>Michael van Elst wrote:

>> frank@phoenix.owl.de (Frank Wille) writes:
>> 
>>> I guess it gets into trouble when running into a bus-fault
>>> (MMU-exception) while executing CAS. I don't know if the exception
>>> handler is prepared to emulate the entire read-modify-write cycle of this
>>> instruction?
>> 
>> The 68020 (unlike the 68040) is supposed to rerun the complete
>> instruction.

>That explains it. Code for this special case is obviously missing.

The 68020 (and also 68030) does rerun the cas instruction after
the bus error handler returns. No special code is necessary.


>I made a test and compiled sys/arch/m68k/m68k/lock_stubs.s for 68010, and
>the kernel booted without problems!

Therefore I guess that there is no exception.


-- 
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."