qemu-ppc
[Top][All Lists]
Advanced

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

Re: mac99 SMP


From: Jd Lyons
Subject: Re: mac99 SMP
Date: Sat, 15 Mar 2025 12:02:53 -0400

We need to understand there properties:
CPU0
soft-reset              00000071 
gpio-mask               00000001 
gpio-value              00000001 
performance-monitor-cnt-enable 00000072 
timebase-enable         00000073 
gpio-parent             ff95c318

I implemented the gpio-parent as the value just points to the phadle of /pci/mac-io/gpio, but the rest of them I’m not sure what the value should be to for out emulated gpio?
CPU1
soft-reset              00000072 
gpio-mask               00000001 
gpio-value              00000001 
timebase-enable         00000073 
cpu-interrupt-enable    00000074 
gpio-parent             ff95c318 


Likely pointing to the timebase-enable offset will fix some things with Linux and Mac OS 9.
On Mar 15, 2025, at 11:11 AM, Andrew Randrianasulu <randrianasulu@gmail.com> wrote:

On Tue, Mar 11, 2025 at 12:18 AM Andrew Randrianasulu
<randrianasulu@gmail.com> wrote:

On Mon, Mar 10, 2025 at 11:37 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:

On Mon, 10 Mar 2025, Andrew Randrianasulu wrote:
вс, 9 мар. 2025 г., 15:36 BALATON Zoltan <balaton@eik.bme.hu>:
On Sun, 9 Mar 2025, Howard Spoelstra wrote:
On Sun, Mar 9, 2025 at 12:38 PM Andrew Randrianasulu <
randrianasulu@gmail.com> wrote:
I also noticed that  default gtk3 display tend to "freeze" mouse in
SMP OS
9.2.2 guest, but -display sdl worked fine so far. Set up host ftp
server
for file transfers.

Maybe Howard would be interested in that. But I think his builds also
use
SDL, but seen this problem on Windows and macOS not Linux.BALATON
Zoltan


On Windows host: with smp SDL also freezes after some time: we loose
either
mouse clicks or movement.
The via=pmu defaults to using usb kbd/mouse. via=pmu-adb provides the pmu
but with adb kdb/mouse. That doesn't seem to crash.
To make things more complicated: OSX 10.0 and 10.1 will have no mouse
when
running with via=pmu. This seems due to some USB problem, so even when
the

We have debugged this USB problem a few years ago and I think the problem
was that those early OSX versions try to detect devices by powering the
ports down and up and expect connected events from connected devices but
QEMU does not emulate port power management so these connect events won't
be generated. It could be fixed but I haven't written a patch and hoped
somebody else would do that but it seems nobody did so far. It shouldn't
be too hard, just need to get acquainted with the code in
qemu/hw/usb/hcd-ohci.c, read the OHCI docs and implement the bits that
power down the port and generate connect events when the port is powered
up. Somebody who's interested to fix this could do that. This info was on
the list back when we debugged it too so already known for a few years.



Do you think it should be put in official qemu bugtracker, if not already?
I mean usb power up/down for OHCI ?

Should screamer patch get its tracking bug too?

I don't know if anybody cares about the QEMU bugtracker for these
machines. The maintainer is Mark and he's aware of the problems just
doesn't have time to do much about them. Not sure having a bug would
change that. (Maybe he forgot about this USB issue but now reminded :-) )

Any other bugs/incomplete features?

Probably a lot of them, some may already have tickets but who will fix
them?

Semirelated - does g3 machine works for you right now? I think I got
blackscreen but may be it was  just messed up by me ....

Haven't tried for a while but maybe the patched openbios does not work
with it in case you replaced that in pc-bios?

Yeah, seems to be just
./qemu-system-ppc -M g3beige works

and

./qemu-system-ppc -M g3beige -bios ~/K38_sdcard1/Documents/openbios-qemu-smp.elf

not ....



Interesting news!

I tried -icount mode and  now qemu seems to bring up secondary cpu in linux!

But -icount incompatible with -accel tcg,thread=multi

[    0.348805]  channel 2 bus <multibus>
[    0.349086] Processor timebase sync using GPIO 0x73
[    0.349253] mpic: requesting IPIs...
[    0.350149] CPU0: L2CR is 0
[    0.368310] rcu: Hierarchical SRCU implementation.
[    0.368445] rcu:     Max phase no-delay instances is 1000.
[    0.371401] Timer migration: 1 hierarchy levels; 8 children per
group; 1 crossnode level
[    0.388645] smp: Bringing up secondary CPUs ...
smp_core99_kick_cpu
[    0.398119] PowerMac call feature: 1
smp_core99_kick_cpu done
[    0.399977] PowerMac init caches!
[    0.399977]
[    0.400017] CPU1: L2CR was 0
[    0.400099] CPU1: L2CR set to 0
[    0.457990] smp: Brought up 1 node, 2 CPUs

~/src/qemu/build/qemu-system-ppc64 -bios ~/obj-ppc/openbios-qemu.elf
-M mac99,via=pmu  -kernel ~/boot/vmlinux  -L /usr/pkg/share/qemu/  -d
guest_errors,unimp -nographic -icount shift=4,align=off,sleep=off -cpu
g4 -append "console=ttyPZ0" -smp 2

but in this version I also increased mdelay to 10 from 1 in original code

https://elixir.bootlin.com/linux/v6.12.17/source/arch/powerpc/platforms/powermac/smp.c#L827

it does not work without -icount or with unmodded kernel



Regards,
BALATON Zoltan


reply via email to

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