From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MKW2H-00043g-2e for mharc-grub-devel@gnu.org; Sat, 27 Jun 2009 07:25:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKW2E-00042i-B1 for grub-devel@gnu.org; Sat, 27 Jun 2009 07:25:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKW29-00040e-CT for grub-devel@gnu.org; Sat, 27 Jun 2009 07:25:29 -0400 Received: from [199.232.76.173] (port=36135 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKW28-00040S-N2 for grub-devel@gnu.org; Sat, 27 Jun 2009 07:25:25 -0400 Received: from aybabtu.com ([69.60.117.155]:58281) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MKW28-0006Bs-Cm for grub-devel@gnu.org; Sat, 27 Jun 2009 07:25:24 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MKUyh-0007ku-0Y for grub-devel@gnu.org; Sat, 27 Jun 2009 12:17:47 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MKW25-0007SF-ON for grub-devel@gnu.org; Sat, 27 Jun 2009 13:25:21 +0200 Date: Sat, 27 Jun 2009 13:25:21 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20090627112521.GA28637@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Subject: at_keyboard flush on i386-qemu X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2009 11:25:30 -0000 Hi, Pavel pointed out earlier that sometimes when starting on i386-qemu GRUB receives spurious events from AT keyboard. 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 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. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."