grub-devel
[Top][All Lists]
Advanced

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

Re: Memory Map information: GRUB2 vs. Legacy GRUB (GRUB1)


From: Francis Shim
Subject: Re: Memory Map information: GRUB2 vs. Legacy GRUB (GRUB1)
Date: Wed, 12 Aug 2009 17:33:00 -0400

Hi Vlad (phcoder),

On Wed, 2009-08-12 at 22:09 +0200, Vladimir 'phcoder' Serbinenko wrote:

> > However, when I boot using GRUB2, the Memory Map seems to have been
> > written over.
> >
> > Some observations:
> >  1) Legacy GRUB seems to use a combination of ELF and Multiboot header
> > information to boot the OS image; however, GRUB2 using the "multiboot"
> > kernel type will use strictly Multiboot protocol.
> Both booters behave the same way about this. Loading ELF is a part of 
> multiboot

Understood.  I was not sure if there was some ELF/A.OUT/Multiboot file
format that I might be missing out; hence, my query.

> >  2) The Memory Map information under GRUB2 seems to be "zeroed" which
> > leads me to believe that there must be something different in the way
> > Legacy GRUB and GRUB2 handle Data and BSS segments (ie: initializing
> > data by zeroing out).
> The most common reason is the OS zeroing it out. Legacy put the memory
> map in lowmem. GRUB2 puts it just after the kernel image. Some kernels
> may overwrite it during an initialisation phase.

That will explain it.  If GRUB2 puts the memory map just after the
kernel image then it means that the OS cannot assume that the memory
range immediately after the kernel image is free.  In fact, the
multiboot OS "must" use the provided memory map to decide what ranges of
memory are available for "dynamic memory" and which of it is free.  I
mistakenly thought that the memory map will always be in low memory and
only assume that the first 1 MB of physical memory should be left alone
at boot time to preserve the information.

BTW, why the difference?  Was putting multiboot information (eg: memory
map) in low memory clobbering BIOS information or the VGA/EGA/CGA memory
mapped areas?  Just curious.

Thanks for clearing that up!

Peace,
Frank

> >
> > I am using GRUB2 version 1.96 from the Fedora RPM repository; hence, I
> > wanted to know if a later SVN version has a fix or is there a change in
> > the specifications.
> Specifications are the same but we fixed a lot of bugs.
> >
> > Peace,
> > Frank






reply via email to

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