Bug 277884 - RPi4: mmc broken with GENERIC-NODEBUG
Summary: RPi4: mmc broken with GENERIC-NODEBUG
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 15.0-CURRENT
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-22 12:51 UTC by Lexi Winter
Modified: 2024-03-23 15:15 UTC (History)
0 users

See Also:


Attachments
dmesg from working boot (16.88 KB, text/plain)
2024-03-22 12:51 UTC, Lexi Winter
no flags Details
dmesg from GENERIC-MMCCAM (14.47 KB, text/plain)
2024-03-22 15:09 UTC, Lexi Winter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lexi Winter 2024-03-22 12:51:06 UTC
Created attachment 249398 [details]
dmesg from working boot

i have two RPi4s, one 2GB and one 4GB, using SanDisk 16GB SD cards:

mmc0: <MMC/SD bus> on sdhci_bcm0
mmc1: <MMC/SD bus> on sdhci_bcm1
mmc0: No compatible cards found on bus
mmcsd0: 16GB <SDHC SC16G 8.0 SN 4D52ABA7 MFG 05/2022 by 3 SD> at mmc1 50.0MHz/4bit/65535-block

these are both running 15.0 as of 312a05c39e5fd79b37ee6f922462232797f56a2a.  i tested with both the current sysutils/rpi-firmware from ports (20230405), and the firmware from the current 15.0 binary snapshots.

when booting with GENERIC, both RPis work fine.  when booting with GENERIC-NODEBUG, the SD card won't attach and mountroot fails.  this is reproducible.  the problem appears to be specific to mmc, because if i put the SD card into a USB card reader instead, both systems boot fine with either kernel.

i don't have an easy way to access dmesg on a failed boot, but i did notice it printed the error "DMA error 4 on CH5", relating to the mmc controller.

full dmesg from one of the systems on a working boot is attached.
Comment 1 Lexi Winter 2024-03-22 15:09:39 UTC
Created attachment 249402 [details]
dmesg from GENERIC-MMCCAM

tested with MMCCAM:

- GENERIC-MMCCAM works
- GENERIC-MMCCAM-NODEBUG hangs during kernel boot after probing sdda0

attached a dmesg from working GENERIC-MMCCAM system.
Comment 2 Lexi Winter 2024-03-23 15:15:54 UTC
some additional testing:

- i created a custom non-debug, modular kernel (no WITNESS or INVARIANTS)
- this kernel booted fine on the 4GB system
- however on the 2GB system the problem appears with this kernel

this kernel is running a couple of local patches to build some drivers (genet, bcm_xhci, nvme) as modules, which probably isn't related to this issue.

so i don't see any obvious cause here (kevens suspected it might be timing-related), but by next week i should be able to hook up a serial console and get a boot log from a failed boot.