grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for PPC Old World Macintosh


From: Hollis Blanchard
Subject: Re: patch for PPC Old World Macintosh
Date: Mon, 30 Aug 2004 21:12:11 -0500

On Aug 30, 2004, at 11:17 AM, Marco Gerards wrote:

Hollis Blanchard <address@hidden> writes:

Did you had the chance to test your code on a new world mac?  If not,
I will do so.

I haven't, no.

I see that you are claiming all memory available.  This is really nice
but we need to consider two things when doing this.

1) It all needs to be freed.  Currently I did not free the claimed
   memory (shame on me).

Could this can be done by walking the grub_mm_regions allocated via grub_mm_init_region() and freeing them one by one? I guess we only want to release the memory just before launching a kernel, so even if the memory is still "in use" by GRUB code it should be safe to give it up.

2) The linux loader claims some memory and want it to be mapped on the
   address on which the kernel was linked.  If all memory is claimed
   already this will not work.

Hmm. I think the i386 loader doesn't worry about such things, but rather loads the kernel in a fixed region?

One easy possibility is this: don't reserve all memory at all. Instead reserve a fixed amount that we know we need, and if a kernel wants to be loaded there then fail. Since the kernel load address doesn't change often we can probably find a spot that's both big enough for GRUB and doesn't conflict.

What is the advantage of giving more memory to grub_mm_init_region() anyways? If it's not very important (e.g. a small performance improvement when loading a file from a filesystem) then I think we can agree that avoiding conflict with the kernel is more important...

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]