From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QsBWE-0004oO-42 for mharc-grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsBWB-0004o2-Uj for grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QsBWA-00088M-Nf for grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:39 -0400 Received: from alius.ayous.org ([78.46.213.165]:36950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsBWA-00088I-J8 for grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:38 -0400 Received: from eos.turmzimmer.net ([2001:a60:f006:aba::1]) by alius.turmzimmer.net with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QsBW9-0001bT-Jf for grub-devel@gnu.org; Sat, 13 Aug 2011 10:32:38 +0000 Received: from aba by eos.turmzimmer.net with local (Exim 4.69) (envelope-from ) id 1QsBW4-0001hz-0m for grub-devel@gnu.org; Sat, 13 Aug 2011 12:32:32 +0200 Date: Sat, 13 Aug 2011 12:32:31 +0200 From: Andreas Barth To: The development of GNU GRUB Subject: Re: Loongson 2E boot failure Message-ID: <20110813103231.GP2657@mails.so.argh.org> References: <20110726131229.GA30427@riva.dynamic.greenend.org.uk> <20110726152502.GA3028@riva.dynamic.greenend.org.uk> <4E2EE59C.8080305@gmail.com> <20110726161932.GB3028@riva.dynamic.greenend.org.uk> <4E4522C1.9010508@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4E4522C1.9010508@gmail.com> X-Editor: Vim http://www.vim.org/ User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 78.46.213.165 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: Sat, 13 Aug 2011 10:32:40 -0000 * Vladimir 'φ-coder/phcoder' Serbinenko (phcoder@gmail.com) [110812 15:15]: > On 03.08.2011 13:21, Robert Millan wrote: > > 2011/7/26 Colin Watson : > >>> Looks like memory allocations are wrong. Try hardcoding heap at e.g. > >>> 81000000-82000000 > >> Sorry, I've not had to mess with this before. Can you point me to what > >> I'd need to change to hardcode a specific heap region? > > Try replacing grub_machine_mmap_iterate() with something like: > > > > grub_err_t > > grub_machine_mmap_iterate (grub_memory_hook_t hook) > > { > > hook (0x81000000, 82000000, GRUB_MEMORY_AVAILABLE); > > return GRUB_ERR_NONE; > > } > > > This code is wrong for at least 4 reasons: > 1) 0x8.... is just to access kseg0, it's not part of physical address > 2) second argument is a size, not end > 3) and it's lacking 0x > 4) on yeeloong memory init doesn't use mmap. > Correct way is to replace: > grub_mm_init_region ((void *) modend, (grub_arch_memsize << 20) > - (modend - GRUB_ARCH_LOWMEMVSTART)); > with: > grub_mm_init_region (0x81000000, 16 << 20); No real behaviour change - still fails within grub_font_init (using the for(;;);-method). Only change compared with http://lists.gnu.org/archive/html/grub-devel/2011-07/msg00085.html is that the last line on the vga console is now 80211ebc 7091181e .word 7091181e # ...p Andi