On Sat, 2009-06-27 at 13:25 +0200, Robert Millan wrote:
> Hi,
> 
> Pavel pointed out earlier that sometimes when starting on i386-qemu GRUB
> receives spurious events from AT keyboard.

Yes, it's still happening, but not always.  Approximately half of the
time I'm getting "2" at the prompt.

>   It seems that it is the role
> of the firmware to flush this buffer at startup.
> 
> Unless someone has a better idea, I would fix this with:
> 
>   - Moving at_keyboard to kernel on i386-qemu.
> 
>   - [ifdef GRUB_MACHINE_QEMU]: flush the input buffer at at_keyboard
>     startup by reading and discarding events for a fixed amount of time.

I would just read and discard the keyboard data from the port at startup
without embedding at_keyboard.

> I don't like that we have a race here.  Suggestions welcome on how to
> improve that, but TTBOMK if there's more than one event you can't tell
> when you're processing the last one.

I think there is at most one event.  And I suspect it's due to a qemu
bug.  Or at least qemu could do better by starting in the same state
every time.

-- 
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to