Low-lewel details of secondary CPU bringup on mac99?
Andrew Randrianasulu
randrianasulu at gmail.com
Fri Mar 7 09:51:36 AEDT 2025
Hello, I see this list mostly for Linux kernel patches, but we are trying
to get two-processor virtual mac99 machine going in qemu, and sadly it does
not work without singlestepping on boot cpu in
smp_core99_kick_cpu()
https://elixir.bootlin.com/linux/v6.12.17/source/arch/powerpc/platforms/powermac/smp.c#L796
just single stepping after switching to second thread/vCPU ends with my
naive gdb script erroring out ;)
Last email in chain on qemu-ppc list:
https://lists.gnu.org/archive/html/qemu-ppc/2025-03/msg00136.html
latest gdb log attached to
https://lists.gnu.org/archive/html/qemu-ppc/2025-03/msg00132.html
MacOS X 10.4.11 strangely works out of the box with two CPUs . Users
reported even macos 9 (with selected applications like Quicktime) works!
I can't test NetBSD/macppc due to some trouble in my crosscompiler? From
netbsd/amd64 machine using standart NetBSD build.sh script. So I put
NetBSD aside for now.
I use 'remote' gdb running in Debian ppc sid/trixie VM on the same
NetBSD/amd64 host.
Linux kernel 6.12.17 was compiled under emulation with localmodconfig where
I changed ext4 and SCSI disk.drivers to be builtin (for faster bootup
without initrd). I disabled CPU_HOTPLUG after disabling sleep/hibernation
support in hope it will help booting second cpu. But I was wrong about
this. Recompiling might take 30 hours or so I prefer to reuse kernel I have
;) I see mac ppc SMP code was not changed much since at least 2.6.24 times
of Gentoo 2008.0 so I hope it works on real machines!
I might spotted typo in comment
https://elixir.bootlin.com/linux/v6.12.17/source/arch/powerpc/kernel/head_book3s_32.S#L239
"/* core99 pmac starts the seconary here by changing the vector, and
putting it back to what it was (unknown_async_exception) when done. */
"
secondary not seconary ?
but apart from this I am mostly clueless how PowerPC works, especially in
those dual G4 machines ....
If you need link to deb of this kernel, .config, qemu/openbios patches, gdb
script - just ask!
Not sure if I should crosspost this back to qemu-ppc list?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20250307/159e6ae7/attachment.htm>
More information about the Linuxppc-dev
mailing list