From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpEPa-0004Rw-3X for qemu-devel@nongnu.org; Wed, 10 Mar 2010 00:24:50 -0500 Received: from [199.232.76.173] (port=47012 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpEPZ-0004Rh-Oy for qemu-devel@nongnu.org; Wed, 10 Mar 2010 00:24:49 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NpEPZ-0006RF-0G for qemu-devel@nongnu.org; Wed, 10 Mar 2010 00:24:49 -0500 Received: from mail-pv0-f173.google.com ([74.125.83.173]:36897) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NpEPY-0006R2-Ju for qemu-devel@nongnu.org; Wed, 10 Mar 2010 00:24:48 -0500 Received: by pvf33 with SMTP id 33so76848pvf.4 for ; Tue, 09 Mar 2010 21:24:47 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20100310045942.GC29054@morn.localdomain> References: <473191351003071804x62acae0bk3f967b6be1f22a54@mail.gmail.com> <20100310021220.GB29054@morn.localdomain> <473191351003091949j6f3fbf98jadc87405876db214@mail.gmail.com> <20100310045942.GC29054@morn.localdomain> From: Roy Tam Date: Wed, 10 Mar 2010 13:24:27 +0800 Message-ID: <473191351003092124o382bddc8m80df4676c048ec0a@mail.gmail.com> Subject: Re: [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?) Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel 2010/3/10 Kevin O'Connor : > On Wed, Mar 10, 2010 at 11:49:48AM +0800, Roy Tam wrote: >> 2010/3/10 Kevin O'Connor : >> > SeaBIOS has a wealth of debugging information that could help solve >> > these issues. >> >> Tried this this BIOS and 2 debug logs generated. >> seabios-debug.log is booting fdos0138.img and closes QEMU after boots to prompt. >> seabios-debug-2.log is booting fdos0138.img and type something and >> Illegal Instruction occurred. > > I don't see an "Illegal Instruction" message. Instead, I see the > keyboard just not working. What qemu version and what command line > did you use? latest git today. when you type fast. > > I've tracked down why keys are lost on SeaBIOS and not lost on Bochs > BIOS. The fdos0138.img code is taking over the irq handler for the > ps2 port hardware irq. When the irq fires, it reads the ps2 port for > the key data and then calls the bios irq handler assuming it will > reread the key and process it. However, SeaBIOS reads the ps2 port > status indicator and finds that there is no data pending (because the > key was already read by the fdos0138.img irq handler). > > Bochs BIOS just reads the data from the ps2 port and assumes it is for > the keyboard. SeaBIOS verifies the data being read and wont process > random data from the port. > > What the fdos0138.img image is doing is broken - once it reads the key > from the ps2 port, nothing stops a new key from being read the next > time something reads from the port. Indeed, although the keyboard > works in qemu-0.11 for fdos0138.img, if one types fast they'll see > duplicate and lost keys. > But it is how programs(Chinese/Japanese/Korean Display Systems, GW-BASIC, etc.) in the past get input from keyboard. "Consider" legacy as "broken" is wrong IMHO.