qemu-ppc
[Top][All Lists]
Advanced

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

OpenMPIC controller emulation in qemu ?


From: Andrew Randrianasulu
Subject: OpenMPIC controller emulation in qemu ?
Date: Wed, 15 May 2024 17:09:44 +0300

I was researching why SMP was disabled in NewWorld mac99 machine in qeumu

There was request some time ago about SMP support ...

https://mail.gnu.org/archive/html/qemu-devel/2023-12/msg00907.html

anyway i digged around a bit and found evidence both freeBSD and openBSD supported SMP on real G4 Macs ...

https://svnweb.freebsd.org/base?view=revision&revision=209767

http://www.undeadly.org/cgi?action="">

and linux at least in 3.x days

https://ubuntuforums.org/archive/index.php/t-1947450.html
====
# cat /proc/cpuinfo
processor : 0
cpu : 7400, altivec supported
temperature : 31-33 C (uncalibrated)
clock : 500.000000MHz
revision : 2.9 (pvr 000c 0209)
bogomips : 49.81

processor : 1
cpu : 7400, altivec supported
temperature : 27-29 C (uncalibrated)
clock : 500.000000MHz
revision : 2.9 (pvr 000c 0209)
bogomips : 49.81

total bogomips : 99.63
timebase : 24907667
platform : PowerMac
model : PowerMac3,3
machine : PowerMac3,3
motherboard : PowerMac3,3 MacRISC2 MacRISC Power Macintosh
detected as : 65 (PowerMac G4 AGP Graphics)
pmac flags : 00000014
L2 cache : 1024K unified
pmac-generation : NewWorld
Memory : 1536 MB
=====

so i looked into Linux src

https://elixir.bootlin.com/linux/latest/source/arch/powerpc/platforms/powermac/pic.c
https://elixir.bootlin.com/linux/latest/source/arch/powerpc/platforms/powermac/smp.c


may be I misread some lines but i think it says while timebase freezing  normally done   via gpio device there IS software fallback?
====
/*
 * SMP G4 use a GPIO to enable/disable the timebase.
 */

static unsigned int core99_tb_gpio;	/* Timebase freeze GPIO */

static void smp_core99_gpio_tb_freeze(int freeze) 

"static void __init smp_core99_setup_i2c_hwsync(int ncpus)"
- i2c was for g5/64 bit CPUs / systems ...
====

also, apparently two MPICs can be cascaded for > 64 iIRQs ...but is it the case on ANY smp-capable  powermac3.x ?

There is github source of darwin driver from Apply, but it all c++ ..

https://github.com/apple-oss-distributions/AppleMPIC/blob/AppleMPIC-1.0/AppleMPIC.cpp

So .. if anyone know any details about what else (apart from nr_cpu property on openpic controller) might be missing  for smp emulation - I can try your ideas :) on  MacOS 10.4.11 and Debian 8.1 virtual  installs ...

reply via email to

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