qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [PATCH] adb: change handler only when recogn


From: Benjamin Herrenschmidt
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] adb: change handler only when recognized
Date: Tue, 09 Aug 2016 10:29:22 +1000

On Tue, 2016-08-09 at 02:11 +0200, BALATON Zoltan wrote:
> I don't know much about this but I've read here 
> > <http://mcosre.sourceforge.net/docs/apple_io.html> that there are three 
> different kind of chips: CUDA, PMU99 and PMU. Confusingly both PMU-s are 
> > called via-pmu by Apple.

And there's Egret ... ;-)

No really we don't care. There's more than 2 kinds in fact, it's just
depends whatever microcontroller's in there. But it's the same
protocol. It's always connected to the VIA.

>  I think we want PMU99 which is found on desktop 
> machines and not PMU found in Powerbooks (unless we want to emulate that) 
> > because PMU99 has less features and more similar to CUDA.

PMU99 doesn't have "less" features, it's the same in the desktop G4 and
a PowerBook G4. I will eventually add some of the powerbook'ish
features so we can support sleep ...

>  But it has some 
> differences such as a different interrupt mentioned in this page and maybe 
> > others.

The different interrupt is just a hack they did with KeyLargo ASIC,
instead of using the VIA CB1, it uses a GPIO to signal that the OS
needs to fetch interrupt conditions, but that's about it. The basic VIA
SR interrupt is still used for the basic shifting.

>  However, desktop machines have no ADB so I'm not sure why we have 
> > one still in QEMU.

Because PowerBooks do (or rather a PMU-simulation of ADB) and MacOS
doesn't care. If ADB is in the device-tree, it will use it. It makes
things easier to support multiple combinations especially when
"comparing" things for debug.

Additionally, USB doesn't work well in OpenBIOS at this point ;-)

Also, I have some evil plan to change the way ADB autopoll works in
Qemu so that the devices signal the PMU when they want to talk. That
will avoid having yet another 30-something HZ timer ticking in qemu,
and in that regard will probably be more efficient (read: slows down
the emulator less) than OHCI.

>  If USB is working then we don't need ADB with PMU99 and 
> > that could resolve all the problems with it.

I have solved the ADB problems so there's nothing left to solve here :-
) But see above why I think it's a good idea to keep ADB as an option.

>  We can keep it to old world 
> beige G3 with CUDA where it works. I think only some Powerbooks have PMU 
> > and ADB but we are not targeting that.

Why not ?
>  Here's an (untested) patch for
> switching to using USB keyboard and mouse instead of ADB unless USB is 
> disabled. (The device tree should be changed accordingly in OpenBIOS.) Not 
> sure if this is helpful.

Don't bother just yet, as I said, I am reworking all of that code. I will
probably just create various -machine options so you can chose what bits
and pieces you want to put togeher, ie, CUDA, PMU, with or without ADB,
which machine model string to expose to the OS etc...

Cheers,
Ben.

> > --



reply via email to

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