2021-02-16 01:39 AM
We are using the STM32MP15-ecosystem-v2.0.0 on an EV1 board.
We need to disable the sdmmc1 / sdmmc2 nodes in the DT, so we are adding the following at the end stm32mp157c-ev1.dts:
&sdmmc1 {
status = "disabled";
};
&sdmmc2 {
status = "disabled";
};
However this results in a kernel crash, apparently related to the NAND code.
I am attaching (part of) the kernel traces here:
[ 3.906739] ubi0: attaching mtd3
[ 6.876347] ubi0: scanning is finished
[ 6.893628] ubi0: attached mtd3 (name "UBI", size 1018 MiB)
[ 6.897839] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[ 6.904740] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[ 6.911450] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
[ 6.918459] ubi0: good PEBs: 4068, bad PEBs: 4, corrupted PEBs: 0
[ 6.924558] ubi0: user volume: 6, internal volumes: 1, max. volumes count: 128
[ 6.931778] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 404136786
[ 6.940914] ubi0: available PEBs: 0, total reserved PEBs: 4068, PEBs reserved for bad PEB handling: 76
[ 6.950260] ubi0: background thread "ubi_bgt0d" started, PID 148
[ 6.977970] input: joystick as /devices/platform/joystick/input/input1
[ 6.983812] stm32_rtc 5c004000.rtc: setting system clock to 2000-01-01T00:00:27 UTC (946684827)
[ 6.992464] 8<--- cut here ---
[ 6.994829] Unable to handle kernel NULL pointer dereference at virtual address 00000020
[ 7.002944] pgd = e429131c
[ 7.005643] [00000020] *pgd=00000000
[ 7.009227] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 7.014541] Modules linked in:
[ 7.017599] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.31 #1
[ 7.023523] Hardware name: STM32 (Device Tree Support)
[ 7.028684] PC is at mp1_mgate_clk_disable_safe+0x38/0x8c
[ 7.034084] LR is at mp1_mgate_clk_disable_safe+0x10/0x8c
[ 7.039489] pc : [<c05b501c>] lr : [<c05b4ff4>] psr: 60000093
[ 7.045769] sp : e6897eb0 ip : 00000000 fp : 00000008
[ 7.051003] r10: 0000012a r9 : c10004a4 r8 : c105c858
[ 7.056239] r7 : 00000000 r6 : 00000000 r5 : e6e5f0c0 r4 : e6e5d840
[ 7.062782] r3 : 00000000 r2 : c1200bcc r1 : 00000001 r0 : e6e5d840
[ 7.069326] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 7.076565] Control: 10c5387d Table: c000406a DAC: 00000051
[ 7.082322] Process swapper/0 (pid: 1, stack limit = 0x3e9a590e)
[ 7.088342] Stack: (0xe6897eb0 to 0xe6898000)
[ 7.092708] 7ea0: 60000013 e6e5f0c0 c11b2d04 00000000
[ 7.100912] 7ec0: c105c858 c05acc30 e6e5f0c0 e6e29780 ffffe000 00000000 c105c858 c05acb78
[ 7.109112] 7ee0: e6e29780 c11ffa10 ffffe000 00000000 c105c858 c05aeca8 c11b05e0 c05aec70
[ 7.117313] 7f00: ffffe000 c0102fa8 00000001 c01685e8 c0f51fc8 c1000400 c0e4f0b0 00000000
[ 7.125513] 7f20: 00000007 00000007 00000000 c0def3e8 c0de0778 c0de072c c106fab0 e7fffe3a
[ 7.133712] 7f40: e7fffe42 c1104c88 cccccccd 00000007 c11d90c0 c1104c88 c105c834 c1070650
[ 7.141911] 7f60: c11d90c0 c11d90c0 c105c838 c1001110 00000007 00000007 00000000 c10004a4
[ 7.150111] 7f80: c0b217e8 00000000 c0b217e8 00000000 00000000 00000000 00000000 00000000
[ 7.158311] 7fa0: 00000000 c0b217f0 00000000 c01010e8 00000000 00000000 00000000 00000000
[ 7.166510] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 7.174710] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 7.182928] [<c05b501c>] (mp1_mgate_clk_disable_safe) from [<c05acc30>] (clk_disable_unused_subtree+0xdc/0x260)
[ 7.193031] [<c05acc30>] (clk_disable_unused_subtree) from [<c05acb78>] (clk_disable_unused_subtree+0x24/0x260)
[ 7.203148] [<c05acb78>] (clk_disable_unused_subtree) from [<c05aeca8>] (clk_disable_unused+0x38/0x128)
[ 7.212572] [<c05aeca8>] (clk_disable_unused) from [<c0102fa8>] (do_one_initcall+0x58/0x2b4)
[ 7.221037] [<c0102fa8>] (do_one_initcall) from [<c1001110>] (kernel_init_freeable+0x1c8/0x264)
[ 7.229759] [<c1001110>] (kernel_init_freeable) from [<c0b217f0>] (kernel_init+0x8/0x110)
[ 7.237957] [<c0b217f0>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 7.245535] Exception stack(0xe6897fb0 to 0xe6897ff8)
[ 7.250598] 7fa0: 00000000 00000000 00000000 00000000
[ 7.258801] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 7.267000] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 7.273634] Code: e5933004 e3530000 18bd81f0 e590606c (e5963020)
[ 7.279734] ---[ end trace cd435da745db4b28 ]---
[ 7.284362] note: swapper/0[1] exited with preempt_count 1
[ 7.289855] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 7.297556] CPU0: stopping
[ 7.300240] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 5.4.31 #1
[ 7.307559] Hardware name: STM32 (Device Tree Support)
[ 7.312726] [<c01124dc>] (unwind_backtrace) from [<c010d784>] (show_stack+0x10/0x14)
[ 7.320486] [<c010d784>] (show_stack) from [<c0b0a234>] (dump_stack+0xb0/0xc4)
[ 7.327727] [<c0b0a234>] (dump_stack) from [<c0110f10>] (handle_IPI+0x41c/0x448)
[ 7.335143] [<c0110f10>] (handle_IPI) from [<c0568558>] (gic_handle_irq+0x8c/0x90)
[ 7.342729] [<c0568558>] (gic_handle_irq) from [<c0101a8c>] (__irq_svc+0x6c/0xa8)
[ 7.350220] Exception stack(0xc1101f40 to 0xc1101f88)
[ 7.355287] 1f40: 00000000 00011ef4 e765d074 c011b740 00000000 c1100000 c1104ca8 c1104ce8
[ 7.363486] 1f60: 00000001 c105ca40 e7fffd80 00000000 ffffffff c1101f90 c010a1a4 c010a1a8
[ 7.371680] 1f80: 60000013 ffffffff
[ 7.375181] [<c0101a8c>] (__irq_svc) from [<c010a1a8>] (arch_cpu_idle+0x38/0x3c)
[ 7.382596] [<c010a1a8>] (arch_cpu_idle) from [<c01582b4>] (do_idle+0xc4/0x14c)
[ 7.389922] [<c01582b4>] (do_idle) from [<c0158628>] (cpu_startup_entry+0x18/0x20)
[ 7.397509] [<c0158628>] (cpu_startup_entry) from [<c1000f10>] (start_kernel+0x4bc/0x4f4)
[ 7.405708] [<c1000f10>] (start_kernel) from [<00000000>] (0x0)
[ 7.411645] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
Is this a known issue?
Any hint on what may be the problem?
Guillermo
2021-04-06 01:16 AM
Hi @Grodriguez ,
Sorry to comment this post so late.
Did you find root cause and solution ?
No evidence for me expect issue looks to come from some clock setting.
If issue still alive for you I can have a deeper look
Olivier
2021-04-07 07:55 AM
Hi @Community member
Thank you for your answer.
No, we didn't find the root cause, but we found that the problem is not reproducible on 2.1.0, only on 2.0.0. We suspect it is related to changes in the NAND driver between the two releases.
Nonetheless we ended up switching to 2.1.0 and didn't investigate further.
Thanks,
Guillermo