grub-devel
[Top][All Lists]
Advanced

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

Re: does module area require alignment? (Re: [PATCH] i386-qemu port)


From: Pavel Roskin
Subject: Re: does module area require alignment? (Re: [PATCH] i386-qemu port)
Date: Mon, 22 Jun 2009 15:51:05 -0400

On Sun, 2009-06-21 at 21:33 +0200, Robert Millan wrote:
> On Sun, Jun 21, 2009 at 03:08:19PM -0400, Pavel Roskin wrote:
> > On Sun, 2009-06-21 at 20:50 +0200, Robert Millan wrote:
> > 
> > > Does anyone know why do we align ELF targets?  When I did the coreboot 
> > > port,
> > > the ELF part was based on existing Ieee1275 code, so I guess I just 
> > > mimicked
> > > it.  Is there some issue with non-i386 CPUs or with some Ieee1275
> > > implementations that makes this alignment a requirement?
> > 
> > It was a hack for PowerPC openfirmware.  I don't know why it was needed.
> > I didn't have time and desire to debug openfirmware to find out what it
> > wants.
> 
> Is the hack you're referring to GRUB_MOD_GAP, GRUB_MOD_ALIGN or both?

I'm referring to GRUB_MOD_GAP.

> Btw, I suspect GRUB_MOD_GAP might be related to the modules overlapping with
> the BSS because of a firmware loader bug.  Is there a correlation between
> the needed GRUB_MOD_GAP and the BSS size?

I don't see any correlation.

I made 3 images with the gap of 0x4000, 0x8000 and 0xc000.  Then I added
an uninitialized array to the kernel, 0x4000 bytes long, and made
another 3 images with the same gap sizes.  The images with the 0x4000
gap don't boot and the images with the gap sized 0x8000 and 0xc000 boot
regardless of the array.

That's PowerMac G3 "Blue and White".

-- 
Regards,
Pavel Roskin




reply via email to

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