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

Re: boot memory

To: Ralf Baechle <ralf@uni-koblenz.de>
Subject: Re: boot memory
From: "Gleb O. Raiko" <raiko@niisi.msk.ru>
Date: Fri, 18 Feb 2000 13:13:57 +0300
Cc: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Organization: NIISI RAN
References: <38A9D0CB.FF958043@galileo.co.il> <20000216184522.B6252@uni-koblenz.de> <38ABD5D7.8EF12364@niisi.msk.ru> <20000217183835.A5988@uni-koblenz.de>

Ralf Baechle wrote:
> 
> On Thu, Feb 17, 2000 at 02:04:55PM +0300, Gleb O. Raiko wrote:
> 
> > While we are discussing bootmem allocator, is there any plans to fix the
> > allocator in order to be friendly for initrd on all arches ? Or do you
> > have any ideas how to init bootmem w/o poisoning initrd image ? Call
> > init_bootmem_node/core directly ?
> 
> You won't poison the initrd image.  The {init,free,reserve}_bootmem()
> functions will only change the bootmem bitmap but nothing else.
> 

But initrd image is located just after _end. From
arch/mips/kernel/setup.c

        tmp = (((unsigned long)&_end + PAGE_SIZE-1) & PAGE_MASK) - 8;
        if (tmp < (unsigned long)&_end)
                tmp += PAGE_SIZE;
        initrd_header = (unsigned long *)tmp;
        if (initrd_header[0] == 0x494E5244) {
                initrd_start = (unsigned long)&initrd_header[2];

We call init_bootmem with aligned &_end as start pfn. i.e. the same
address as tmp points to. Then, init_bootmem stores its bitmap exactly
at start pfn and overwrites initrd image. Am I missing the point ?

I think, pointing init_bootmem after initrd image isn't appropriate, is
it ?

Regards,
Gleb.

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