Rabeeh Khoury wrote:
> I'm having trouble with my embedded system initializing the ram ; I do
> the following for initializations in kernel_entry -
> void __init galileo_mem_init(void)
> unsigned long bootmap_size;
> max_low_pfn = 0x1000; // 16 MB of ram - that's what I have on the
> bootmap_size = init_bootmem(0, max_low_pfn);
> free_bootmem (0 , 0x01000000);
> reserve_bootmem(0, 0x01000000);
> but the kernel is stuck in the alloc_bootmem_node which is called from
> free_area_init_core .
> do you know what is the problem ?
> am I doing right memory initializations for embedded board with 16 MByte
> ? ((start addr 0x80000000 - end addr 0x81000000)
Bootmem allocator needs __free__ memory. By specifing start pfn as 0 you
just poison exception handlers. Basically, you need to specify next pfn
__after__ the end of the kernel data as staring pfn, something like
UP(&end), look at i386 for example. The bootmem allocator stores its
bitmap at start pfn.