On Wed, Apr 07, 2004 at 04:45:37PM +0100 or thereabouts, Sam Mason wrote:
> Joshua Oreman wrote:
> >Is there an easier way? I'm looking
> >to make sure that memory is not allocated from the middle of the kernel.
> 
> I think Grub tells you where it has loaded everything; have a look at
> the example program you get with the Grub distribution (in the docs
> subdirectory).  It's been a while since I looked at it, but I'm pretty
> sure it tells you what you can scribble on.  Try searching for
> "memory_map" in kernel.c, I think it may be what you're after!

Thank you for your help! Unfortunately, the memory_map is BIOS-provided;
it helps but does not specify the kernel load address. However, I completely
overlooked the fact that I had asked the kernel to load at 1MB, and...
surprise!... it does :-) So basically I just add up the sizes of all the
sections in the file to get the length. (Of course, I know where the ELF
header is if necessary).

Thanks again!

-- Josh


_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to