Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WAI9y-0004s0-Rt for mharc-grub-devel@gnu.org; Mon, 03 Feb 2014 06:57:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAI9w-0004oO-8C for grub-devel@gnu.org; Mon, 03 Feb 2014 06:57:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAI9u-00077w-Vy for grub-devel@gnu.org; Mon, 03 Feb 2014 06:57:52 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:60829 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAI9u-00077q-QK for grub-devel@gnu.org; Mon, 03 Feb 2014 06:57:50 -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 1WAI9t-0001LD-1b; Mon, 03 Feb 2014 11:57:49 +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 1WAI9r-0004xi-Iy; Mon, 03 Feb 2014 11:57:47 +0000 Date: Mon, 3 Feb 2014 11:57:46 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: grub2 code Message-ID: <20140203115746.GA18795@riva.ucam.org> References: <52EE9BBF.3090906@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52EE9BBF.3090906@gmail.com> 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: 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 11:57:53 -0000 On Sun, Feb 02, 2014 at 07:25:51PM +0000, Robert Parnell wrote: > I was just looking at the grub2 source code and saw that > https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/grub2/trusty/view/head:/TODO > > says to contact with questions. > I was looking at the source because I encountered a bug on my machine > that has been previously reported > (https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1027694) and > thought I'd have a look to see if I could find the problem. > So I have 2 questions: > 1. Is the code on launchpad the up to date code? It's an automatically-imported version of the Ubuntu packaging. It's up-to-date with what we're shipping, yes, but we do our work in git these days. The upstream code is here: http://git.savannah.gnu.org/gitweb/?p=grub.git ... and the packaging used by both Debian and Ubuntu is here (the "experimental" branch is most current): http://anonscm.debian.org/gitweb/?p=pkg-grub/grub.git > 2. Line 177 of > https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/grub2/trusty/view/head:/grub-core/boot/i386/pc/startup_raw.S > > is a function that flushes the keyboard buffer, could this be what is > causing the bug? That seems unrelated. Ben's patch referenced in https://savannah.gnu.org/bugs/?34547 touches code that I wrote and that I maintain as a patch, so this would presumably be my problem to fix. But I don't understand why Ben's patch fixes anything related to NumLock. The code being commented out is essentially: movw $(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR + 0x17), %bx andb $3, (%bx) ... followed by something that tests the condition flags. But all that does is test whether either Shift key is held down, not actually set the NumLock state (see http://www.bioscentral.com/misc/bda.htm). That is, it reads from the BIOS Data Area, but it doesn't write to it. Ben (CCed), could you shed some light on why your patch would fix this? Thanks, -- Colin Watson [cjwatson@ubuntu.com]