[Top] [All Lists]

Re: boot memory

To: Ralf Baechle <>
Subject: Re: boot memory
From: "Gleb O. Raiko" <>
Date: Fri, 18 Feb 2000 13:13:57 +0300
Cc: "" <>
Organization: NIISI RAN
References: <> <> <> <>

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

        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 ?


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