All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] QEMU keyboard issue with Gujin-2.2
Date: Mon, 24 Sep 2007 16:07:17 +0600	[thread overview]
Message-ID: <46F78C55.9060607@ums.usu.ru> (raw)

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

             reply	other threads:[~2007-09-24 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24 10:07 Alexander E. Patrakov [this message]
2007-09-24 17:37 ` [Qemu-devel] QEMU keyboard issue with Gujin-2.2 Stefan Weil
2007-09-25  5:45   ` [Qemu-devel] " Alexander E. Patrakov
  -- strict thread matches above, loose matches on Subject: below --
2007-10-11  8:49 [Qemu-devel] " Etienne Lorrain
2007-10-14  2:12 ` WaxDragon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46F78C55.9060607@ums.usu.ru \
    --to=patrakov@ums.usu.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.