AnsweredAssumed Answered

Linux restrict memory-> fail to boot

Question asked by Empa on May 8, 2014
Latest reply on May 8, 2014 by rgetz



I tried to restrict the linux memory to 500mb (Zedboard) via bootargs in the dts file, which looks like


bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0 mem=500";


and I tried it with offsetting


bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0 mem=500 memmap=500@12";


but both settings give me an error at boot time.


Copying Linux from SD to RAM...

reading uImage

3097944 bytes read in 280 ms (10.6 MiB/s)

reading devicetree.dtb

9658 bytes read in 20 ms (470.7 KiB/s)

## Booting kernel from Legacy Image at 03000000 ...

   Image Name:   Linux-3.13.0-gad9b7ee-dirty

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3097880 Bytes = 3 MiB

   Load Address: 00008000

   Entry Point:  00008000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 02a00000

   Booting using the fdt blob at 0x2a00000

   Loading Kernel Image ... OK

   Loading Device Tree to 1fb4c000, end 1fb515b9 ... OK


Starting kernel ...


Uncompressing Linux... done, booting the kernel.

Booting Linux on physical CPU 0x0

Linux version 3.13.0-gad9b7ee-dirty (root@localhost.localdomain) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #1 SMP PREEMPT Fri May 2 16:27:52 CEST 2014

CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d

CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine model: Xilinx Zynq ZED

bootconsole [earlycon0] enabled

cma: CMA: failed to reserve 40 MiB

Memory policy: Data cache writealloc

Kernel panic - not syncing: ERROR: Failed to allocate 0x2000 bytes below 0x0.


CPU: 0 PID: 0 Comm: swapper Not tainted 3.13.0-gad9b7ee-dirty #1

[<c001357c>] (unwind_backtrace+0x0/0xe0) from [<c0010aa0>] (show_stack+0x10/0x14)

[<c0010aa0>] (show_stack+0x10/0x14) from [<c03b3ea0>] (dump_stack+0x7c/0xcc)

[<c03b3ea0>] (dump_stack+0x7c/0xcc) from [<c03b2690>] (panic+0x84/0x1d8)

[<c03b2690>] (panic+0x84/0x1d8) from [<c05671b8>] (memblock_alloc_base+0x2c/0x34)

[<c05671b8>] (memblock_alloc_base+0x2c/0x34) from [<c055eeac>] (early_alloc_aligned+0xc/0x2c)

[<c055eeac>] (early_alloc_aligned+0xc/0x2c) from [<c055faec>] (paging_init+0x574/0x840)

[<c055faec>] (paging_init+0x574/0x840) from [<c055c894>] (setup_arch+0x42c/0x858)

[<c055c894>] (setup_arch+0x42c/0x858) from [<c05597fc>] (start_kernel+0x80/0x3



I used the 3 Month old kernel and HDL from adi with some extra FLAGS in the kernel config, to support USB Camera and with a custom IP + VDMA in the PL region.


Does annyone know how I can get rid of the boot problem?