Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WALnc-0005gT-P9 for mharc-grub-devel@gnu.org; Mon, 03 Feb 2014 10:51:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WALna-0005cu-H9 for grub-devel@gnu.org; Mon, 03 Feb 2014 10:51:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WALnZ-0008N7-Ht for grub-devel@gnu.org; Mon, 03 Feb 2014 10:51:02 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:42675 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WALnZ-0008Mo-CU for grub-devel@gnu.org; Mon, 03 Feb 2014 10:51:01 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1WALnX-0005V5-RN; Mon, 03 Feb 2014 15:50:59 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WALnX-00061g-25; Mon, 03 Feb 2014 15:50:59 +0000 Date: Mon, 3 Feb 2014 15:50:57 +0000 From: Colin Watson To: Roger Cruz Subject: Re: grub2 code Message-ID: <20140203155057.GA18441@riva.ucam.org> References: <52EE9BBF.3090906@gmail.com> <20140203115746.GA18795@riva.ucam.org> <4BB4E7FB3D5D7B498824D5E3C1D3056522F5BF@FTLPEX01CL01.citrite.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BB4E7FB3D5D7B498824D5E3C1D3056522F5BF@FTLPEX01CL01.citrite.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: Cc: "grub-devel@gnu.org" , Ben Guthro X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 15:51:03 -0000 On Mon, Feb 03, 2014 at 03:44:01PM +0000, Roger Cruz wrote: > This was a bug that was introduced into GRUB when the code to detect > if the SHIFT key is being pressed was added. The symptom was that > customers were complaining that even though they had turn on NUMLOCK > in the BIOS, once we booted our software, NUMLOCK was off. It was > easy to "see" when the bug was happening because the NUMLOCK LED would > turn off sometime during GRUB running. > > I tracked it down to that one line which ANDs the BIOS state area and > blows away the NUMLOCK state in it (it stores the value in the > address in BX via indirect addressing). Oh, of course, I missed the indirect store even on a second reading. I'm pretty sure that the correct fix isn't to remove the code, but rather to use testb instead of andb. I'll see about getting that fixed soon. -- Colin Watson [cjwatson@ubuntu.com]