External initramfs again ... keep getting "overlaps in-use memory region" - [SOLVED!]

Brian Hutchinson b.hutchman at gmail.com
Fri Feb 26 16:41:35 EST 2010

On Thu, Feb 25, 2010 at 7:17 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Thu, Feb 25, 2010 at 07:11:54PM -0500, Brian Hutchinson wrote:
>> Do I have to re-arrange that 16M hole I mentioned and make it the
>> first 16M and the rest all contig in the fixup?
> What I described was not quite right - was 4 bits out.
> For this layout:
>  0x00000000 - DDR Bank 0
>  0x04000000 - DDR Bank 1
>  0x08000000 - DDR Bank 2
>  0x0c000000 - DDR Bank 3
> But if you actually have this:
>  The way the code is called it looks like it sets up 16M region
>  (0x0-0x01ffffff), then skips 16M (0x02000000-0x07ffffff) (I don't know
>  why ... yet) then the last three 32M regions are contiguous (see
>  kernel messages below).
> You could set SECTION_SIZE_BITS to 27 since your memory appears to be
> grouped in two sections - 0x0 - 0x01ffffff, and then 0x08000000 -
> 0x0dffffff.

Russell is the man!  I thank the Lord for Russell!

Error in my earlier post ... the 16M hole I described as
(0x02000000-0x07ffffff) was a typo, it should have been
(0x02000000-0x03ffffff) ... thought I should point that out to avoid

Summary of solution Russell schooled me on for others to enjoy ....

I had no idea that the memory model was my problem ... especially
because my initramfs cpio (12M+ gzipped, around 34M uncompressed)
image worked when linked with the kernel but would give me the
problems described earlier in this thread when I tried to load the
cpio external using the initrd= method.

I modified my Kconfig to allow the sparsemem model to be selected ...
for my arch in Kconfig I had to add:

With this change the sparsemem selection showed up in make menuconfig.

In my memory.h file I placed these two lines which are the magic to
getting sparsemem to work:


Didn't have to make any other changes!  Pretty painless!  Rebuilt the
kernel after making the above changes.

Tested by tftp'ing my initramfs cpio.gz image to 0x4000000.  Took note
of the bytes transferred so I would know the size to use with the
initrd command.

Modified my initrd line to be initrd=0x4000000,<size of bytes
transferred in tftp mentioned above>
Did a bootm (u-boot) of the kernel and ..... success!

This is also the solution to the other thread I started:

See some of these sources for info in the sparsemem memory model:



More information about the linux-arm-kernel mailing list