AnsweredAssumed Answered

Kernel Oops with i.MX7d

Question asked by chen weiwei on Jul 4, 2017
Latest reply on Jul 11, 2017 by Bio_TICFSL

I have kernel oops issue with i.MX7d. The kernel is imx_4.1.15_2.0.0_ga  from git://git.freescale.com/imx/linux-imx.

The u-boot works fine,but there  have a  problem  when start the kernel, And this is kernel boot logs :

U-Boot 2016.07-g58f25ef (May 12 2017 - 10:05:36 +0800)

CPU: Freescale i.MX7D rev1.2 996 MHz (running at 792 MHz)
CPU: Commercial temperature grade (0C to 95C) at 37C
Reset cause: POR
Board: Rugo
I2C: ready
DRAM: 1 GiB
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC: FSL_SDHC: 0, FSL_SDHC: 1
In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1(part 0) is current device
switch to partitions #0, OK
mmc1(part 0) is current device
reading boot.scr
** Unable to read file boot.scr **
reading zImage
6631960 bytes read in 130 ms (48.7 MiB/s)
Booting from mmc ...
reading imx7d-rugo.dtb
30226 bytes read in 11 ms (2.6 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x653218 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300a611

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.1.39-01900-ga4418c4-dirty (zhangrui@ict) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Fri May 12 12:057
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Warp i.MX7S Board
bootconsole [earlycon0] enabled
Reserved memory: created CMA memory pool at 0xac000000, size 320 MiB
Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @ab726000 s16908 r8192 d24052 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: console=ttymxc0,115200 root={mmcroot} earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 698424K/1048576K available (8355K kernel code, 433K rwdata, 2904K rodata, 428K init, 449K bss, 22472K reserved, 327680K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc0800000 - 0xff000000 (1000 MB)
lowmem : 0x80000000 - 0xc0000000 (1024 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.text : 0x80008000 - 0x80b06f08 (11260 kB)
.init : 0x80b07000 - 0x80b72000 ( 428 kB)
.data : 0x80b72000 - 0x80bde760 ( 434 kB)
.bss : 0x80be1000 - 0x80c51600 ( 450 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
Additional per-CPU info printed with stalls.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
Architected cp15 timer(s) running at 8.00MHz (phys).
clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns
sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns
Switching to timer-based delay loop, resolution 125ns
mxc_clocksource_init 3000000
Ignoring duplicate/late registration of read_current_timer delay
clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 16.00 BogoMIPS (lpj=80000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
/cpus/cpu@0 missing clock-frequency property
/cpus/cpu@1 missing clock-frequency property
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x800082c0 - 0x80008318
CPU1: failed to come online
Brought up 1 CPUs
SMP: Total of 1 processors activated (16.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 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
Unable to handle kernel paging request at virtual address 2abb9004
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.39-01900-ga4418c4-dirty #2
Hardware name: Freescale i.MX7 Dual (Device Tree)
task: a807c000 ti: a8062000 task.ti: a8062000
PC is at 0x0
LR is at generic_handle_irq+0x2c/0x3c
pc : [<00000000>] lr : [<8006d13c>] psr: a0000193
sp : a8063b70 ip : a600005c fp : 0000003a
r10: a8008000 r9 : a8063bb0 r8 : 00000001
r7 : 00000000 r6 : 00000011 r5 : 00000000 r4 : 00000011
r3 : 00000000 r2 : 00000000 r1 : a8003cc0 r0 : 00000011
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 8000406a DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xa8062210)
Stack: (0xa8063b70 to 0xa8064000)
3b60: 80b6ebe4 8006d3f4 c080200c 80b74838
3b80: a8063bb0 c0802000 00000000 00000006 00000000 80009460 8006be20 60000113
3ba0: ffffffff a8063be4 00000000 800131c0 00000000 0000000d 00005008 20000113
3bc0: 80be6680 00000001 00000043 80c249e8 00000000 00000006 00000000 0000003a
3be0: 00000001 a8063bf8 8001a960 8006be20 60000113 ffffffff 00000400 00000042
3c00: 80c25428 80be4ae8 80c249e8 80be4ae8 20000113 00000000 80b805dc 00000001
3c20: 00000000 809e493c 00000000 00000042 00000001 80c2543e 80be4ae8 00000000
3c40: 00000000 00000000 00000000 8006c250 00000000 00000000 00000000 00000000
3c60: 80c2543e 00000042 00000001 00000000 60000113 00000000 00000000 a807c048
3c80: 80b746bc 8006c5fc a8063dd0 00000005 00000000 a807c000 a8063e18 00000003
3ca0: 00000000 8006c61c 809da984 a8063ccc 00000000 807f21f8 80b746bc a8063ccc
3cc0: 2abb9004 807f1dc0 809da984 809da974 2abb9004 80c2581c 2abb9004 8001c358
3ce0: 3fffffff 80038940 80b70e0c ab729800 ffffffff a8098000 00000002 a8063d61
3d00: a8063d34 80b14e80 a8063d3c 80b78d0c 00000005 8001c5c4 2abb9004 a8063dd0
3d20: a8063e18 00000003 00000000 800092a0 00000001 00000000 a8063d61 a80ef7c0
3d40: a80ef7ce ffffffff 00000008 802b78fc ffffffff ff0a0005 ffffffff 807f82d0
3d60: 786d69cc 646d6d5f 6e695f63 80007469 80bdd8dc abd17fe0 80b7354c 00000000
3d80: 80b73591 80bdda00 80b74200 80bdd580 abcd8000 800b3d14 80c25450 80c2581c
3da0: a8063dd0 809da85f 00000001 00000003 0000000a 00000000 800e537c 20000113
3dc0: ffffffff a8063e04 a8062000 80013158 00000000 809ea3e0 00000001 2abb9000
3de0: 00000004 a8001400 80b746bc 000080d0 a8062000 a8063e18 00000003 00000000
3e00: 00000018 a8063e18 800e5374 800e537c 20000113 ffffffff a802f820 a80ef800
3e20: 80c30b14 a802e980 00000001 000041ed 00000003 80147eb8 a802f820 a80f3d00
3e40: a802f820 a804a54c 00000000 80b5f3e4 00000003 80148eb8 a80f3d00 a80f3d00
3e60: a802f820 80149134 a80f3d00 00000000 a802f820 8014b1ac 00000000 00000000
3e80: a80f3d00 00000000 00000000 802b0b68 a80f3d00 00000000 00000000 802b0784
3ea0: a80f3d00 a80f3d00 00000000 00000000 80b9dec8 802b1000 80b7b79c a8063ed8
3ec0: a80ef7c0 80b7b79c a80f3d00 a80ef7c0 80382c54 809e9154 809dd32c 80b77760
3ee0: a80ef7c0 80b7b79c 80b77760 a80ef7c0 80b14e80 80383d88 80b77760 80b77760
3f00: a80ef7c0 800097bc 80c260c8 80b80724 80b5f3c0 8014059c 00000000 a80ec500
3f20: 00000000 80b7f55c abfffb31 abfffb26 80827ba4 8004d48c 00000000 00000000
3f40: 809d77d0 00000002 00000002 809e3300 80b7f544 00000134 00000134 80be1000
3f60: 80be1000 80b6b5cc 80b5f3cc 00000003 00000000 80b07db4 00000002 00000002
3f80: 80b075a0 80051b2c 00000000 807f0430 00000000 00000000 00000000 00000000
3fa0: 00000000 807f0438 00000000 8000f4a8 00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 55555555 55555555
[<8006d13c>] (generic_handle_irq) from [<8006d3f4>] (__handle_domain_irq+0x7c/0xec)
[<8006d3f4>] (__handle_domain_irq) from [<80009460>] (gic_handle_irq+0x24/0x60)
[<80009460>] (gic_handle_irq) from [<800131c0>] (__irq_svc+0x40/0x74)
Exception stack(0xa8063bb0 to 0xa8063bf8)
3ba0: 00000000 0000000d 00005008 20000113
3bc0: 80be6680 00000001 00000043 80c249e8 00000000 00000006 00000000 0000003a
3be0: 00000001 a8063bf8 8001a960 8006be20 60000113 ffffffff
[<800131c0>] (__irq_svc) from [<8006be20>] (console_unlock+0x334/0x4d4)
[<8006be20>] (console_unlock) from [<8006c250>] (vprintk_emit+0x290/0x53c)
[<8006c250>] (vprintk_emit) from [<8006c61c>] (vprintk_default+0x20/0x28)
[<8006c61c>] (vprintk_default) from [<807f21f8>] (printk+0x74/0x84)
[<807f21f8>] (printk) from [<807f1dc0>] (__do_kernel_fault.part.0+0x44/0x74)
[<807f1dc0>] (__do_kernel_fault.part.0) from [<8001c358>] (do_page_fault+0x1ac/0x37c)
[<8001c358>] (do_page_fault) from [<800092a0>] (do_DataAbort+0x38/0xb4)
[<800092a0>] (do_DataAbort) from [<80013158>] (__dabt_svc+0x38/0x60)
Exception stack(0xa8063dd0 to 0xa8063e18)
3dc0: 00000000 809ea3e0 00000001 2abb9000
3de0: 00000004 a8001400 80b746bc 000080d0 a8062000 a8063e18 00000003 00000000
3e00: 00000018 a8063e18 800e5374 800e537c 20000113 ffffffff
[<80013158>] (__dabt_svc) from [<800e537c>] (kmem_cache_alloc+0x40/0x15c)
[<800e537c>] (kmem_cache_alloc) from [<80147eb8>] (__kernfs_new_node+0x3c/0xb4)
[<80147eb8>] (__kernfs_new_node) from [<80148eb8>] (kernfs_new_node+0x1c/0x38)
[<80148eb8>] (kernfs_new_node) from [<80149134>] (kernfs_create_dir_ns+0x18/0x5c)
[<80149134>] (kernfs_create_dir_ns) from [<8014b1ac>] (sysfs_create_dir_ns+0x50/0x98)
[<8014b1ac>] (sysfs_create_dir_ns) from [<802b0b68>] (kobject_add_internal+0xa0/0x2f0)
[<802b0b68>] (kobject_add_internal) from [<802b1000>] (kobject_init_and_add+0x40/0x64)
[<802b1000>] (kobject_init_and_add) from [<80382c54>] (bus_add_driver+0x90/0x1f0)
[<80382c54>] (bus_add_driver) from [<80383d88>] (driver_register+0x78/0xf8)
[<80383d88>] (driver_register) from [<800097bc>] (do_one_initcall+0x8c/0x1d4)
[<800097bc>] (do_one_initcall) from [<80b07db4>] (kernel_init_freeable+0x140/0x1d0)
[<80b07db4>] (kernel_init_freeable) from [<807f0438>] (kernel_init+0x8/0xe8)
[<807f0438>] (kernel_init) from [<8000f4a8>] (ret_from_fork+0x14/0x2c)
Code: bad PC value
---[ end trace e06712104e5485bb ]---
Kernel panic - not syncing: Fatal exception in interrupt
---[ end Kernel panic - not syncing: Fatal exception in interrupt

 

I don't know where goes to wrong, Thank you.

Outcomes