06-06-2018 12:38 AM
Dear all
I am bringing up a new custom platform and I notice some problems while booting the kernel. The bootlog is added below. I configured: earlyprintk is enabled in kernel and debug uart is UART0.
Can anyone advice me with this error?
Thanks
Pieter
I am using linux-xlnx 2018.1 with a custom device tree (which is almost empty):
/dts-v1/;
/include/ "zynq-7000.dtsi"
/ {
model = "Cosamira new platform";
compatible = "xlnx,zynq-zc702", "xlnx,zynq-7000";
chosen {
bootargs = "";
stdout-path = "serial0:115200n8";
};
aliases {
//i2c0 = &i2c1;
serial0 = &uart0;
};
memory {
device_type = "memory";
reg = <0x00000000 0x40000000>;
};
};
&uart0 {
status = "okay";
};
BOOTLOG:
Environment size: 2906/131068 bytes
Cosamira> bootm ${loadaddr} ${initrd_addr} ${fdtaddr}
## Booting kernel from Legacy Image at 02080000 ...
Image Name: Linux-4.14.0-xilinx-00001-g6d313
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3948224 Bytes = 3.8 MiB
Load Address: 02080000
Entry Point: 02080000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
Image Name: core-image-cosamira-initramfs-co
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 25130643 Bytes = 24 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Loading Kernel Image ... OK
Loading Ramdisk to 0d808000, end 0efff693 ... OK
Loading Device Tree to 3eb13000, end 3eb181c9 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx-00001-g6d313c6-dirty (pic@PIC) (gcc version 6.2.0 (GCC)) #13 SMP PREEMPT Tue Jun 5 16:46:57 CEST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Cosamira new platform
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x3f000000
Unable to handle kernel paging request at virtual address feb13000
pgd = c0004000
[feb13000] *pgd=00000000
Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.0-xilinx-00001-g6d313c6-dirty #13
Hardware name: Xilinx Zynq Platform
task: c0a07000 task.stack: c0a00000
PC is at fdt_check_header+0x0/0x74
LR is at __unflatten_device_tree+0x28/0xfc
pc : [<c063177c>] lr : [<c04fc364>] psr: a00f00d3
sp : c0a01f48 ip : 00a61fc3 fp : efffce80
r10: c0a0fdc0 r9 : c0a4c410 r8 : 00000000
r7 : feb13000 r6 : c0a577c4 r5 : c091e594 r4 : c091e594
r3 : c091e594 r2 : c0a577c4 r1 : 00000000 r0 : feb13000
Flags: NzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 0000404a DAC: 00000051
Process swapper (pid: 0, stack limit = 0xc0a00210)
Stack: (0xc0a01f48 to 0xc0a02000)
1f40: c091e594 c0a0815c c0a3ba40 c0a06d00 00000000 c091f388
1f60: 00000000 0000000c c092c0e0 c0903dfc ffffffff 18c5387d c0a03c40 c083dbf0
1f80: 413fc090 00000000 00000000 c0150ccc c07dc735 c0a01fb4 00000001 c0a3bb94
1fa0: c0a3b900 ffffffff c0a03c40 0000406a 413fc090 00000000 00000000 c0900910
1fc0: 00000000 00000000 00000000 00000000 00000000 c0933a30 00000000 c0a3bb94
1fe0: c0a03c58 c0933a2c c0a08284 0000406a 413fc090 0000807c 00000000 00000000
[<c063177c>] (fdt_check_header) from [<c04fc364>] (__unflatten_device_tree+0x28/0xfc)
[<c04fc364>] (__unflatten_device_tree) from [<c091f388>] (unflatten_device_tree+0x24/0x40)
[<c091f388>] (unflatten_device_tree) from [<c0903dfc>] (setup_arch+0x5e0/0x9d8)
[<c0903dfc>] (setup_arch) from [<c0900910>] (start_kernel+0x4c/0x36c)
[<c0900910>] (start_kernel) from [<0000807c>] (0x807c)
Code: ebf307ef e28dd014 e49df004 c0631668 (e5903000)
random: get_random_bytes called from init_oops_id+0x20/0x40 with crng_init=0
---[ end trace 0000000000000000 ]---
Kernel panic - not syncing: Attempted to kill the idle task!
---[ end Kernel panic - not syncing: Attempted to kill the idle task!
06-06-2018 01:43 AM
Hi
Try passing mem=512M to kernel command line bootargs, as I can see from your log, you have just 16MB which is not sufficient to boot the kernel
Best Regards
Shabbir
06-06-2018 02:18 AM
Thanks Shabbir for the reply.
I tried by passing mem=512M but nothing changed. I also tried by changing the kernel config:
CONFIG_CMA_SIZE_MBYTES=512
Even this didn't help. See log below.
Cosamira> bootm ${loadaddr} ${initrd_addr} ${fdtaddr}
## Booting kernel from Legacy Image at 02080000 ...
Image Name: Linux-4.14.0-xilinx-00001-g6d313
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3948224 Bytes = 3.8 MiB
Load Address: 02080000
Entry Point: 02080000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
Image Name: core-image-cosamira-initramfs-co
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 25130643 Bytes = 24 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Loading Kernel Image ... OK
Loading Ramdisk to 0d808000, end 0efff693 ... OK
Loading Device Tree to 3eb13000, end 3eb181c9 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx-00001-g6d313c6-dirty (pic@PIC) (gcc version 6.2.0 (GCC)) #14 SMP PREEMPT Wed Jun 6 10:57:37 CEST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Cosamira new platform
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Failed to reserve 512 MiB
Unable to handle kernel paging request at virtual address feb13000
pgd = c0004000
[feb13000] *pgd=00000000
Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.0-xilinx-00001-g6d313c6-dirty #14
Hardware name: Xilinx Zynq Platform
task: c0a07000 task.stack: c0a00000
PC is at fdt_check_header+0x0/0x74
LR is at __unflatten_device_tree+0x28/0xfc
pc : [<c063177c>] lr : [<c04fc364>] psr: a00f00d3
sp : c0a01f48 ip : 00a61fc3 fp : dfffcf00
r10: c0a0fdc0 r9 : c0a4c410 r8 : 00000000
r7 : feb13000 r6 : c0a577c4 r5 : c091e594 r4 : c091e594
r3 : c091e594 r2 : c0a577c4 r1 : 00000000 r0 : feb13000
Flags: NzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 0000404a DAC: 00000051
Process swapper (pid: 0, stack limit = 0xc0a00210)
Stack: (0xc0a01f48 to 0xc0a02000)
1f40: c091e594 c0a0815c c0a3ba40 c0a06d00 00000000 c091f388
1f60: 00000000 0000000c c092c0e0 c0903dfc ffffffff 18c5387d c0a03c40 c083dbf0
1f80: 413fc090 00000000 00000000 c0150ccc c07dc735 c0a01fb4 00000001 c0a3bb94
1fa0: c0a3b900 ffffffff c0a03c40 0000406a 413fc090 00000000 00000000 c0900910
1fc0: 00000000 00000000 00000000 00000000 00000000 c0933a30 00000000 c0a3bb94
1fe0: c0a03c58 c0933a2c c0a08284 0000406a 413fc090 0000807c 00000000 00000000
[<c063177c>] (fdt_check_header) from [<c04fc364>] (__unflatten_device_tree+0x28/0xfc)
[<c04fc364>] (__unflatten_device_tree) from [<c091f388>] (unflatten_device_tree+0x24/0x40)
[<c091f388>] (unflatten_device_tree) from [<c0903dfc>] (setup_arch+0x5e0/0x9d8)
[<c0903dfc>] (setup_arch) from [<c0900910>] (start_kernel+0x4c/0x36c)
[<c0900910>] (start_kernel) from [<0000807c>] (0x807c)
Code: ebf307ef e28dd014 e49df004 c0631668 (e5903000)
random: get_random_bytes called from init_oops_id+0x20/0x40 with crng_init=0
---[ end trace 0000000000000000 ]---
Kernel panic - not syncing: Attempted to kill the idle task!
---[ end Kernel panic - not syncing: Attempted to kill the idle task!
06-06-2018 02:25 AM
Hi
Try changing once to 256MB and let me know how does it go?
Best Regards
Shabbir
06-06-2018 02:48 AM
Hello Shabbir
I tried the boot argument mem=256M but sadly, it's exactly the same.
I however had a look in the memory map of the zynq SoC. I see that the virtual address is 0xfeb13000 which is outside the DDR memory. We have 1GB DDR so address space of the memory is 0x0000_0000 to 0x3FFF_FFFF.
Best regards
Pieter Cardoen
06-06-2018 03:19 AM
Solution found. Aparently, the physical memory was not correctly specified in the u-boot device tree. It was specified to be 4 GB in u-boot while only 1GB is available.
Thanks
09-18-2019 01:28 AM
can you help me to change that 4gb to 1gb in device tree. im using zc706 evaluation and petalinux 2019 version. In the file /home/peta_18_09/peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/u-boot-xlnx/v2019.01-xilinx-v2019.1+gitAUTOINC+d895ac5e94-r0/git/arch/arm/dts/zynq-zc706.dts
memory@0{
device_type = "memory";
reg = <0x0 0x40000000>
}
09-18-2019 01:40 AM
Booting Linux on physical CPU 0x0
Linux version 4.19.0-xilinx-v2019.1 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Wed Sep 18 06:18:33 UTC 2019
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Zynq ZC706 Development Board
OF: fdt: Ignoring memory range 0x0 - 0x10000000
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x1f000000
Unable to handle kernel paging request at virtual address b7ff8000
pgd = (ptrval)
[b7ff8000] *pgd=00000000
Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.0-xilinx-v2019.1 #1
Hardware name: Xilinx Zynq Platform
PC is at fdt_check_header+0x0/0x74
LR is at __unflatten_device_tree+0x28/0xfc
pc : [<c0683eb8>] lr : [<c053d990>] psr: a00000d3
sp : c1601f30 ip : 116544cf fp : ceffff00
r10: c1610b20 r9 : c1642b88 r8 : 00000000
r7 : b7ff8000 r6 : c091f02c r5 : c164db6c r4 : c091f02c
r3 : c091f02c r2 : c164db6c r1 : 00000000 r0 : b7ff8000
Flags: NzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 1000404a DAC: 00000051
Process swapper (pid: 0, stack limit = 0x(ptrval))
Stack: (0xc1601f30 to 0xc1602000)
1f20: c091f02c c1608218 c1633440 c1606e40
1f40: 10000000 c1642b88 c1610b20 c091ff28 00000000 0000000c c092d320 c0904280
1f60: ffffffff 18c5387d c1603c48 c0846f2c c1603c48 c1603c40 413fc090 18c5387d
1f80: 00000000 c01560d8 c07e396f 00000000 00000001 c0900330 c16332c0 ffffffff
1fa0: c1603c48 c1603c40 413fc090 18c5387d 00000000 c0900924 00000000 00000000
1fc0: 00000000 00000000 00000000 c0933a38 00000000 00000000 c0900330 00000051
1fe0: 10c0387d 00000000 07ff8000 413fc090 18c5387d 00000000 00000000 00000000
[<c0683eb8>] (fdt_check_header) from [<c053d990>] (__unflatten_device_tree+0x28/0xfc)
[<c053d990>] (__unflatten_device_tree) from [<c091ff28>] (unflatten_device_tree+0x24/0x40)
[<c091ff28>] (unflatten_device_tree) from [<c0904280>] (setup_arch+0x694/0xaa0)
[<c0904280>] (setup_arch) from [<c0900924>] (start_kernel+0x58/0x3c4)
[<c0900924>] (start_kernel) from [<00000000>] ( (null))
Code: ebf250b8 e28dd014 e49df004 c0683db0 (e5903000)
random: get_random_bytes called from init_oops_id+0x20/0x3c with crng_init=0
---[ end trace 0000000000000000 ]---
Kernel panic - not syncing: Attempted to kill the idle task!
---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
these are my boot prints
10-17-2019 05:46 PM - edited 10-17-2019 05:52 PM
Hi @apollo-micro , I am getting a similar error as above. Were you able to fix it?
Hi @shabbirk Can you please elaborate on how to pass mem=512M to kernel command line bootargs? Thanks