Re: [hatari-devel] Hatari hangs with NVDI when MMU is enabled

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 05/10/2018 à 19:41, Uwe Seimet a écrit :
Hi,

I reproduced the issue seen by christian, after some debugging /
tracing, the problem is that cache state was not consistent in the case
of 68030 + mmu with more_compatible=off and cycle_exact=off.
Some functions were accessing memory through the data cache, other were
not, so in the end the value written to change trap's vector was not
seen by the exception handler :(

After discussing with Toni, this options' combination is in fact not
valid : data cache emulation requires either more_compatible or
cycle_exact, so if none are set, data cache emulation should be disabled

The problem would the same with 68030 and no mmu, but in that case the
code path is different and data cache is not used by cpu emulation even
if it was enabled, which explain why there was no crash.

Change was committed to disable cache when necesary, with or without MMU.

Please, test if NVDI works better now.

I'm afraid there is no change. When I switch on PMMU support only (no
prefetch, no cycyle exact) NVDI still hangs. Maybe I misunderstand what
you wrote above, but just PMMU only should work now, shouldn't it?


Let's see if it works better for christian when he can test this too (or other people used to nvdi)

I have to admit, I do not understand why these options are not
independent, and why enabling the PMMU and *either* cycle exact *or*
prefetch changes the behavior. This sounds like an intransparent
side-effect to me


data cache emulation is very cpu intensive, so it's not enabled when neither "more compatible/prefetch" nor "cycle exact" are enabled.

this way you can get "fast" 68030 with MMU emulation if you don"t care about emulating cache (which should not affect programs, unless they really try to access/manipulate the data cache, which is rare)

The bottom line is that whatever setting / accuracy level you choose, data cache behaviour should not make the program crash.

Nicolas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/