UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer fpda
Observer
322 Views
Registered: ‎08-29-2012

Zynq7007 Petalinux kernel panic

Jump to solution

When booting my kernel for a custom design I get a kernel panic, anyone knows what is wrong?

 

 

U-Boot 2019.01 (Sep 26 2019 - 18:39:49 +0000) Xilinx Zynq ZC702

CPU: Zynq 7z007s
Silicon: v3.1
DRAM: ECC disabled 512 MiB
MMC: mmc@e0100000: 0, mmc@e0101000: 1
Loading Environment from SPI Flash... SF: Detected n25q128 with page size 256 By tes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In: serial@e0001000
Out: serial@e0001000
Err: serial@e0001000
U-BOOT for pxl_small

Hit any key to stop autoboot: 0
SF: Detected n25q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x270000, size 0xd80000
SF: 14155776 bytes @ 0x270000 Read: OK
## Loading kernel from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@1' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x10000104
Data Size: 4165312 Bytes = 4 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: d00016c2f3f136fa3ba172fb5425b33956c81a9e
Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Verifying Hash Integrity ... OK
Trying 'ramdisk@1' ramdisk subimage
Description: petalinux-user-image
Type: RAMDisk Image
Compression: gzip compressed
Data Start: 0x103fcf28
Data Size: 6745313 Bytes = 6.4 MiB
Architecture: ARM
OS: Linux
Load Address: unavailable
Entry Point: unavailable
Hash algo: sha1
Hash value: 6ab4afd80f5076b39838ae5b961f16549e498d19
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Verifying Hash Integrity ... OK
Trying 'fdt@system-top.dtb' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x103f90c4
Data Size: 15777 Bytes = 15.4 KiB
Architecture: ARM
Hash algo: sha1
Hash value: 19b8d3cedbce7ad2193583039a55ad554709833e
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x103f90c4
Loading Kernel Image ... OK
Loading Ramdisk to 07991000, end 07fffce1 ... OK
Loading Device Tree to 0798a000, end 07990da0 ... OK

Starting kernel ...

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 Thu Sep 26 18:35:00 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: xlnx,zynq-7000
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x1f000000
random: get_random_bytes called from start_kernel+0x80/0x3c4 with crng_init=0
percpu: Embedded 16 pages/cpu @(ptrval) s35916 r8192 d21428 u65536
Built 1 zonelists, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyPS0,115200 earlyprintk
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 486520K/524288K available (6144K kernel code, 210K rwdata, 1628K rodata, 1024K init, 134K bss, 21384K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0x(ptrval) - 0x(ptrval) (7136 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 211 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 135 kB)
rcu: Preemptible hierarchical RCU implementation.
rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
Tasks RCU enabled.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to (ptrval)
slcr mapped to (ptrval)
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at (ptrval)
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025 , max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 5375 38477 ns
timer #0 at (ptrval), irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.6 6 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
missing device node for CPU 1
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: failed to boot: -1
smp: Brought up 1 node, 1 CPU
SMP: Total of 1 processors activated (666.66 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911 2604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 25, base_baud = 6249999) is a xuartps
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 26, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
GPIO IRQ not connected
XGpio: gpio@41200000: registered, base is 1023
GPIO IRQ not connected
XGpio: gpio@41200000: dual channel registered, base is 1022
GPIO IRQ not connected
XGpio: gpio@41210000: registered, base is 1021
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
videodev: Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@l inux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 6588K
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Even ts-16
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
43c00000.serial: ttyS2 at MMIO 0x43c01000 (irq = 48, base_baud = 3000000) is a 1 6550A
brd: module loaded
loop: module loaded
m25p80 spi0.0: found n25q128a13, expected n25q512a
m25p80 spi0.0: n25q128a13 (16384 Kbytes)
4 fixed-partitions partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000270000 : "boot"
0x000000270000-0x000000ff0000 : "kernel"
0x000000ff0000-0x000001000000 : "bootenv"
0x000001000000-0x000001000000 : "spare"
mtd: partition "spare" is out of reach -- disabled
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.0-xilinx-v2019.1 #1
Hardware name: Xilinx Zynq Platform
PC is at sysfs_create_file_ns+0x3c/0xa0
LR is at sysfs_create_files+0x50/0x6c
pc : [<c0243268>] lr : [<c024331c>] psr: 20000013
sp : de43fb88 ip : c7d9d4f8 fp : c0a1c704
r10: c0a1c70c r9 : c0a1c720 r8 : 00000004
r7 : c0a03c48 r6 : 00000001 r5 : 00000000 r4 : 00000000
r3 : 00000000 r2 : 00000000 r1 : c0a1c730 r0 : c7d9d4f8
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 0000404a DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
Stack: (0xde43fb88 to 0xde440000)
fb80: c7d9a840 00000000 01000000 c0422f90 00000000 00000000
fba0: 00000000 1147d1a9 00000000 00000000 c7d9d4f8 c0a1c728 00000004 c024331c
fbc0: c7d9d400 de7aa200 00000004 de7ebc18 00000004 c0422ad4 c7d9d400 c0423234
fbe0: 01000000 00000000 00000004 c07452ac c0a1c754 00000000 00000000 de7ebc18
fc00: 00000004 00000000 00000000 c0423090 00000000 00000000 c0a03c48 00000000
fc20: de7aa180 00000004 c0a1c754 1147d1a9 00000000 de7ebc18 00000000 00000000
fc40: de7ebc18 de794000 de7f5290 fffffdfb 00000000 c042069c de7941bc 00000000
fc60: c0a03c48 c042ec30 00000000 c03ebad0 00010003 1147d1a9 c0a1ca5c 00000000
fc80: de794000 c0a1ca4c 00000000 c0a1ca5c 00000000 c043f408 de794000 c0a4de0c
fca0: 00000000 c03e8780 de794000 c0a1ca5c c03e8be8 00000000 de794034 c0a4dde8
fcc0: 00000000 c03e8acc c0a1ca5c de794000 00000000 c0a03c48 de43fd1c c03e8be8
fce0: 00000000 de794034 c0a4dde8 c03e6f9c c0a4dde8 de4f2a6c de7aa538 1147d1a9
fd00: de794000 de794000 c0a1db38 c0a03c48 00000001 c03e88f4 de794000 de794000
fd20: 00000001 1147d1a9 de794000 c0a1db38 de794000 c0a03c48 de794400 c03e7b98
fd40: de794000 00000000 de794008 c03e5f44 de40b580 c0367258 00000001 c0444674
fd60: de794000 1147d1a9 de794000 de794000 00000000 de794400 de4e5010 c0a03c48
fd80: 00000000 de7f5f40 c09004b8 c043fc60 de794000 debeaef4 00000001 de794400
fda0: c0a03c48 c04401e4 00000000 c0540264 02faf080 1147d1a9 debeaef4 de794400
fdc0: 00000000 debeaef4 c0a03c48 debeaf44 c082219d c04407f0 de7e8e80 c0a03c48
fde0: 00000063 1147d1a9 de43fdf0 00000000 de794400 de4e5010 de794738 de4e5000
fe00: c0a03c48 de7f5f40 c09004b8 c0444bb0 00000000 de4e4140 de794400 1147d1a9
fe20: 00000001 1147d1a9 de4e5010 00000000 c0a1e19c 00000000 c0a1e19c 00000000
fe40: fffffdfb c03ea16c de4e5010 c0a4de0c 00000000 c03e8780 de4e5010 c0a1e19c
fe60: c0a1e19c c03e8ae8 00000000 c0a34880 c093d3b0 c03e8acc c0a1e19c de4e5010
fe80: 00000000 de4e5010 de4e5044 c0a1e19c c03e8ae8 00000000 c0a34880 c03e8b74
fea0: de4e5010 c0a03c48 c0a1e19c c03e6eac c0a34880 de415e58 de4dc3b4 1147d1a9
fec0: c0a1e19c c0a1e19c de7aa300 00000000 c0a1a780 c03e7e38 c0822831 c0822832
fee0: 00000000 c0a1e19c c0a03c48 ffffe000 c091bdac c03e937c c0a34880 c0a03c48
ff00: ffffe000 c0102670 00000000 c0135314 00000000 c0900400 c0895ef4 000000d6
ff20: 00000006 00000006 00000000 c0896fac 000000d5 c0896fac c0933818 defffe16
ff40: 00000000 1147d1a9 c09004b8 00000007 c0a34880 1147d1a9 00000007 c0a34880
ff60: 000000d6 c0933834 c0933854 c0900e1c 00000006 00000006 00000000 c09004b8
ff80: 00000000 00000000 c069cd58 00000000 00000000 00000000 00000000 00000000
ffa0: 00000000 c069cd60 00000000 c01010e8 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c0243268>] (sysfs_create_file_ns) from [<c024331c>] (sysfs_create_files+0x50/0 x6c)
[<c024331c>] (sysfs_create_files) from [<c0422ad4>] (mtd_add_partition_attrs+0x1 0/0x34)
[<c0422ad4>] (mtd_add_partition_attrs) from [<c0423234>] (add_mtd_partitions+0xb c/0xf4)
[<c0423234>] (add_mtd_partitions) from [<c0423090>] (parse_mtd_partitions+0x20c/ 0x2f4)
[<c0423090>] (parse_mtd_partitions) from [<c042069c>] (mtd_device_parse_register +0x5c/0xf4)
[<c042069c>] (mtd_device_parse_register) from [<c042ec30>] (m25p_probe+0x160/0x1 c0)
[<c042ec30>] (m25p_probe) from [<c043f408>] (spi_drv_probe+0x80/0x9c)
[<c043f408>] (spi_drv_probe) from [<c03e8780>] (really_probe+0x1b8/0x27c)
[<c03e8780>] (really_probe) from [<c03e8acc>] (driver_probe_device+0x140/0x15c)
[<c03e8acc>] (driver_probe_device) from [<c03e6f9c>] (bus_for_each_drv+0xa0/0xb4 )
[<c03e6f9c>] (bus_for_each_drv) from [<c03e88f4>] (__device_attach+0xb0/0x124)
[<c03e88f4>] (__device_attach) from [<c03e7b98>] (bus_probe_device+0x28/0x80)
[<c03e7b98>] (bus_probe_device) from [<c03e5f44>] (device_add+0x474/0x56c)
[<c03e5f44>] (device_add) from [<c043fc60>] (spi_add_device+0xe4/0x124)
[<c043fc60>] (spi_add_device) from [<c04401e4>] (of_register_spi_device+0x2b8/0x 328)
[<c04401e4>] (of_register_spi_device) from [<c04407f0>] (spi_register_controller +0x39c/0x59c)
[<c04407f0>] (spi_register_controller) from [<c0444bb0>] (zynq_qspi_probe+0x2a4/ 0x398)
[<c0444bb0>] (zynq_qspi_probe) from [<c03ea16c>] (platform_drv_probe+0x48/0x94)
[<c03ea16c>] (platform_drv_probe) from [<c03e8780>] (really_probe+0x1b8/0x27c)
[<c03e8780>] (really_probe) from [<c03e8acc>] (driver_probe_device+0x140/0x15c)
[<c03e8acc>] (driver_probe_device) from [<c03e8b74>] (__driver_attach+0x8c/0xc8)
[<c03e8b74>] (__driver_attach) from [<c03e6eac>] (bus_for_each_dev+0x64/0xa0)
[<c03e6eac>] (bus_for_each_dev) from [<c03e7e38>] (bus_add_driver+0x16c/0x1d4)
[<c03e7e38>] (bus_add_driver) from [<c03e937c>] (driver_register+0xac/0xf0)
[<c03e937c>] (driver_register) from [<c0102670>] (do_one_initcall+0x70/0x140)
[<c0102670>] (do_one_initcall) from [<c0900e1c>] (kernel_init_freeable+0x18c/0x1 d0)
[<c0900e1c>] (kernel_init_freeable) from [<c069cd60>] (kernel_init+0x8/0x10c)
[<c069cd60>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xde43ffb0 to 0xde43fff8)
ffa0: 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: 03a06001 11a06003 e3560000 0a000000 (e7f001f2)
---[ end trace 02fdce8105f8e6eb ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
]---

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
259 Views
Registered: ‎05-15-2018

Re: Zynq7007 Petalinux kernel panic

Jump to solution

Hi @fpda 

It appears that your last QSPI partition start address is out of bounds for the flash memory size on the board. 0x1000000 is equivalent to 16 MB -- and if your on board flash is that size, you cannot have a partition with that start address. 

Could you delete this partition, and see if that fixes the kernel panic? This can be done by:

1. petalinux-build -x mrproper

2. petalinux-config, and then navigate to Subsystem AUTO hardware settings → Flash Settings

3. Select the 'spare' partition, hit <Enter>, and delete the name (leave it blank)

4. Save and exit this menu and do a petalinux-build

Best

 

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
260 Views
Registered: ‎05-15-2018

Re: Zynq7007 Petalinux kernel panic

Jump to solution

Hi @fpda 

It appears that your last QSPI partition start address is out of bounds for the flash memory size on the board. 0x1000000 is equivalent to 16 MB -- and if your on board flash is that size, you cannot have a partition with that start address. 

Could you delete this partition, and see if that fixes the kernel panic? This can be done by:

1. petalinux-build -x mrproper

2. petalinux-config, and then navigate to Subsystem AUTO hardware settings → Flash Settings

3. Select the 'spare' partition, hit <Enter>, and delete the name (leave it blank)

4. Save and exit this menu and do a petalinux-build

Best

 

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

0 Kudos