Re: [hatari-devel] 68030 MMU emulation: TEMPLMON, ROMSPEED

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


Am 05.11.2012 um 19:07 schrieb Uwe Seimet:

> Hi,
> 
>> I've tried to recreate the problem with your config file, but still -
>> both programs are working for me. Are you using any AUTO folder
>> programs or something similar (ACCs) ? 
> 
> Even without AUTO folder and ACCs I have problems. After starting
> TEMPLMON and pressing Ctrl-Help (in order to call TEMPLMON) Hatari
> freezes (PMMU emulation is switched on). This is the last debug output I
> get:
> 
> CPU Root Pointer: 8000000200000700
> Table A at 00000700: index = 0, Next descriptor: 0000074A
> Table B at 00000740: index = 0, Next descriptor: 000007CA
> Table C at 000007C0: index = 0, Next descriptor: 00000019
> Early termination page descriptor!
> Logical address unused bits: 00050000 (mask = 000F8000)
> Page at 00050000
> ATC is full. Replacing entry 15
> ATC create entry(15): logical = 00050000, physical = 00050000, FC = 5
> ATC create entry(15): B = 0, CI = 0, WP = 0, M = 1
> CPU Root Pointer: 8000000200000700
> Table A at 00000700: index = 0, Next descriptor: 0000074A
> Table B at 00000740: index = 0, Next descriptor: 000007CA
> Table C at 000007C0: index = 0, Next descriptor: 00000019
> Early termination page descriptor!
> Logical address unused bits: 00030000 (mask = 000F8000)
> Page at 00030000
> ATC create entry(7): logical = 00030000, physical = 00030000, FC = 5
> ATC create entry(7): B = 0, CI = 0, WP = 0, M = 1
> 

Here i can't see any MMU failure. At least nothing is reported in the logs.
Maybe this crashes for some other reason?

> ROMSPEED might work with the current Hatari, at least it does not crash
> anymore. It's a bit hard to tell whether it actually works because you
> can not easily notice that it is active ;-).
> 
> I can still crash Hatari with yet another program using the PMMU. I
> cannot provide the sources or the binary at the moment, there might be
> copyright issues. I will have to check that. Anyway, this is the debug
> output I get before Hatari terminates:
> 
> ATC create entry(10): logical = 00E10000, physical = 00E10000, FC = 6
> ATC create entry(10): B = 0, CI = 0, WP = 0, M = 0
> CPU Root Pointer: 8000000200000700
> Table A at 00000700: index = 0, Next descriptor: 0000074A
> Table B at 00000740: index = 0, Next descriptor: 003D509A
> Table C at 003D5090: index = 0, Next descriptor: 003D50DA
> Table D at 003D50D0: index = 0, Next descriptor: 00000009
> Page at 00000000
> ATC create entry(3): logical = 00000000, physical = 00000000, FC = 5
> ATC create entry(3): B = 0, CI = 0, WP = 0, M = 1
> MMU: page fault (logical addr = 00DBCEEE)
> Longjumping /home/us/hatari/hatari/src/cpu/cpummu030.c in 1490
> Gotcha! 2 /home/us/hatari/hatari/src/cpu/newcpu.c in 3354
> Exception_mmu 00e1370a 00e13708 00dbceee
> PTESTR: addr = 00DBCEEE, fc = 2, level = 7, do not return descriptor
> CPU Root Pointer: 8000000200000700
> Table A at 00000700: index = 0, Next descriptor: 0000074A
> Table B at 00000740: index = 0, Next descriptor: 003D509A
> Table C at 003D5090: index = 13, Next descriptor: 003D575A
> Table D at 003D5750: index = 23, Next descriptor: 00DB801D
> Page at 00DB8000
> PTEST status: 0A04, B = 0, L = 0, S = 0, W = 1, I = 0, M = 1, T = 0, N =
> 4
> PMOVE: read MMUSR 0A04
> MMU: page fault (logical addr = 00DBCEEA)
> Longjumping /home/us/hatari/hatari/src/cpu/cpummu030.c in 1490
> Gotcha! 2 /home/us/hatari/hatari/src/cpu/newcpu.c in 3354
> Exception_mmu 00e1370a 00e13708 00dbceea
> MMU: page fault (logical addr = 00DB8000)
> Longjumping /home/us/hatari/hatari/src/cpu/cpummu030.c in 1490
> Gotcha! 2 /home/us/hatari/hatari/src/cpu/cpummu030.c in 1843
> Gotcha! 2 /home/us/hatari/hatari/src/cpu/cpummu030.c in 1843
> Gotcha! 2 /home/us/hatari/hatari/src/cpu/newcpu.c in 3354
> Exception_mmu 00e1370a 00e13708 00db7ffe
> try stack underflow...
> 

It seems to me, that we have a problem with THROW_AGAIN. It is called from cpummu030.c, line 1850 inside mmu030_put_long_unaligned.
I think this happens: mmu030_put_word generated a page fault, it is thrown and catched in line 1843. It continues until reaching THROW_AGAIN in line 1850 and then jumps back to line 1843. The second call of THROW_AGAIN seems to work an jumps to newcpu.c. Because we did throw 3 times with only two TRYs this will cause an underflow in the end when reaching ENDTRY.
Something must be wrong with THROW_AGAIN.
I hope to be able to find this problem. I'll take a look at it as soon as possible.

> That's all, after that Hatari simply terminates.
> 
>> Do you have by any chance another GCC version (or Clang) installed on
>> your system? It could also be worth a try to use another compiler, just
>> to be sure that we're not hunting compiler problems here.
> 
> Currently there is no stable clang available for my gentoo system, and
> I would like to wait before installing it until I know whether you can
> reproduce the problem with TEMPLMON. My guess is that you did not press
> Ctrl-Help?
> 
> Take care
> 
> Uwe
> 
> 




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