From: Roy Tam <roytam@gmail.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: seabios@seabios.org, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?)
Date: Fri, 12 Mar 2010 09:17:43 +0800 [thread overview]
Message-ID: <473191351003111717o48ef902ch2c4518a907415c8f@mail.gmail.com> (raw)
In-Reply-To: <20100312005754.GA3327@morn.localdomain>
2010/3/12 Kevin O'Connor <kevin@koconnor.net>:
> On Thu, Mar 11, 2010 at 03:42:28PM +0800, Roy Tam wrote:
>> Sorry I can't find documentation on this usage. But instead I have
>> lots of old programs written with this usage.
>> Using undocumented features from BIOS/DOS is very usual in that time.
>
> Can you confirm these other programs fail in the same way (no keyboard
> input, and "ps2 irq but no data." messages in log when using
> bios.bin-0.5.1-debug-20100228)?
>
>> > It's broken because it causes key presses to be lost and corrupted.
>> > The ps2 port hardware just doesn't work the way that software is
>> > trying to use it.
>> >
>>
>> You said that "it causes key presses to be lost and corrupted" but I
>> haven't heard any complain about this.
>> Real BIOSes (Award BIOS, AMI BIOS, Phoenix BIOS) handle this usage
>> very well and no key press are lost or corrupted.
>
> Under qemu-0.11 normal typing lead to lots of keyboard errors for me.
> It's possible real hardware would be less susceptible to this error,
> but there is nothing that a BIOS inside qemu can do to stop the
> corruption.
>
>> Any key press should generate 4 IRQs, for example when I press [Tab]
>> key, it should have IRQs like this:
>> ps2: data f (status=1d)
>> ps2: data f (status=1c)
>> ps2: data 8f (status=1d)
>> ps2: data 8f (status=1c)
>
> There is one irq on key press and one irq on key release. Your
> debugging output is in a loop and you're reporting the same event
> twice.
>
>> The following patch help people to see irq status and data change:
>
> The current SeaBIOS flow is effectively:
>
> // Read ps2 port status
> u8 status = inb(PORT_PS2_STATUS);
> if (!(status & I8042_STR_OBF))
> // No event in queue - nothing can be dequeued.
> return;
> // Event in queue - dequeue it
> u8 data = inb(PORT_PS2_DATA);
> // Process the event.
> process_ps2byte(status, data);
>
> Your debugging patch is not correct becuase it performs the event
> dequeue before the check to see if there is an event in the queue.
>
I don't care about it. As mentioned in OSDEV wiki (
http://wiki.osdev.org/PS2_Keyboard ):
Note that if you repeatedly read the port 0x60 without waiting for
another IRQ, you'll read the same byte again. That's the 'normal'
behaviour of keyboard controller, [...]
next prev parent reply other threads:[~2010-03-12 1:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 2:04 [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?) Roy Tam
2010-03-08 10:05 ` Jamie Lokier
2010-03-08 11:08 ` Roy Tam
2010-03-08 13:48 ` Roy Tam
2010-03-10 4:48 ` Roy Tam
2010-03-09 15:41 ` Natalia Portillo
2010-03-09 16:09 ` Natalia Portillo
2010-03-10 2:12 ` Kevin O'Connor
2010-03-10 3:49 ` Roy Tam
2010-03-10 4:59 ` Kevin O'Connor
2010-03-10 5:05 ` Roy Tam
2010-03-10 5:55 ` Kevin O'Connor
2010-03-10 5:24 ` Roy Tam
2010-03-11 3:07 ` Kevin O'Connor
2010-03-11 7:42 ` Roy Tam
2010-03-11 8:10 ` Natalia Portillo
2010-03-12 0:57 ` Kevin O'Connor
2010-03-12 1:17 ` Roy Tam [this message]
2010-03-12 16:13 ` Roy Tam
2010-03-13 15:35 ` Kevin O'Connor
2010-03-13 16:00 ` Roy Tam
2010-03-12 23:24 ` [Qemu-devel] PC keyboard emulation (was: Regression: more 0.12 regression (SeaBIOS related?)) Jamie Lokier
2010-03-14 0:44 ` [Qemu-devel] " Kevin O'Connor
2010-03-15 2:47 ` Jamie Lokier
2010-03-15 3:08 ` Kevin O'Connor
[not found] <998502.27470.qm@web15103.mail.cnb.yahoo.com>
[not found] ` <473191351003071956g48c3944fyd3adc3ae6012493c@mail.gmail.com>
2010-03-08 3:57 ` [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?) Roy Tam
-- strict thread matches above, loose matches on Subject: below --
2012-03-06 17:00 Alain Ribière
2012-03-07 13:38 ` Kevin O'Connor
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=473191351003111717o48ef902ch2c4518a907415c8f@mail.gmail.com \
--to=roytam@gmail.com \
--cc=kevin@koconnor.net \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).