[Top][All Lists]

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

Re: another regression on Efika

From: Hollis Blanchard
Subject: Re: another regression on Efika
Date: Wed, 04 Jul 2007 11:18:57 -0500

On Mon, 2007-07-02 at 20:16 +0200, Robert Millan wrote:
> Hi,
> I spotted another regression, caused by the following commits:
> 2007-02-21  Hollis Blanchard  <address@hidden>
>       * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
>       (HEAP_LIMIT): New macro.
>       (grub_claim_heap): Claim memory up to `heaplimit'.
> 2007-02-21  Hollis Blanchard  <address@hidden>
>       * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
>       * kern/powerpc/ieee1275/init.c (_end): Add declaration.
>       (_start): Likewise.
>       (grub_arch_modules_addr): Return address after `_end'.
>       * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
>       (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
>       (add_segments): Calculate `_end' from phdr size and location.
>       (ALIGN_UP): Moved to ...
>       * include/grub/misc.h: here.
>       * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
>       New macro.
>       (GRUB_IEEE1275_MODULE_BASE): Removed.
> They move GRUB from being able to initialise and fire up the menu (although
> still unable to access disks), to abort with:
>   kern/mm.c:  grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");

This is probably because grub_mm_init_region() was never called, or
wasn't called enough.

> Unfortunately my limited expertise doesn't let me figure out what these 
> changes
> are doing.  I'm attaching a reverse diff of the commit, such that when applied
> to HEAD makes GRUB work again (verified) [1].  Perhaps someone can make sense
> of it.

This problem could be caused by firmware presenting an
incorrect /memory/available property. I would instrument
grub_available_iterate() and heap_init() to confirm.

That property lists unclaimed areas of memory, which are free for us to
use as heap. The memory used for firmware itself (including exception
handlers at 0), and the memory used by the loaded ELF file (GRUB), are
missing from /memory/available, so we know not to try to use those
regions for the heap.

If that is in fact the problem (which wouldn't surprise me given this
particular firmware's track record), then we'll have to add some
hardcoded hack particularly for Efika in grub_machine_init(), bypassing
the more general code we have now.


reply via email to

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