Re: [uClinux-dev] bootmem - which way ?

From: David McCullough (davidm@snapgear.com)
Date: Mon Jul 22 2002 - 20:25:09 EDT


Jivin Ilan Pollak lays it down ...
> Hi all,
> Can someone please explain this part of the function 'setup_arch' from 
> linux-2.4.x/arch/armnommu/kernel/setup.c ?


Which ARM target are you building for.  That will help with which settings
are causing it to fail.


> #if 1
>     bootmem_init(&meminfo);
> #else
>     bootmap_size= init_bootmem_node(
>               NODE_DATA(0),
>               memory_start >> PAGE_SHIFT,
>               PAGE_OFFSET >> PAGE_SHIFT,
>               END_MEM >> PAGE_SHIFT);
>  
>     free_bootmem(memory_start, END_MEM - memory_start);
>     reserve_bootmem(memory_start, bootmap_size);
> #endif
> 
> if I change to #if 0 - the lower part work, and everything is cool ! 
> (until my former email...)
> the problem is , that the distribution (20020701), comes with the #if 1 
> checked, then i get Kernel Bug in bootmem.c::reserve_bootmem_core, the 
> starting index is bigger the ending one.
> and the next line is a BUG also.
> Can someone please tell me what's the difference ?
> thanks,

I think the key here will be the value of PHYS_OFFSET.  I suspect it will
need to be page aligned at least.

Obviously some of the platforms are working and some aren't.  Look at
DRAM_BASE and DRAM_SIZE (MEM_END) and also at PHYS_OFFSET to see the
differences.

I believe there was something posted to the list on thsi topic quite a
while back which resulted in the patch from "if 0" to "if 1".  You might
be able to find a few more details tehre,

Cheers,
Davidm

-- 
David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm@snapgear.com  Fx: +61 7 3891 3630  825 Stanley St., W'gabba QLD 4102, Oz
This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:21:35 EDT