linux-mips-fnet
[Top] [All Lists]

Re: boot memory

Subject: Re: boot memory
From: "Gleb O. Raiko" <raiko@niisi.msk.ru>
Date: Wed, 16 Feb 2000 12:36:17 +0300
Cc: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Organization: NIISI RAN
References: <38A9D0CB.FF958043@galileo.co.il>
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
> embedded
>   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. 

Regards,
Gleb.

<Prev in Thread] Current Thread [Next in Thread>