From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IFxYv-0005Li-S2 for mharc-grub-devel@gnu.org; Tue, 31 Jul 2007 15:39:21 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IFxYu-0005LF-Ia for grub-devel@gnu.org; Tue, 31 Jul 2007 15:39:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IFxYs-0005Jo-UX for grub-devel@gnu.org; Tue, 31 Jul 2007 15:39:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFxYs-0005JW-7P for grub-devel@gnu.org; Tue, 31 Jul 2007 15:39:18 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IFxYr-0002pa-LY for grub-devel@gnu.org; Tue, 31 Jul 2007 15:39:17 -0400 Received: from [192.168.10.6] (helo=aragorn) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IFxYm-0007dr-SA; Tue, 31 Jul 2007 21:39:13 +0200 Received: from rmh by aragorn with local (Exim 4.63) (envelope-from ) id 1IFxc0-0005g4-GB; Tue, 31 Jul 2007 21:42:32 +0200 Date: Tue, 31 Jul 2007 21:42:32 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20070731194232.GA19385@aragorn> References: <20070725200805.GA17393@aragorn> <20070727080500.GA17986@aragorn> <20070727103310.GA1539@powerlinux.fr> <20070727191514.GA3461@aragorn> <20070729193011.GA7033@aragorn> <20070730201138.GA27359@aragorn> <20070731143823.GA16557@aragorn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: Genre and OS details not recognized. Cc: Sven Luther Subject: Re: [PATCH] efika memory issues 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: Tue, 31 Jul 2007 19:39:20 -0000 On Tue, Jul 31, 2007 at 10:55:09AM -0500, Hollis Blanchard wrote: > On 7/31/07, Robert Millan wrote: > > On Mon, Jul 30, 2007 at 05:35:28PM -0500, Hollis Blanchard wrote: > > > > When GRUB_IEEE1275_FLAG_EFIKA_SECRET_AVAILABLE_REGION was set, > > > > release hardcoded 0x4000:0xffc000 region. > > > > > > Hmm, does this actually work? Since GRUB itself falls within that > > > regions, the grub_ieee1275_release() call will mark all the memory > > > that the GRUB kernel and modules occupy as free, which means they will > > > be clobbered by heap usage. > > > > Didn't think of this.. (by chance it worked here, though). How about using > > max(_end,0x4000) instead of 0x4000 ? > > > > (and adjusting region length not to overflow 0x1000000) > > That won't quite work because the modules are loaded in the area > immediately following the kernel. However, because they are added in a > post-processing step, we don't know their end address at link time. > > I think the simplest solution will be to allocate Efika's heap high, > as we talked about earlier. If the first "available" region is above > 4MB, just reserve 4MB and don't worry about where it is. In general we > should try to keep 4MB free, but at the end of the day it's Efika's > fault and probably won't be a big deal for them anyways. Ok, let's do that. But what do we do if the first available region is just a few kBs below 4MB? Or if it's just too small? I think we need to determine what is the minimum heap size we want to accept, such that the ability to keep 4MB free still compensates having a small heap. Any suggestion? -- Robert Millan My spam trap is honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list.