From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: "Hervé Poussineau" <hpoussin@reactos.org>,
qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
qemu-ppc@nongnu.org, programmingkidx@gmail.com
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] adb: change handler only when recognized
Date: Tue, 09 Aug 2016 10:29:22 +1000 [thread overview]
Message-ID: <1470702562.3015.32.camel@kernel.crashing.org> (raw)
In-Reply-To: <alpine.BSF.2.20.1608090128080.83074@zero.eik.bme.hu>
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.
> > --
next prev parent reply other threads:[~2016-08-09 0:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-12 13:38 [Qemu-devel] [PATCH] adb: change handler only when recognized Hervé Poussineau
2016-03-12 14:31 ` Programmingkid
2016-03-12 15:24 ` Mark Cave-Ayland
2016-03-12 17:44 ` Hervé Poussineau
2016-03-12 18:13 ` Programmingkid
2016-03-12 20:31 ` Hervé Poussineau
2016-03-13 16:06 ` Peter Maydell
2016-08-08 23:17 ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2016-08-09 0:11 ` BALATON Zoltan
2016-08-09 0:29 ` Benjamin Herrenschmidt [this message]
2016-08-09 1:31 ` BALATON Zoltan
2016-08-09 4:06 ` Benjamin Herrenschmidt
2016-08-09 9:35 ` Howard Spoelstra
2016-08-09 10:26 ` BALATON Zoltan
2016-08-09 11:49 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1470702562.3015.32.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=balaton@eik.bme.hu \
--cc=hpoussin@reactos.org \
--cc=peter.maydell@linaro.org \
--cc=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).