Panic when using sdcard (fire).

Hi Guys,

So the sdcard appears ok:

beagle@BeagleV:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk1      179:0    0 29.7G  0 disk 
└─mmcblk1p1  179:1    0 29.7G  0 part 
mmcblk0      179:8    0 14.6G  0 disk 
├─mmcblk0p1  179:9    0  684K  0 part 
├─mmcblk0p2  179:10   0   60M  0 part /boot/firmware
└─mmcblk0p3  179:11   0 14.5G  0 part /
mmcblk0boot0 179:16   0    4M  1 disk 
mmcblk0boot1 179:24   0    4M  1 disk 

When I try to do anything with it though, like mounting it, or mkfs on it everything goes bang:

[  110.080573] Oops - load access fault [#1]
[  110.084628] Modules linked in: xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc ctr imx219 v4l2_fwnode v4l2_async videodev mcp356x industrialio mc at24 regmap_i2c cfg80211 binfmt_misc
[  110.114611] CPU: 2 PID: 437 Comm: containerd Not tainted 6.1.33-linux4microchip+fpga-2023.06-20231019+ #1
[  110.124197] Hardware name: BeagleBoard BeagleV-Fire (DT)
[  110.129518] epc : timerqueue_add+0x2a/0x8a
[  110.133657]  ra : enqueue_hrtimer+0x34/0x6e
[  110.137867] epc : ffffffff80a4ee40 ra : ffffffff80092a66 sp : ffffffc81c883be0
[  110.145097]  gp : ffffffff81824d48 tp : ffffffe7a632be80 t0 : ffffffc81c883cf0
[  110.152327]  t1 : 00000000079cad20 t2 : 0000003f857f967c s0 : ffffffc81c883c00
[  110.159560]  s1 : ffffffc81c883cb0 a0 : ffffffd802a73da0 a1 : ffffffd802a73da0
[  110.166796]  a2 : 00000019f077a7de a3 : ffffffc81c6439c0 a4 : ffffffc81c5cbe20
[  110.174028]  a5 : ffffffc81c5cbe20 a6 : 0003b41ccc000000 a7 : ffffffffffffffff
[  110.181259]  s2 : 0000000000000001 s3 : ffffffd802a73d40 s4 : 0000000000000000
[  110.188489]  s5 : ffffffff81867f88 s6 : ffffffff80e1c508 s7 : 0000000000000000
[  110.195719]  s8 : ffffffd802a73d80 s9 : 0000000000000040 s10: ffffffff81696d00
[  110.202950]  s11: ffffffd802a73d40 t3 : 0000000000000015 t4 : 0006de70a5000000
[  110.210179]  t5 : ffffffffffffffff t6 : 0000003f857f9e08
[  110.215500] status: 0000000200000100 badaddr: ffffffc81c5cbe38 cause: 0000000000000005
[  110.223427] [<ffffffff80a4ee40>] timerqueue_add+0x2a/0x8a
[  110.228851] [<ffffffff80092a66>] enqueue_hrtimer+0x34/0x6e
[  110.234355] [<ffffffff800934b8>] hrtimer_start_range_ns+0x270/0x338
[  110.240647] [<ffffffff80a6d4d0>] schedule_hrtimeout_range_clock+0x64/0xba
[  110.247478] [<ffffffff80a6d534>] schedule_hrtimeout_range+0xe/0x16
[  110.253685] [<ffffffff8023ae1c>] do_epoll_wait+0x44c/0x500
[  110.259204] [<ffffffff8023aede>] do_compat_epoll_pwait.part.0+0xe/0x5c
[  110.265759] [<ffffffff8023c1ae>] sys_epoll_pwait+0x5a/0xda
[  110.271270] [<ffffffff80003c02>] ret_from_syscall+0x0/0x2
[  110.276704] ---[ end trace 0000000000000000 ]---
[  110.281331] note: containerd[437] exited with irqs disabled
[  120.182505] mmc0: Timeout waiting for hardware interrupt.
[  120.187957] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[  120.194404] mmc0: sdhci: Sys addr:  0x00000028 | Version:  0x00000003
[  120.200852] mmc0: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000000
[  120.207302] mmc0: sdhci: Argument:  0x0035f17a | Trn mode: 0x0000002b
[  120.213749] mmc0: sdhci: Present:   0x01f700f0 | Host ctl: 0x00000017
[  120.220199] mmc0: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[  120.226650] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
[  120.233097] mmc0: sdhci: Timeout:   0x0000000e | Int stat: 0x00000003
[  120.239548] mmc0: sdhci: Int enab:  0x03ff008b | Sig enab: 0x03ff008b
[  120.245996] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000001
[  120.252446] mmc0: sdhci: Caps:      0x176ac8b2 | Caps_1:   0x10000077
[  120.258895] mmc0: sdhci: Cmd:       0x0000193a | Max curr: 0x00202020
[  120.265343] mmc0: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0xffffffff
[  120.271793] mmc0: sdhci: Resp[2]:   0x328f5903 | Resp[3]:  0x00000900
[  120.278241] mmc0: sdhci: Host ctl2: 0x00003008
[  120.282697] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000001412000260
[  120.289840] mmc0: sdhci: ============================================
[  120.296409] Oops - load access fault [#2]
[  120.300439] Modules linked in: xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc ctr imx219 v4l2_fwnode v4l2_async videodev mcp356x industrialio mc at24 regmap_i2c cfg80211 binfmt_misc
[  120.330423] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D            6.1.33-linux4microchip+fpga-2023.06-20231019+ #1
[  120.341225] Hardware name: BeagleBoard BeagleV-Fire (DT)
[  120.346547] epc : __wake_up_common+0x3e/0x10a
[  120.350938]  ra : __wake_up_common_lock+0x62/0xa8
[  120.355660] epc : ffffffff8005857e ra : ffffffff800586ac sp : ffffffc804083640
[  120.362897]  gp : ffffffff81824d48 tp : ffffffe7a1fdf080 t0 : 0000000000046000
[  120.370130]  t1 : 0000000000000000 t2 : 686473203a30636d s0 : ffffffc8040836a0
[  120.377360]  s1 : 0000000000000001 a0 : ffffffe7a4ba90e0 a1 : 0000000000000003
[  120.384590]  a2 : 0000000000000001 a3 : 0000000000000000 a4 : 0000000000000000
[  120.391820]  a5 : ffffffc81c5b3dc8 a6 : ffffffc81c5b3db0 a7 : 0000000000000000
[  120.399051]  s2 : 0000000200000120 s3 : ffffffc8040836a0 s4 : ffffffe7a4ba90e8
[  120.406281]  s5 : 0000000000000000 s6 : 0000000000000003 s7 : 0000000000000001
[  120.413511]  s8 : 0000000000000003 s9 : 0000000000000000 s10: 0000000000000000
[  120.420743]  s11: ffffffff800a1e72 t3 : 0000000000000298 t4 : 000000000000014b
[  120.427973]  t5 : ffffffff8183c668 t6 : ffffffc8040839b8
[  120.433293] status: 0000000200000100 badaddr: ffffffc81c5b3dc8 cause: 0000000000000005
[  120.441219] [<ffffffff8005857e>] __wake_up_common+0x3e/0x10a
[  120.446905] [<ffffffff800586ac>] __wake_up_common_lock+0x62/0xa8
[  120.452928] [<ffffffff8005875a>] __wake_up+0x10/0x18
[  120.457909] [<ffffffff8023b018>] ep_poll_callback+0xd6/0x200
[  120.463605] [<ffffffff800585a8>] __wake_up_common+0x68/0x10a
[  120.469281] [<ffffffff800586ac>] __wake_up_common_lock+0x62/0xa8
[  120.475305] [<ffffffff8005875a>] __wake_up+0x10/0x18
[  120.480287] [<ffffffff80067544>] wake_up_klogd_work_func+0x6a/0x74
[  120.486492] [<ffffffff800ffe28>] irq_work_run_list+0x4a/0x7a
[  120.492187] [<ffffffff80100098>] irq_work_tick+0x34/0x40
[  120.497516] [<ffffffff8009268a>] update_process_times+0x8c/0x8e
[  120.503461] [<ffffffff800a191e>] tick_sched_handle+0x26/0x52
[  120.509166] [<ffffffff800a1ebc>] tick_sched_timer+0x4a/0x8e
[  120.514754] [<ffffffff80092e14>] __hrtimer_run_queues+0x144/0x20e
[  120.520866] [<ffffffff80093cf0>] hrtimer_interrupt+0xcc/0x1d6
[  120.526637] [<ffffffff807fcc40>] riscv_timer_interrupt+0x30/0x3a
[  120.532678] [<ffffffff8006f826>] handle_percpu_devid_irq+0x88/0x16e
[  120.538965] [<ffffffff80069cd2>] generic_handle_domain_irq+0x1c/0x2a
[  120.545344] [<ffffffff806215ce>] riscv_intc_irq+0x34/0x5c
[  120.550769] [<ffffffff80a661d0>] generic_handle_arch_irq+0x4a/0x74
[  120.556974] [<ffffffff80003c10>] ret_from_exception+0x0/0x16
[  120.562663] ---[ end trace 0000000000000000 ]---
[  120.567291] Kernel panic - not syncing: Fatal exception in interrupt
[  120.573651] SMP: stopping secondary CPUs
[  122.719271] SMP: failed to stop secondary CPUs 0-2
[  122.724107] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

Do not waste time on the SD-card interface just yet. The driver for it is not stable yet. There is an update on the way for it.

Hi @Vauban,

Thanks for the info, I’ll leave it be for the time being then!

Thanks

Andy