Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ic1aC-0007F6-7e for mharc-grub-devel@gnu.org; Sun, 30 Sep 2007 12:23:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ic1aA-0007Bp-5c for grub-devel@gnu.org; Sun, 30 Sep 2007 12:23:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ic1a5-00074W-2z for grub-devel@gnu.org; Sun, 30 Sep 2007 12:23:46 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ic1a4-00073u-OQ for grub-devel@gnu.org; Sun, 30 Sep 2007 12:23:44 -0400 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Ic1a3-0000tr-P5 for grub-devel@gnu.org; Sun, 30 Sep 2007 12:23:44 -0400 Received: (qmail invoked by alias); 30 Sep 2007 16:23:39 -0000 Received: from 77-56-83-245.dclient.hispeed.ch (EHLO radix.peter.home) [77.56.83.245] by mail.gmx.net (mp036) with SMTP; 30 Sep 2007 18:23:39 +0200 X-Authenticated: #228032 X-Provags-ID: V01U2FsdGVkX1+xjdEAJo+xkdCAwWNTc5KxEBHDtnm1c2BY9SZFs4 NxVJlyMzL5rnTb Date: Sun, 30 Sep 2007 18:23:38 +0200 From: Simon Peter To: grub-devel@gnu.org Message-Id: <20070930182338.6218a461.dn.tlp@gmx.net> X-Mailer: Sylpheed 2.4.4 (GTK+ 2.10.13; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: Multiboot2 doesn't work 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: Sun, 30 Sep 2007 16:23:50 -0000 Hi, I built a Multiboot2 compliant kernel, but GRUB2 (current CVS) crashes when loading (not booting) it (i.e. as soon as I execute the multiboot command on it). I assert this is a bug in GRUB2, as it should print out an error message if there's something wrong with my image. I traced the bug back to the grub_elf32_load_segment() function in kern/elf.c: GRUB2 correctly detects the Multiboot2 and ELF32 headers and tries to load the first (and only) loadable segment of the ELF32 program header, which it also correctly detects (debug printout shows correct addresses). It crashes while trying to call the load_hook function pointer, which is given as a parameter and should be pointing to grub_mb2_arch_elf32_hook() in loader/i386/pc/multiboot2.c and that pointer seems to be invalid. I tried to print out the memory address of the grub_mb2_arch_elf32_hook() function from within grub_elf32_load_segment() for comparison, but this makes grub-mkimage segfault, so I cannot generate a test GRUB2 image including the printout. I'm stuck at this point and would like to ask the knowledgable GRUB2 developers to have a look at this bug. Thanks, Simon