From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1L7vXt-0008Mm-6H for mharc-grub-devel@gnu.org; Wed, 03 Dec 2008 12:29:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7vXs-0008MV-B0 for grub-devel@gnu.org; Wed, 03 Dec 2008 12:29:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7vXq-0008LO-IW for grub-devel@gnu.org; Wed, 03 Dec 2008 12:29:51 -0500 Received: from [199.232.76.173] (port=60344 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7vXq-0008LG-E7 for grub-devel@gnu.org; Wed, 03 Dec 2008 12:29:50 -0500 Received: from c60.cesmail.net ([216.154.195.49]:19464) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1L7vXq-0006cQ-2J for grub-devel@gnu.org; Wed, 03 Dec 2008 12:29:50 -0500 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 03 Dec 2008 12:29:46 -0500 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 758C934C6D; Wed, 3 Dec 2008 12:36:08 -0500 (EST) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <1228321247.4049.0.camel@dv> References: <1227556704.7585.2.camel@manoel-laptop> <1227562245.28878.12.camel@dv> <20081128194041.GC7980@thorin> <1228321247.4049.0.camel@dv> Content-Type: text/plain Date: Wed, 03 Dec 2008 12:29:44 -0500 Message-Id: <1228325384.4049.22.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 (2.22.3.1-1.fc9) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Carlos Roberto do Nascimento Costa Subject: Re: [PATCH] Compilation PowerPC64 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: Wed, 03 Dec 2008 17:29:52 -0000 On Wed, 2008-12-03 at 11:20 -0500, Pavel Roskin wrote: > r1923 has no "out of memory" problem. r1924 doesn't compile. I think I understand something now. "out of memory" is caused by heap_init() inside grub_claim_heap() failing due to memory overlap (by the way, I hate functions inside functions). In r1923: _start=0x10000 _end=0x23640 addr=0x200000 (addr + len)=0x3fffff In r1933: _start=0x200000 _end=0x213658 addr=0x200000 (addr + len)=0x3fffff Thus, we have an overlap. This is caused by r1928. Changing the link address in conf/powerpc-ieee1275.rmk from 0x200000 to 0x100000 makes _start equal 0x100000 and resolves the "out of memory" problem. The "addr" variable comes from HEAP_MIN_SIZE, and it's also 0x200000. I'm testing PowerPC code in qemu, which doesn't provide the memory information, so the problem may not exist on real machines. If linking at 0x200000 is important, we could allocate heap after _end. -- Regards, Pavel Roskin