Re: [hatari-devel] Linux user-space crashes |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On 19.6.2024 18.54, Nicolas Pomarède wrote:
I made some tries with --ide-master bb-rootfs.img (CPU MMU is enabled in
all cases) :
- no prefetch, no CE, no data cache : 'ls' works, no segfault
- prefetch, no CE, no data cache : segfault
- CE, no data cache : segfault
- no prefetch, no CE, data cache ON : no segfault
This looks different to what you wrote "has never behaved correctly when
data-cache is enabled", because in my tests I see that it works with
data cache and the cause of the segfault would be related to the
difference between normal and prefetch (as CE also includes prefetch we
can leave it on the side for now)
Could you check if you still get segfault with data cache on and no
prefetch / no CE ?
If both CE & prefetch are disabled, so is data-cache.
If data-cache _is_ allowed without them (see attached patch), then Linux
kernel crashes already when it reaches init:
---------------------
....
Run /init as init process
with arguments:
/init
with environment:
HOME=/
TERM=linux
BOOT_IMAGE=vmlinux
random: crng init done
watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [init:30]
---------------------
- Eero
diff --git a/src/m68000.c b/src/m68000.c
index 05028391..818220fd 100644
--- a/src/m68000.c
+++ b/src/m68000.c
@@ -389,12 +389,8 @@ void M68000_CheckCpuSettings(void)
changed_prefs.cachesize = 0;
/* while 020 had i-cache, only 030+ had also d-cache */
- if (changed_prefs.cpu_model < 68030 ||
- !ConfigureParams.System.bCpuDataCache ||
- !(changed_prefs.cpu_compatible || changed_prefs.cpu_cycle_exact))
+ if (changed_prefs.cpu_model < 68030)
changed_prefs.cpu_data_cache = false;
- else
- changed_prefs.cpu_data_cache = true;
/* Update SPCFLAG_MODE_CHANGE flag if needed */
check_prefs_changed_cpu();