Sorry, you need to enable JavaScript to visit this website.

Linux Kernel Panic on boot with mem=256M

Zedboard forums is currently read-only while it under goes maintenance.

Unsolved
5 posts / 0 new
Linux Kernel Panic on boot with mem=256M

Hello everyone,
I want to run linux kernel on ZedBoard on a portion of the entire memory, with the rest of the memory dedicated to a frame buffer. So i pass the parameter "mem=" at boot. Every number < 512M bring to kernel panic.
Here is the result:
-
-
## Booting kernel from Legacy Image at 08000000 ...
Image Name: Linux-3.5.0-14.3-build2-25241-ga
Created: 2012-11-21 10:24:09 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2708368 Bytes = 2.6 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 09000000
Booting using the fdt blob at 0x09000000
Loading Kernel Image ... OK
OK
Loading Device Tree to 1fb64000, end 1fb68081 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.5.0-14.3-build2-25241-gaa09283-dirty (mgeromin@linuxserver2) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #14 PREEMPT Wed Nov 21 11:24:04 CET 2012
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZC702
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 65536
free_area_init_node: node 0, pgdat c04f3c68, node_mem_map c0521000
Normal zone: 512 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 65024 pages, LIFO batch:15
Unable to handle kernel paging request at virtual address dfb64000
pgd = c0004000
[dfb64000] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT ARM
Modules linked in:
CPU: 0 Not tainted (3.5.0-14.3-build2-25241-gaa09283-dirty #14)
PC is at __unflatten_device_tree+0xd4/0x26c
LR is at 0x0
pc : [<c02b368c>] lr : [<00000000>] psr: 600001d3
sp : c04c3f78 ip : d00dfeed fp : 00000000
r10: 00000000 r9 : 413fc090 r8 : c04c3fe4
r7 : c04cda20 r6 : c04fb960 r5 : c04a0fa8 r4 : dfb64000
r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : c04fb960
Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel
Control: 18c5387d Table: 00004059 DAC: 00000015
Process swapper (pid: 0, stack limit = 0xc04c22e8)
Stack: (0xc04c3f78 to 0xc04c4000)
3f60: 413fc090 00000000
3f80: 00000000 c051b8c8 40000001 c04b955c c05138a8 c0721840 c04cda20 c04b2518
3fa0: 00000000 c04a0c98 00000000 18c5387d c04cf98c c04cf98c c04fc500 c04ca000
3fc0: 00000001 c04cd954 00004059 c049d4f8 00000000 00000000 00000000 00000000
3fe0: 00000000 c04ba4dc 18c5387d c04ca04c c04ba4d8 0000803c 00000000 00000000
[<c02b368c>] (__unflatten_device_tree+0xd4/0x26c) from [<c04b2518>] (unflatten_device_tree+0x18/0x30)
[<c04b2518>] (unflatten_device_tree+0x18/0x30) from [<c04a0c98>] (setup_arch+0x6a8/0x7c4)
[<c04a0c98>] (setup_arch+0x6a8/0x7c4) from [<c049d4f8>] (start_kernel+0x6c/0x2d4)
[<c049d4f8>] (start_kernel+0x6c/0x2d4) from [<0000803c>] (0x803c)
Code: e6bf2f32 e59f1174 ebfbcb62 e59fc170 (e594e000)
---[ end trace 1b75b31a2719ed1c ]---
Kernel panic - not syncing: Attempted to kill the idle task!
-
-
Is there any particular configuration for the kernel to make it works with restricted memory?

Thanx in advance

Solved

Hi,
Today I solved my problem. The fact is that u-boot moves the device tree file to an address near 512MB during the boot process, so the kernel forced to use only 256M is unable to reach it.
The solution is to set an enviroment variable in u-boot to tell the maximum address to move device tree.
the variable is fdt_high. In my case i set it to 256M :

fdt_high=0x10000000
|
I hope this would help people with the same issue

Bye
Matteo

fletch
Moderator(23)
Thank you for this very

Thank you for this very helpful information!
Bryan

foucher
Junior(0)
Thanks

Wow, thank you for this, I was having the exact same problem limiting the memory to 400 MiB!

zml
Junior(0)
Thank you

Good job! That was exactly what I was looking for