From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODi5a-00063P-KZ for qemu-devel@nongnu.org; Sun, 16 May 2010 13:57:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODi5Y-00017X-N0 for qemu-devel@nongnu.org; Sun, 16 May 2010 13:57:22 -0400 Received: from mail2.shareable.org ([80.68.89.115]:48913) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODi5Y-00017N-Ez for qemu-devel@nongnu.org; Sun, 16 May 2010 13:57:20 -0400 Date: Sun, 16 May 2010 18:57:17 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH 0/2] pckbd improvements Message-ID: <20100516175717.GB29814@shareable.org> References: <4BEFBE03.9090003@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paolo Bonzini , qemu-devel Blue Swirl wrote: > On 5/16/10, Paolo Bonzini wrote: > > On 05/15/2010 11:49 AM, Blue Swirl wrote: > > > > > In 2/2, A20 logic changes a bit but I doubt any guest would be broken > > > if A20 line written through I/O port 92 couldn't be read via i8042. > > > The reverse (write using i8042 and read port 92) will work. > > > > > > > Why take the risk? > > The alternative is to route a signal from port 92 to i8042. Or maybe > port 92 should belong to i8042, that could make things simpler but > then the port would appear on non-PC architectures as well. > > But I doubt any OS would depend on such details, because the details > seem to be murky: > http://www.win.tue.nl/~aeb/linux/kbd/A20.html It's not hard to imagine some DOS memory driver or 286/386 DOS extender expecting to read the bit, if that's normal on PCs. The earlier PCs didn't have port 92h, so presumably older DOS software uses the keyboard controller exclusively. The details are murky, but on the other hand, I remember back in day, A20 line was common knowledge amongst DOS hackers on 286s and 386s, and the time I remember it from, port 92h was not available, so it can't have been too murky to use the i8042. i8042 emulation isn't the same on PC on a non-PC because of the PC-specific wiring (outside the chip), such as its ability to reset the motherboard. I don't see that it makes sense for qemu to pretend there are no differences at all. Or, perhaps it makes sense to imply different GPIO wiring, separate from the i8042 itself. On the other hand, something which makes sense to me: In a PC, are port 92h and i8042's outputs OR'd together or AND'd together to control A20 proper? Then they'd be two independent signals, and shouldn't mirror each other. -- Jamie