On Wed, 19 Feb 2025, Jd Lyons wrote:
This is the patch against the current master of qemu, it should apply clean now, but things changed a little a few days ago and I had to fix the patch.
[patch cut]
I’m thinking we already had a race condition on mac99,via=pmu and smp just made it worse.
What makes you think that?
The IPI code in OpenPIC likely needs some work too to clear some issues with smp.
The openpic code apparently works with the ppce500 machine with multiple CPUs so unless the Mac does something different or has a different openpic implementation it should be generally working even with SMP so I'm not sure it's within openpic or somewhere else. (Although e500 uses a different variant so it could be the problem is only with the variant Mac machines use. This would be selected by the mpic_version in openpic emulation so code guarded by that could be inspected.)
These patches are NOT Ready For Primetime by any means, I didn’t write them, they came from the list and emasculation forums.
Who wrote the patch? If they are not cc'd not much use to comment on it. I also did not find the discussion on the emaculation.com/forum so can't guess how you ended up with this patch.
I’ve looked them over and tested them and made a bunch of changes trying to get IDE working so we can boot an OS, but no luck, the IRQ storm and race condition screws up everything but video and you can’t mount any media on the IDE bus once you load a kernel, even OS 9’s nonaKernel.
Set debug to true in the openpic.c and you’ll get spammed with the IRQ storm.
It's not an error in itself to see a lot of interrupts especially when loading something from a disk where in PIO mode you can get an interrupt for each sector or transfer so the question is rather if these interrupts end up at the right CPU and handled there correctly. Hopefully Linux would log if there was something off but I don't know and haven't seen the logs.
I also don't see anything in the patch to connect the GPIO to CPU reset. How did you solve the stuck CPU problem then?
Regards, BALATON Zoltan