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

Re: boot memory

To: Rabeeh Khoury <rabeeh@galileo.co.il>
Subject: Re: boot memory
From: Ralf Baechle <ralf@uni-koblenz.de>
Date: Wed, 16 Feb 2000 18:45:22 +0100
Cc: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
In-reply-to: <38A9D0CB.FF958043@galileo.co.il>
References: <38A9D0CB.FF958043@galileo.co.il>
On Tue, Feb 15, 2000 at 05:18:51PM -0500, Rabeeh Khoury wrote:

> 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);

This will put the allocation bitmap at physical address zero where trap_init()
will overwrite it with the exception handlers.  *boom*.

>   free_bootmem (0 , 0x01000000);

This frees the entire physical memory ...

>   reserve_bootmem(0, 0x01000000);
> }

... and declares it as in use once again -> No free memory left for the
kernel.

> but the kernel is stuck in the alloc_bootmem_node which is called from
> free_area_init_core .

Fix the above bugs, then retry.  With what you did above free_area_init()
isn't supposed to work.

  Ralf

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