BlitterStudio / amiberry-lite

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
5 stars 0 forks source link

8MB (or more) Motherboard Fastram with JIT and KMS triggers crash #5

Open solskogen opened 1 year ago

solskogen commented 1 year ago

With a A4000 or A4000T quickstart, adding 8MB or more Motherboard Fast ram crashes amiberry.

solskogen commented 1 year ago

Same with Processor slot Fast RAM

midwan commented 1 year ago

This is something I cannot recreate, at least on the x86_64 version I'm testing with. We're going to need more specifics

solskogen commented 1 year ago

Raspberry Pi 5, Raspberry Pi OS bookworm aarch64.

solskogen commented 1 year ago

Happens only when JIT is enabled.

midwan commented 1 year ago

amiberry_crash.log

midwan commented 1 year ago

It doesn't happen on my Pi400, but I think I narrowed down when it probably happens. I've made a small change in the commit above (in a separate branch), give it a try when you can and see if that helps or not!

solskogen commented 12 months ago

To make matters worse: It does not happen in sway or X11. Only in KMS.

midwan commented 10 months ago

@solskogen does this happen on the preview branch? That one uses a completely different memory allocation routine, so maybe it helps

solskogen commented 10 months ago

Does that mean we have JIT for aarch64 on preview now? :-)

midwan commented 10 months ago

Doh, I forgot this only happens with JIT - never mind :)

midwan commented 7 months ago

Did some more testing today. This is not related to the memory allocation, but rather to something in the JIT implementation, in combination perhaps with newcpu. When this is triggered, the memory address retrieved in newcpu, seems to be invalid. Not sure why, but I suspect something in the JIT implementation, since it was designed to hit the memory directly at all times.

The preview branch has JIT for x86, but that's the "proper" version with indirect memory access if direct is not possible. I expect that one will work normally with KMSDRM as well.

cmitu commented 6 months ago

Maybe something similar to https://github.com/raspberrypi/bookworm-feedback/issues/107 ? You can try switching to a 4k page kernel by adding kernel=kernel8.img to /boot/firmware/config.txt and rebooting.