Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EemSW-0007m9-Q8 for mharc-grub-devel@gnu.org; Tue, 22 Nov 2005 23:42:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EemSU-0007lo-UY for grub-devel@gnu.org; Tue, 22 Nov 2005 23:42:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EemSS-0007lS-Nw for grub-devel@gnu.org; Tue, 22 Nov 2005 23:42:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EemSS-0007lP-Hf for grub-devel@gnu.org; Tue, 22 Nov 2005 23:42:12 -0500 Received: from [209.86.89.69] (helo=smtpauth09.mail.atl.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EemSS-0006p4-Mp for grub-devel@gnu.org; Tue, 22 Nov 2005 23:42:12 -0500 Received: from [63.246.184.80] (helo=[192.168.0.101]) by smtpauth09.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1EemSR-0007XZ-I3 for grub-devel@gnu.org; Tue, 22 Nov 2005 23:42:11 -0500 Mime-Version: 1.0 (Apple Message framework v623) In-Reply-To: <20051121060032.GA9198@panix.com> References: <20051117041735.GD3883@panix.com> <1132207501.2541.26.camel@silence> <20051121060032.GA9198@panix.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <0a6239173435eba5447ba99e0417dc8b@penguinppc.org> Content-Transfer-Encoding: 7bit From: Hollis Blanchard Date: Tue, 22 Nov 2005 22:42:10 -0600 To: The development of GRUB 2 X-Mailer: Apple Mail (2.623) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec79bfa760a3c51ff2fc79385a5791f3a90d350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 Subject: Re: grub-install on powermac newworld 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, 23 Nov 2005 04:42:15 -0000 On Nov 21, 2005, at 12:00 AM, Mike Small wrote: > > This worked for me, and I've enclosed a patch with the a similar loop > to the one used for the linux command. It also has debugging messages > before the grub_claimmap calls. Looks good, thanks! I've just committed this. > I'm wondering though, does it matter very much how grub grabs memory? > Once the operating system takes over it takes all of memory and > whatever grub allocated doesn't matter anymore. Is that correct? Correct. > The > reason I ask is that I tried making that loop retry the claim at every > 4 bytes instead of at every megabyte and found it settled on an > address only four bytes higher than the one it failed on. So maybe > it's possible to be more precise than the code in this patch is. > > My guess would be that open firmware allocates with a resolution of 8 > bytes, at least on my machine. In that second test, the address that > the grub_claimmap failed on was 1b99F84 and the one it succeeded on > was 1b99F88. 1b99F84 was the exact end of the space allocated by the > linux command (at 1400000, size 799f84), so if o.f. grabbed in 8 bytes > increments it would have had up to 1b99F88, causing the failure. > Plausible? Hmm, yeah, that's a good theory. On the one hand, it would be easy to align the initrd address up (to say a 4KB boundary), and that would avoid this problem. On the other hand, the loop solves the more general case, and I guess that solves this particular problem too. The increment (1MB) does seem a bit excessive, but on the other hand we could have really run into an area reserved by firmware itself, which is likely to be several MB at least. After initially being tempted to muck with it, I'm now inclined to leave the code as-is (until the next person reports a problem ;). Thanks! -Hollis