Received: from [140.186.70.92] (port=35822 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaEfc-0001Tx-Oe for qemu-devel@nongnu.org; Tue, 04 Jan 2011 16:43:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaEfb-00020L-0C for qemu-devel@nongnu.org; Tue, 04 Jan 2011 16:43:56 -0500 Received: from cantor2.suse.de ([195.135.220.15]:35929 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaEfa-0001zy-8N for qemu-devel@nongnu.org; Tue, 04 Jan 2011 16:43:54 -0500 Subject: Re: [Qemu-devel] [FYI 4/4] prep: Quickfix for ioport Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=iso-8859-1 From: Alexander Graf In-Reply-To: <06F1AEA4-4D78-4CFB-AE94-4708ACA3C6B9@web.de> Date: Tue, 4 Jan 2011 22:43:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1292287758-8009-1-git-send-email-andreas.faerber@web.de> <1292287758-8009-2-git-send-email-andreas.faerber@web.de> <1292287758-8009-3-git-send-email-andreas.faerber@web.de> <1292287758-8009-4-git-send-email-andreas.faerber@web.de> <1292287758-8009-5-git-send-email-andreas.faerber@web.de> <10D66610-0198-4208-AA02-6CBBBCEAA264@web.de> <215DD9D0-00F1-47CC-927F-AE5326D4C51E@web.de> <86FCC93A-1042-4A68-86BE-17FFD6E3AAC6@suse.de> <06F1AEA4-4D78-4CFB-AE94-4708ACA3C6B9@web.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Andreas_F=E4rber?= Cc: =?iso-8859-1?Q?Herv=E9_Poussineau?= , QEMU Developers -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04.01.2011, at 22:36, Andreas F=E4rber wrote: > Am 04.01.2011 um 21:57 schrieb Alexander Graf: >=20 >> On 27.12.2010, at 01:25, Andreas F=E4rber wrote: >>=20 >>> Am 27.12.2010 um 01:11 schrieb Alexander Graf: >>>=20 >>>> Am 27.12.2010 um 00:28 schrieb Andreas F=E4rber = : >>>>=20 >>>>> Am 14.12.2010 um 01:49 schrieb Andreas F=E4rber: >>>>>=20 >>>>>> Workaround the following error: >>>>>>=20 >>>>>> qemu: hardware error: register_ioport_read: invalid opaque >>>>>=20 >>>>> I found out that this is a conflict with i8042 registering I/O = port 0x0092 in pckbd.c, too. >>>>> Not sure what the proper fix should look like - add some qdev = property to ISAKBDState to disable the port? >>>>=20 >>>> Well, why does the PREP board have its own mapping there in the = first place? It should be the same as a PC from a port pov, no? >>>=20 >>> Why does the i8042 controller have a System Control Port in the = first place rather than the 'pc' machine? :) >>>=20 >>> The PReP spec v1.1 has a Special Port 0x0092 that includes two bits = of significence - softreset and endian mode. So wherever the port is = registered, the latter behavior is board-specific and does not match = pckbd.c (A20 gate or HDD activity depending on bit numbering). >>>=20 >>> A similar issue arises between PReP machines: The ioport currently = does not allow using a different opaque for reads and writes to the same = address. So either we need to change ioport or create some = inheritence/override mechanism for port behavior. >>=20 >> Hmm - sounds to me like that register simply doesn't belong there = then, so a split would be the correct solution. The alternative would be = to have the keyboard controller create a bus that those bits send = signals to. An x86 system could then implement its A20 gate in x86 = specific code while PREP could do its specific stuff. >=20 > Coincidentally there's a recent pckbd patch from Blue that resolves = the conflict. Feel free to review. :) Ah, sorry :). Still catching up. Just now finished to watch news of the = last 1 1/2 weeks :). > Any thoughts on the read vs. write port issue? Do we need to register = both ports in the base device and add hooks to the device state? Sounds = problematic VMState-wise, just like some of the qemu_irq constructs in = the ppc devices. (My prep_pci changes are still far from perfect, = UniNorth has similar issues I noticed.) Well, the general idea is that a single IO always gets routed to the = same device. I don't fully understand why you need separate handlers = there tbh. Mind to explain this? Alex -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) iEYEARECAAYFAk0jlJcACgkQq7Wi27wfN1N/agCeL6hOC6c+DHjLQ7Q3uXsp1Clo x94An0lSzs/kvXGynRy1y2UMmLwpltp1 =3DNkaJ -----END PGP SIGNATURE-----