From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IZkt4-00067X-B2 for qemu-devel@nongnu.org; Mon, 24 Sep 2007 06:09:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IZkt0-00066J-R7 for qemu-devel@nongnu.org; Mon, 24 Sep 2007 06:09:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZkt0-00066G-Mh for qemu-devel@nongnu.org; Mon, 24 Sep 2007 06:09:54 -0400 Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IZkt0-0002Eq-Ch for qemu-devel@nongnu.org; Mon, 24 Sep 2007 06:09:54 -0400 Received: from relay4.usu.ru ([194.226.235.39]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IZksm-0005Wt-Lh for qemu-devel@nongnu.org; Mon, 24 Sep 2007 06:09:41 -0400 Received: from relay4.usu.ru (localhost [127.0.0.1]) by relay4.usu.ru (PostSystem) with ESMTP id 9915E17E34 for ; Mon, 24 Sep 2007 16:10:44 +0600 (YEKST) Received: from usu2.usu.ru (usu2.usu.ru [194.226.237.16]) by relay4.usu.ru (PostSystem) with ESMTP id 930C217E34 for ; Mon, 24 Sep 2007 16:10:43 +0600 (YEKST) Received: from usu2.usu.ru (localhost.usu2.usu.ru [127.0.0.1]) by usu2.usu.ru (Postfix) with ESMTP id 24E27A7EBA for ; Mon, 24 Sep 2007 16:07:38 +0600 (YEKST) Received: from ums.usu.ru (ums.usu.ru [194.226.236.116]) by usu2.usu.ru (Postfix) with ESMTP id 8A10CA7EB0 for ; Mon, 24 Sep 2007 16:07:27 +0600 (YEKST) Message-ID: <46F78C55.9060607@ums.usu.ru> Date: Mon, 24 Sep 2007 16:07:17 +0600 From: "Alexander E. Patrakov" MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] QEMU keyboard issue with Gujin-2.2 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello, if one attempts to use the Gujin bootloader inside qemu (even today's snapshot), one gets a message about unknown key being pressed. The easiest way to reproduce the issue is to download install-2.2.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=15465, unpack the tarball, and run "qemu -fda boot.144". The bottom of the screen will flash with the message about unknown command. This message does not show up in Bochs and on real hardware. I also recompiled Gujin from source (gujin-2.2.tar.gz) and added code to print information about each call to the 0x16 BIOS interrupt to the parallel port. According to this log, Gujin does the following: # prints: Debug active! sizeof MOUSE: 512, sizeof UI: 384, Initial VESA name check: Video card changed, reset VGA parameter. # Get shift flags AH=0x02 => result: AL=0x00 (i.e., no shift flags) # keyb.com keyboard capabilities check AH=0x92 => AH=0x80 (i.e., enhanced keyboard functions are supported) # keyb.com keyboard capabilities check AH=0xa2 => AH=0xa2 (i.e., 122-key keyboard functions are not supported) # prints: sizeof struct UTIL_str 640, sizeof struct memalloc_str 408. max_IDE_found 10, max_freelist 64, max_disk 15, max_partition 64 sizeof struct diskparam_str 256, sizeof struct partition_str 64, sizeof struct freelist_str 16, sizeof struct IDE_found_str 8. Reset all BIOS disks for BIOS to acknowledge changes:returns 0x0, status 0x0 sizeof struct desc_str: 64, sizeof struct BOOTWAY_str: 16 {FAT12 on disk 0 part 5 with type 0x4!} {strange: PhysicaldriveNb = 0x0 instead of 0x80} {FAT12 on disk 2 part 5 with type 0x4!} # check for enhanced keystroke AH=0x11 => AH=0x11, AL set to 0 by the setnz instruction (i.e., no key) # Then the check is repeated many times with the same "no key" result (because I press no keys). So far so good. # ..... # Then, for some strange reason, the same call returns that a key is pressed: # check for enhanced keystroke AH=0x11 => AH=0x43, AL set to 1 by the setnz instruction that immediately follows int 0x16 in the Gujin source # get enhanced keycode AH=0x10 => AH=0x43, AL=0x00 (here is a problem - I pressed nothing!) # goes to graphical mode # prints: best_max_width: found mode index 3 (maxwidth 640) out of UI.nbmode = 16 [get_refresh_freq: timeout after 49999] # Then it begins to loop the following two calls: # check for enhanced keystroke AH=0x11 => AH=0x43, AL set to 1 by the setnz instruction that immediately follows int 0x16 in the Gujin source # get enhanced keycode AH=0x10 => AH=0x43, AL=0x00 (here is a problem - I pressed nothing!) I.e., this looks like a "garbage in, garbage out" problem, not a Gujin bug - BIOS reports non-existing keypress to Gujin in qemu. Could you please fix qemu, or at least tell me how to debug further? -- Alexander E. Patrakov