amiberry icon indicating copy to clipboard operation
amiberry copied to clipboard

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

Open solskogen opened this issue 2 years ago • 12 comments
trafficstars

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

solskogen avatar Nov 14 '23 18:11 solskogen

Same with Processor slot Fast RAM

solskogen avatar Nov 14 '23 18:11 solskogen

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

midwan avatar Nov 14 '23 20:11 midwan

Raspberry Pi 5, Raspberry Pi OS bookworm aarch64.

solskogen avatar Nov 14 '23 20:11 solskogen

Happens only when JIT is enabled.

solskogen avatar Nov 14 '23 20:11 solskogen

amiberry_crash.log

midwan avatar Nov 14 '23 21:11 midwan

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!

midwan avatar Nov 14 '23 21:11 midwan

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

solskogen avatar Nov 15 '23 07:11 solskogen

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

midwan avatar Dec 20 '23 15:12 midwan

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

solskogen avatar Dec 20 '23 16:12 solskogen

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

midwan avatar Dec 20 '23 16:12 midwan

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.

midwan avatar Apr 05 '24 18:04 midwan

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.

cmitu avatar May 05 '24 14:05 cmitu