Received: from eggs.gnu.org ([2001:4830:134:3::10]:42091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWvsu-0000PB-5k for qemu-devel@nongnu.org; Mon, 08 Aug 2016 21:31:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWvsq-00077b-39 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 21:31:12 -0400 Date: Tue, 9 Aug 2016 03:31:05 +0200 (CEST) From: BALATON Zoltan In-Reply-To: <1470702562.3015.32.camel@kernel.crashing.org> Message-ID: References: <1457789937-30923-1-git-send-email-hpoussin@reactos.org> <1470698237.3015.15.camel@kernel.crashing.org> <1470702562.3015.32.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] adb: change handler only when recognized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: =?ISO-8859-15?Q?Herv=E9_Poussineau?= , qemu-devel@nongnu.org, Peter Maydell , qemu-ppc@nongnu.org, programmingkidx@gmail.com On Tue, 9 Aug 2016, Benjamin Herrenschmidt wrote: > On Tue, 2016-08-09 at 02:11 +0200, BALATON Zoltan wrote: >> I don't know much about this but I've read here=C2=A0 >>> that there are thr= ee=C2=A0 >> different kind of chips: CUDA, PMU99 and PMU. Confusingly both PMU-s a= re=C2=A0 >>> called via-pmu by Apple. > > And there's Egret ... ;-) Right, for completeness, but that's only in very old machines we don't=20 emulate in QEMU. >> However, desktop machines have no ADB so I'm not sure why we have=C2=A0 >>> 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 ;-) In what way? Keyboard works. What else is needed? > 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. OK, this is a really nice thing and justifies having an ADB bus. (This=20 would also likely fix mouse problems seen by others.) >> If USB is working then we don't need ADB with PMU99 and=C2=A0 >>> 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=C2=A0 >> beige G3 with CUDA where it works. I think only some Powerbooks have P= MU=C2=A0 >>> and ADB but we are not targeting that. > > Why not ? Just thought emulating all the additional details for Powerbook power=20 management might be difficult. But if you're willing to go there I won't=20 stop you. :-) Obviously you understand this very well so maybe it's not=20 that difficult for you. >> Here's an (untested) patch for >> switching to using USB keyboard and mouse instead of ADB unless USB is= =C2=A0 >> disabled. (The device tree should be changed accordingly in OpenBIOS.)= Not=C2=A0 >> sure if this is helpful. > > Don't bother just yet, as I said, I am reworking all of that code. I wi= ll > probably just create various -machine options so you can chose what bit= s > and pieces you want to put togeher, ie, CUDA, PMU, with or without ADB, > which machine model string to expose to the OS etc... Cool, looking forward to it. Thanks for all the great stuff you did for=20 this and keep it up. Regards, BALATON Zoltan