qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mac99 SMP


From: BALATON Zoltan
Subject: Re: mac99 SMP
Date: Sun, 30 Mar 2025 18:41:06 +0200 (CEST)

On Sun, 30 Mar 2025, Jd Lyons wrote:
Balaton, do you think we need to adjust it for GPIO 15 and 16 as well?

I think so but talk to Mark about how this could be merged in QEMU.

Full context:

/* --- Connect GPIO reset IRQs for secondary CPUs --- */
   s = SYS_BUS_DEVICE(object_resolve_path_component(macio, "gpio"));
   if (machine->smp.cpus > 1) {
       /* CPU1 reset: use GPIO 4 */
       kick = qemu_allocate_irq(cpu_kick, cpus[1], 1);
       sysbus_connect_irq(s, 4, kick);
   }
   if (machine->smp.cpus > 2) {
       /* CPU2 reset: use GPIO 5 */
       kick = qemu_allocate_irq(cpu_kick, cpus[2], 2);
       sysbus_connect_irq(s, 15, kick);
   }
   if (machine->smp.cpus > 3) {
       /* CPU3 reset: use GPIO 6 */
       kick = qemu_allocate_irq(cpu_kick, cpus[3], 3);
       sysbus_connect_irq(s, 16, kick);
   }
   for (i = 0; i < 4; i++) {
       qdev_connect_gpio_out(uninorth_pci_dev, i,
                             qdev_get_gpio_in(pic_dev, 0x1b + i));
   }

I think for that it has to be cleaned up a lot like doing the above in a look instead of separate ifs checking if there are more CPUs.

Maybe try to get the needed openbios changes cleaned up and merged first because without those these changes in QEMU won't work anyway.

Also this probably won't work to allow SMP for G5 as that may be slightly different. Linux has g5_reset_cpu and core99_reset_cpu functions that do almost the same but G5 does not have default values so it needs the soft-reset properties and checks the macio type and fail if they don't match the expected so these would need to be fixed to get it work on G5 too. (But to boot MacOS X on G5 a lot more else need to be fixed so maybe you should not care about G5 for now and just make G4 work first.)

Regards,
BALATON Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]