Re: [hatari-devel] Linux boot freeze with Hatari git on 040/060 + MMU + CPU prefetch/cache

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


Le 15/03/2024 à 23:57, Eero Tamminen a écrit :
Hi,

On 15.3.2024 12.38, Nicolas Pomarède wrote:
Le 15/03/2024 à 11:30, Eero Tamminen a écrit :
...
[1] If CPU caches & prefetch are enabled, very early on boot Linux double bus errors on 060, and freezes on 040. Same happens also with v2.4.1 though, so it's not a regression.

could be useful to get traces about this, even if it's not a regression.

Using "panic.ini" & "lilo.cfg" from [1]:
-----------------------------
$ hatari --parse panic.ini --log-level debug --fast-forward on \
   --machine falcon --cpulevel 4 --vme none --dsp none --fpu internal \
   --cpuclock 32 --mmu on -s 14 --ttram 64 --addr24 off --cpu-exact on \
   --compatible on --natfeats on -c lilo.cfg --lilo "debug=nfcon"
...
console_flush_all
console_srcu_read_lock
console_srcu_read_unlock
__srcu_read_unlock
__printk_safe_enter
up
__printk_safe_exit
wake_up_klogd
make_task_dead
panic
1. CPU breakpoint condition(s) matched 1 times.
     pc = $2a3e5e
Finalizing costs for 6 non-returned functions:
- 1. 0x2a3e5e: make_task_dead +0x27b49a (panic +0x0)
- 2. 0x00495e: die_if_kernel +0x46
- 3. 0x004aac: trap_c +0x140
- 4. 0x002356: config_atari -0x3a53f8 (trap +0x1a)
- 5. 0x3a6baa: setup_arch +0x1b8
- 6. 0x3a3f3e: start_kernel +0x44
-----------------------------


With 060, panic happens in same place, but through several traps, which may explain the eventual double bus error:
-----------------------------
...
console_flush_all
console_srcu_read_lock
console_srcu_read_unlock
__srcu_read_unlock
__printk_safe_enter
up
__printk_safe_exit
wake_up_klogd
make_task_dead
panic
1. CPU breakpoint condition(s) matched 1 times.
     pc = $2a3e5e
Finalizing costs for 33 non-returned functions:
- 1. 0x2a3e5e: make_task_dead +0x27b49a (panic +0x0)
- 2. 0x00495e: die_if_kernel +0x46
- 3. 0x004aac: trap_c +0x140
- 4. 0x002356: sched_clock -0x43c68 (trap +0x1a)
- 5. 0x049c12: vprintk_store +0x50
- 6. 0x04af3e: vprintk_emit +0x76
- 7. 0x04afe0: vprintk_default +0x14
- 8. 0x04b1bc: vprintk +0x40
- 9. 0x2a4714: _printk +0xc
- 10. 0x0049de: trap_c +0x72
- 11. 0x002356: sched_clock -0x43c68 (trap +0x1a)
- 12. 0x049c12: vprintk_store +0x50
- 13. 0x04af3e: vprintk_emit +0x76
- 14. 0x04afe0: vprintk_default +0x14
- 15. 0x04b1bc: vprintk +0x40
- 16. 0x2a4714: _printk +0xc
- 17. 0x0049de: trap_c +0x72
- 18. 0x002356: sched_clock -0x43c68 (trap +0x1a)
- 19. 0x049c12: vprintk_store +0x50
- 20. 0x04af3e: vprintk_emit +0x76
- 21. 0x04afe0: vprintk_default +0x14
- 22. 0x04b1bc: vprintk +0x40
- 23. 0x2a4714: _printk +0xc
- 24. 0x0049de: trap_c +0x72
- 25. 0x002356: sched_clock -0x43c68 (trap +0x1a)
- 26. 0x049c12: vprintk_store +0x50
- 27. 0x04af3e: vprintk_emit +0x76
- 28. 0x04afe0: vprintk_default +0x14
- 29. 0x04b1bc: vprintk +0x40
- 30. 0x2a4714: _printk +0xc
- 31. 0x3a78de: config_atari +0x190
- 32. 0x3a6baa: setup_arch +0x1b8
- 33. 0x3a3f3e: start_kernel +0x44
-----------------------------


does it work if cpu cache is not enabled but prefetch or cycle exact are enabled ?  ie, is it cpu cache taht cause the problem ?

There's panic in same place regardless of whether "--compatible on" or "--cycle-exact on" is used.

How do I enable cycle-exact, but not cache emulation, I thought "--cpu-exact" option controls both?



Hi

my bad, there's no option for that :(
but in src/m68000.c you can add at line 396

changed_prefs.cpu_data_cache = false

to force data cache off in all cases ; then if you can test again, this could tell if problem is in cache or not (if it doesn't works with cache off, it doesn't mean there's no problem in cache, but at least it narrows the parts to look at first)



Nicolas




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