Re: [hatari-devel] m68k Linux under Hatari

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


Hi,

On 3/1/20 12:06 AM, Eero Tamminen wrote:
On 2/29/20 6:53 PM, Toni Wilen wrote:
<snip>

(There seems to be something fishy in kernel <->
userspace interface, I've seen Linux to use
use exception handling liberally when accessing
all kinds of things, instead of it e.g. checking
for NULL pointers etc.  And for some reasons that
still doesn't work properly in Hatari.)

hard to tell what's going on with just this kernel dump.

<snip>

Also enable MMU debugging (mmu_common.h #define MMUDEBUG 1 and
cpummu030.h #define MMU030_DEBUG 1)

After that, sources need to be patched to avoid
compilation error.  I used attached patch, but
I have no idea what would be the correct fix.

I didn't see any MMU debug output when triggering
those Linux Oopses.


Earlier there were also randomly occurring issues,
but I haven't used new Hatari version enough so
that I could say whether those still happen or
not.

They still happen:
----------------------------
VFS: Mounted root (ext2 filesystem) readonly on device 8:0.
devtmpfs: mounted
Freeing unused kernel memory: 112K
This architecture does not have kernel memory protection.
Run /init as init process
Data read fault at 0xefed8ed8 in Super Data (pc=0x2a60)
BAD KERNEL BUSERR
Oops: 00000000
PC: [<00002a60>] user_inthandler+0x0/0x20
SR: 2d00  SP: (ptrval)  a2: 8017b1f8
d0: 00000018    d1: 8014c8aa    d2: 8017b1f8    d3: 8017b214
d4: 8017b1a4    d5: 8017b1f8    a0: efed8ed8    a1: 00000000
Process exe (pid: 30, task=(ptrval))
Frame format=B ssw=0345 isc=ffff isb=2f00 daddr=efed8ed8 dobuf=efed8ed8
baddr=efed8ed8 dibuf=efed8ed8 ver=0
Stack from 009b7ff8:
        02088005 7c5e0114
Call Trace:
Code: 2f00 4eb9 0000 2b5c 508f 60ff ffff ff64 <42a7> 4878 ffff 2f00 48e7 7ce0 200f 0280 ffff e000 2440 2452 e9ef 010a 0032 0440
----------------------------


	- Eero

--- a/src/cpu/cpummu030.c
+++ b/src/cpu/cpummu030.c
@@ -3058,7 +3058,7 @@ void m68k_do_rte_mmu030 (uaecptr a7)
 				write_log(_T("68030 MMU MOVEM %04x retry but MMU030_STATEFLAG1_MOVEM2 was already set!?\n"), mmu030_opcode);
 			}
 		}
-		if (idxsize >= 0 && mmu030_ad[idxsize].done) {
+		if (idxsize >= 0 && idxsize >= idxsize_done) {
 			write_log(_T("68030 MMU ins %04x retry but it was already marked as done!?\n"), mmu030_opcode);
 		}
 #endif
@@ -3526,7 +3526,7 @@ void m68k_do_rte_mmu030c (uaecptr a7)
 				write_log(_T("68030 MMU MOVEM %04x retry but MMU030_STATEFLAG1_MOVEM2 was already set!?\n"), mmu030_opcode);
 			}
 		} else {
-			if (idxsize >= 0 && mmu030_ad[idxsize].done) {
+			if (idxsize >= 0 && idxsize >= idxsize_done) {
 				write_log(_T("68030 MMU ins %04x retry but it was already marked as done!?\n"), mmu030_opcode);
 			}
 		}


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