From nobody Thu Apr 07 04:08:10 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0023B1A8076A for ; Thu, 7 Apr 2022 04:08:20 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KYntC0j7yz4VGj for ; Thu, 7 Apr 2022 04:08:18 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 23748A7Q029301 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 6 Apr 2022 21:08:10 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 23748Ahb029300 for freebsd-arm@FreeBSD.org; Wed, 6 Apr 2022 21:08:10 -0700 (PDT) (envelope-from jmg) Date: Wed, 6 Apr 2022 21:08:10 -0700 From: John-Mark Gurney To: freebsd-arm@FreeBSD.org Subject: Rock64 eMMC not working Message-ID: <20220407040810.GD88842@funkthat.com> Mail-Followup-To: freebsd-arm@FreeBSD.org List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Wed, 06 Apr 2022 21:08:10 -0700 (PDT) X-Rspamd-Queue-Id: 4KYntC0j7yz4VGj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [-1.13 / 15.00]; TO_DN_NONE(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995]; FREEFALL_USER(0.00)[jmg]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.34)[-0.335]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-arm]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hello, I am trying to get the latest FreeBSD -current snapshot to boot/run off a Pine64 eMMC module on the Rock64, but I'm seeing an issue w/ mounting root: FreeBSD 14.0-CURRENT #0 main-n254105-d53927b0bae: Thu Mar 31 09:26:31 UTC 2022 [...] Trying to mount root from ufs:/dev/ufs/rootfs [rw]... mmcsd0: Error indicated: 4 Failed I got similar messages when 13.1-RC1: mmcsd0: 16GB at mmc0 150.0MHz/8bit/1016-block mmcsd0boot0: 4MB partition 1 at mmcsd0 mmcsd0boot1: 4MB partition 2 at mmcsd0 mmcsd0rpmb: 4MB partition 3 at mmcsd0 [...] GEOM: mmcsd0: the secondary GPT header is not in the last LBA. mmcsd0: Error indicated: 4 Failed rockchip_dwmmc1: Failed to update clk Are there any known issues w/ this? A different image to try? Also, in trying to debug this issue, I tried to boot from a microSD card with the eMMC module installed by shorting the jumper, but when I did, I got: mmcsd0: 32GB at mmc0 50.0MHz/4bit/1016-block mmcsd1: Error reading EXT_CSD Failed device_attach: mmcsd1 attach returned 6 Kernel page fault with the following non-sleepable locks held: exclusive sleep mutex rockchip_dwmmc1 (dwmmc) r = 0 (0xffffa000008d2128) locked @ /usr/src/sys/dev/mmc/host/dwmmc.c:386 stack backtrace: #0 0xffff0000004e5390 at witness_debugger+0x5c #1 0xffff0000004e6564 at witness_warn+0x3e8 #2 0xffff00000078962c at data_abort+0xa0 #3 0xffff000000767810 at handle_el1h_sync+0x10 x0: 8088 x1: ffff00008e18b000 (ucom_cons_softc + 8ce4ca40) x2: 40 x3: 182 x4: 0 x5: ffff00008e1767a0 (ucom_cons_softc + 8ce381e0) x6: 0 x7: 0 x8: 4 x9: ffff000000b55910 (memmap_bus + 0) x10: 3 x11: 10000 x12: 1 x13: 2af8 x14: 88 x15: 2af8 x16: 88 x17: 0 x18: ffff00008e176850 (ucom_cons_softc + 8ce38290) x19: ffffa000008d2140 x20: ffffa000008d2000 x21: 8088 x22: 0 x23: 80000003 x24: ffffa000008c9580 x25: ffffa00000bb9100 x26: ffff000000b9ea98 (Giant + 18) x27: ffff0000008df336 (digits + ea96) x28: ffffa00000bb9110 x29: ffff00008e176850 (ucom_cons_softc + 8ce38290) sp: ffff00008e176850 lr: ffff0000007b0298 (dwmmc_intr + 50) elr: ffff0000007b02c4 (dwmmc_intr + 7c) spsr: 45 far: 20 esr: 96000044 panic: data abort in critical section or under mutex cpuid = 0 time = 1 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x174 panic() at panic+0x44 data_abort() at data_abort+0x2dc handle_el1h_sync() at handle_el1h_sync+0x10 --- exception, esr 0x96000044 dwmmc_intr() at dwmmc_intr+0x7c ithread_loop() at ithread_loop+0x2a0 fork_exit() at fork_exit+0x74 fork_trampoline() at fork_trampoline+0x14 KDB: enter: panic Complete boot message: ====================== U-Boot TPL 2021.07 (Mar 31 2022 - 05:26:18) LPDDR3, 800MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Trying to boot from BOOTROM Returning to boot ROM... U-Boot SPL 2021.07 (Mar 31 2022 - 05:26:18 +0000) Trying to boot from MMC1 Card did not respond to voltage select! : -110 spl: mmc init failed with error: -95 Trying to boot from MMC2 NOTICE: BL31: v2.5(release): NOTICE: BL31: Built : 05:24:37, Mar 31 2022 NOTICE: BL31:Rockchip release version: v1.2 U-Boot 2021.07 (Mar 31 2022 - 05:28:19 +0000) Model: Pine64 Rock64 DRAM: 2 GiB PMIC: RK8050 (on=0x40, off=0x00) MMC: mmc@ff500000: 1, mmc@ff520000: 0 Loading Environment from MMC... Card did not respond to voltage select! : -110 *** Warning - No block device, using default environment In: serial@ff130000 Out: serial@ff130000 Err: serial@ff130000 Model: Pine64 Rock64 Net: eth0: ethernet@ff540000 Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0(part 0) is current device Scanning mmc 0:1... 50618 bytes read in 7 ms (6.9 MiB/s) Card did not respond to voltage select! : -110 Scanning disk mmc@ff500000.blk... Disk mmc@ff500000.blk not ready Scanning disk mmc@ff520000.blk... ** Unrecognized filesystem type ** ** Unrecognized filesystem type ** ** Unrecognized filesystem type ** Found 5 disks ** Unable to read file ubootefi.var ** Failed to load EFI variables BootOrder not defined EFI boot manager: Cannot load any image Found EFI removable media binary efi/boot/bootaa64.efi 1263868 bytes read in 33 ms (36.5 MiB/s) Booting /efi\boot\bootaa64.efi Consoles: EFI console Reading loader env vars from /efi/freebsd/loader.env Setting currdev to disk0p1: FreeBSD/arm64 EFI loader, Revision 1.1 (Thu Mar 31 08:48:02 UTC 2022 root@releng1.nyi.freebsd.org) Command line arguments: loader.efi Image base: 0x7cdde000 EFI version: 2.80 EFI Firmware: Das U-Boot (rev 8225.1792) Console: efi (0x1000) Load Path: /efi\boot\bootaa64.efi Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/eMMC(0)/eMMC(1)/HD(1,GPT,64400726-b60c-11ec-a26d-85c343ffa803,0x8000,0x19000) Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/eMMC(0)/eMMC(1)/HD(1,GPT,64400726-b60c-11ec-a26d-85c343ffa803,0x8000,0x19000) Setting currdev to disk0p1: Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/eMMC(0)/eMMC(1)/HD(2,GPT,64400726-b60c-11ec-a26d-85c343ffa803,0x21000,0x1cc6fd8) Setting currdev to disk0p2: / Loading /boot/defaults/loader.conf Loading /boot/defaults/loader.conf Loading /boot/device.hints Loading /boot/loader.conf Loading /boot/loader.conf.local / Loading kernel... /boot/kernel/kernel text=0x2a8 text=0x84f4a0 text=0x249adc data=0x1b9aa8 data=0x0+0x40d000 0x8+0x133de8+0x8+0x15b370\ Loading configured modules... /boot/entropy size=0x1000 /boot/kernel/umodem.ko text=0x2100 text=0x13a0 data=0x6d8+0x10 0x8+0xf18+0x8+0xb5c loading required module 'ucom' /boot/kernel/ucom.ko text=0x2590 text=0x2f00 data=0x8e0+0x858 0x8+0x1290+0x8+0xbd5 /etc/hostid size=0x25 Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... Using DTB provided by EFI at 0x80f0000. EFI framebuffer information: addr, size 0x0, 0x0 dimensions 0 x 0 stride 0 masks 0x00000000, 0x00000000, 0x00000000, 0x00000000 ---<>--- GDB: debug ports: uart GDB: current port: uart KDB: debugger backends: ddb gdb KDB: current backend: ddb Copyright (c) 1992-2022 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 14.0-CURRENT #0 main-n254105-d53927b0bae: Thu Mar 31 09:26:31 UTC 2022 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303) WARNING: WITNESS option enabled, expect reduced performance. VT: init without driver. module firmware already present! real memory = 2145136640 (2045 MB) avail memory = 2065342464 (1969 MB) Starting CPU 1 (1) Starting CPU 2 (2) Starting CPU 3 (3) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs random: unblocking device. random: entropy device external interface MAP 7cf1b000 mode 2 pages 1 MAP 7cf1f000 mode 2 pages 3 MAP 7cf23000 mode 2 pages 4 MAP 7ff40000 mode 2 pages 16 kbd0 at kbdmux0 ofwbus0: clk_fixed0: on ofwbus0 rk_grf0: mem 0xff100000-0xff100fff on ofwbus0 rk3328_cru0: mem 0xff440000-0xff440fff on ofwbus0 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 Cannot set frequency for clk: aclk_bus_pre_c, error: 34 rk3328_cru0: Failed to set aclk_bus_pre to a frequency of 15000000 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 Cannot set frequency for clk: aclk_peri_pre, error: 34 rk3328_cru0: Failed to set aclk_peri_pre to a frequency of 15000000 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clknode_link_recalc: Attempt to use unresolved linked clock: hdmi_phy Cannot get frequency for clk: hdmi_phy, error: 9 clk_fixed1: on ofwbus0 regfix0: on ofwbus0 regfix1: on ofwbus0 regfix2: on ofwbus0 regfix3: on ofwbus0 simple_mfd0: mem 0xff450000-0xff45ffff on ofwbus0 psci0: on ofwbus0 gic0: mem 0xff811000-0xff811fff,0xff812000-0xff813fff,0xff814000-0xff815fff,0xff816000-0xff817fff irq 52 on ofwbus0 gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 160 rk_pinctrl0: on ofwbus0 gpio0: mem 0xff210000-0xff2100ff irq 53 on rk_pinctrl0 gpiobus0: on gpio0 gpio1: mem 0xff220000-0xff2200ff irq 54 on rk_pinctrl0 gpiobus1: on gpio1 gpio2: mem 0xff230000-0xff2300ff irq 55 on rk_pinctrl0 gpiobus2: on gpio2 gpio3: mem 0xff240000-0xff2400ff irq 56 on rk_pinctrl0 gpiobus3: on gpio3 rk_i2c0: mem 0xff160000-0xff160fff irq 16 on ofwbus0 iicbus0: on rk_i2c0 rk805_pmu0: at addr 0x30 irq 57 on iicbus0 generic_timer0: irq 4,5,6,7 on ofwbus0 Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000 Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000 rk_tsadc0: mem 0xff250000-0xff2500ff irq 24 on ofwbus0 cpulist0: on ofwbus0 cpu0: on cpulist0 cpufreq_dt0: on cpu0 cpufreq_dt0: Found cpu-supply cpu1: on cpulist0 cpufreq_dt1: on cpu1 cpufreq_dt1: Found cpu-supply cpu2: on cpulist0 cpufreq_dt2: on cpu2 cpufreq_dt2: Found cpu-supply cpu3: on cpulist0 cpufreq_dt3: on cpu3 cpufreq_dt3: Found cpu-supply pcm0: on ofwbus0 pmu0: irq 0,1,2,3 on ofwbus0 pcm1: on ofwbus0 i2s0: mem 0xff000000-0xff000fff irq 8 on ofwbus0 Cannot set frequency for clk: xin12m, error: 34 Cannot set frequency for clk: xin12m, error: 34 i2s1: mem 0xff010000-0xff010fff irq 9 on ofwbus0 Cannot set frequency for clk: clkin_i2s1, error: 34 Cannot set frequency for clk: xin12m, error: 34 uart0: <16750 or compatible> mem 0xff130000-0xff1300ff irq 14 on ofwbus0 uart0: console (1500000,n,8,1) iic0: on iicbus0 spi0: mem 0xff190000-0xff190fff irq 19 on ofwbus0 spibus0: on spi0 spibus0: at cs 0 mode 0 rockchip_dwmmc0: mem 0xff500000-0xff503fff irq 43 on ofwbus0 rockchip_dwmmc0: Hardware version ID is 270a rockchip_dwmmc1: mem 0xff520000-0xff523fff irq 45 on ofwbus0 rockchip_dwmmc1: Hardware version ID is 270a mmc0: on rockchip_dwmmc1 dwc0: mem 0xff540000-0xff54ffff irq 46 on ofwbus0 miibus0: on dwc0 rgephy0: PHY 0 on miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto rgephy1: PHY 1 on miibus0 rgephy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto dwc0: Ethernet address: xxx dwcotg0: mem 0xff580000-0xff5bffff irq 48 on ofwbus0 usbus1 on dwcotg0 ehci0: mem 0xff5c0000-0xff5cffff irq 49 on ofwbus0 usbus2: EHCI version 1.0 usbus2 on ehci0 ohci0: mem 0xff5d0000-0xff5dffff irq 50 on ofwbus0 usbus3 on ohci0 gpioc0: on gpio0 gpioc1: on gpio1 gpioc2: on gpio2 gpioc3: on gpio3 gpioled0: on ofwbus0 gpioled0: failed to map pin gpioled0: failed to map pin pcm2: on ofwbus0 armv8crypto0: Timecounters tick every 1.000 msec usbus1: 480Mbps High Speed USB v2.0 usbus2: 480Mbps High Speed USB v2.0 usbus3: 12Mbps Full Speed USB v1.0 rk805_pmu0: registered as a time-of-day clock, resolution 1.000000s pcm0: no driver attached to codec node pcm1: no driver attached to codec node ugen2.1: at usbus2 uhub0 on usbus2 uhub0: on usbus2 ugen1.1: at usbus1 uhub1 on usbus1 uhub1: on usbus1 ugen3.1: at usbus3 uhub2 on usbus3 uhub2: on usbus3 mmcsd0: 16GB at mmc0 150.0MHz/8bit/1016-block mmcsd0boot0: 4MB partition 1 at mmcsd0 mmcsd0boot1: 4MB partition 2 at mmcsd0 mmcsd0rpmb: 4MB partition 3 at mmcsd0 pcm2: no driver attached to cpu node CPU 0: ARM Cortex-A53 r0p4 affinity: 0 Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG> Instruction Set Attributes 0 = Instruction Set Attributes 1 = <> Processor Features 0 = Processor Features 1 = <> Memory Model Features 0 = Memory Model Features 1 = <8bit VMID> Memory Model Features 2 = <32bit CCIDX,48bit VA> Debug Features 0 = Debug Features 1 = <> Auxiliary Features 0 = <> Auxiliary Features 1 = <> AArch32 Instruction Set Attributes 5 = AArch32 Media and VFP Features 0 = AArch32 Media and VFP Features 1 = CPU 1: ARM Cortex-A53 r0p4 affinity: 1 CPU 2: ARM Cortex-A53 r0p4 affinity: 2 CPU 3: ARM Cortex-A53 r0p4 affinity: 3 Release APs...done WARNING: WITNESS option enabled, expect reduced performance. Unresolved linked clock found: hdmi_phy Unresolved linked clock found: usb480m_phy Trying to mount root from ufs:/dev/ufs/rootfs [rw]... mmcsd0: Error indicated: 4 Failed uhub2: 1 port with 1 removable, self powered uhub1: 1 port with 1 removable, self powered uhub0: 1 port with 1 removable, self powered -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."