On Sun, Jun 21, 2009 at 08:17:48PM +0200, Robert Millan wrote:
>  grub_addr_t
>  grub_arch_modules_addr (void)
>  {
> -  return ALIGN_UP((grub_addr_t) _end, GRUB_MOD_ALIGN);
> +//  return ALIGN_UP((grub_addr_t) _end, GRUB_MOD_ALIGN);
> +  return _end;
>  }

Some comments on this one.  It seems coreboot cares about alignment in
modbase because all ELF targets do.  This comes from elf/grub-mkimage.c:

      /* Place modules just after grub segment.  */
      modbase = ALIGN_UP(grub_end + GRUB_MOD_GAP, GRUB_MOD_ALIGN);

However, I don't see why this is necessary.  The module area is unaligned
on i386-pc and this works just fine there.  Same for i386-qemu.

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?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to