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 ]


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?


	- Eero

PS. sources can be gotten with:
$ git clone --depth 1 --branch v6.8 \
  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

And kernel built from it easily on Debian:
$ cd linux
$ cp hatari/tools/linux/kernel.config .config
$ sudo apt install bc bison flex gcc-m68k-linux-gnu
$ ARCH=m68k CROSS_COMPILE=m68k-linux-gnu- make -j4 vmlinux

[1] input files for Hatari:

-------- panic.ini ----------
setopt --trace cpu_symbols
history cpu 256
profile on
a panic
-----------------------------

--------- lilo.cfg ----------
[LILO]
Kernel = vmlinux
Symbols = System.map
Args = video=atafb:sthigh console=tty
KernelToFastRam = FALSE
Ramdisk =
-----------------------------



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