linux-mips
[Top] [All Lists]

Re: MIPS: 3.13-rc1 regression: initrd/cramfs broken

To: Ralf Baechle <ralf@linux-mips.org>, Greg Ungerer <gerg@snapgear.com>, Ashok Kumar <ashoks@broadcom.com>
Subject: Re: MIPS: 3.13-rc1 regression: initrd/cramfs broken
From: Aaro Koskinen <aaro.koskinen@iki.fi>
Date: Sat, 30 Nov 2013 23:59:43 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <20131124110518.GA24645@blackmetal.musicnaut.iki.fi>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20131124110518.GA24645@blackmetal.musicnaut.iki.fi>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
Hi,

On Sun, Nov 24, 2013 at 01:05:18PM +0200, Aaro Koskinen wrote:
> With 3.13-rc1 the boot hangs early when initrd/cramfs is used. I bisected
> this to commit f9a7febd82f413b9c8bafd40145bc398b7eb619f (MIPS: Fix start
> of free memory when using initrd).
> 
> I'm loading cramfs initrd on my WRT54GL router (16 MB memory) to
> 0x80400000. The kernel command line is:
> console=ttyS0,115200 rd_start=0x80400000 rd_size=5181440 root=/dev/ram 
> init=/init
> 
> With 3.13-rc1 it hangs with below output. With the above commit reverted,
> the board boots fine.
> 
> Starting program at 0x80231cb0
> [    0.000000] Linux version 3.13.0-rc1-wrt54gl-los.git-6e483b8-dirty 
> (aaro@blackmetal) (gcc version 4.8.2 (GCC) ) #13 Sun Nov 24 12:54:47 EET 2013
> [    0.000000] bootconsole [early0] enabled
> [    0.000000] CPU0 revision is: 00029008 (Broadcom BMIPS3300)
> [    0.000000] bcm47xx: using ssb bus
> [    0.000000] ssb: Found chip with id 0x5352, rev 0x00 and package 0x02
> [    0.000000] ssb: Sonics Silicon Backplane found at address 0x18000000
> [    0.000000] Determined physical RAM map:
> [    0.000000]  memory: 01000000 @ 00000000 (usable)
> [    0.000000] Initial ramdisk at: 0x80400000 (5181440 bytes)
> [    0.000000] Zone ranges:
> [    0.000000]   Normal   [mem 0x00000000-0x00ffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x00000000-0x00ffffff]
> [    0.000000] Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
> [    0.000000] Primary data cache 8kB, 2-way, VIPT, no aliases, linesize 16 
> bytes

It seems the commit itself is OK, but it just exposes some limitation or
"feature" when running Linux on WRT54GL. It seems some areas of memory
cannot be used by Linux.

The hang seems to happen in memset() called by alloc_bootmem_bdata(). It's
trying to zero 8 pages starting from address 0x80301000. This seems to
be perfectly valid and I have no idea why it hangs, but this area seems
to be used by CFE code earlier during the boot:

        Total memory: 16384 KBytes

        Total memory used by CFE:  0x80300000 - 0x803A39B0 (670128)

Kernel works if I blacklist this area using command line:

        mem=3M@0 mem=12M@0x400000

        [...]

        [    0.000000] Determined physical RAM map:
        [    0.000000]  memory: 01000000 @ 00000000 (usable)
        [    0.000000] User-defined physical RAM map:
        [    0.000000]  memory: 00300000 @ 00000000 (usable)
        [    0.000000]  memory: 00c00000 @ 00400000 (usable)
        [    0.000000] Initial ramdisk at: 0x80400000 (5181440 bytes)

And the rest of the boot is now fine.

A.

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