From nobody Sat Apr 09 14:00:36 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 20C051A894DA for ; Sat, 9 Apr 2022 14:00:41 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4KbGwm1jY4z4knL for ; Sat, 9 Apr 2022 14:00:40 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.16.1/8.16.1) with ESMTP id 239E0a30082900; Sat, 9 Apr 2022 09:00:38 -0500 (CDT) (envelope-from mike@karels.net) Received: from [10.0.2.130] ([10.0.1.1]) by mail.karels.net with ESMTPSA id M8GMK4SRUWLSQwEA4+wvSQ (envelope-from ); Sat, 09 Apr 2022 09:00:36 -0500 From: Mike Karels To: Andrew Turner Cc: bob prohaska , Free BSD Subject: Re: RPI4 panic on boot with -current Date: Sat, 09 Apr 2022 09:00:36 -0500 X-Mailer: MailMate (1.14r5818) Message-ID: <428D955C-E775-4F34-A548-297CD89BD764@karels.net> In-Reply-To: <2679B86C-CB1C-44E8-A43E-C9E2533322B9@fubar.geek.nz> References: <20220409015321.GA52002@www.zefox.net> <2679B86C-CB1C-44E8-A43E-C9E2533322B9@fubar.geek.nz> 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 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4KbGwm1jY4z4knL X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [1.34 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_MISSING_CHARSET(2.50)[]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[karels.net]; NEURAL_HAM_LONG(-0.95)[-0.948]; NEURAL_SPAM_SHORT(0.99)[0.990]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 9 Apr 2022, at 6:46, Andrew Turner wrote: > Does the patch in https://reviews.freebsd.org/D34858 allow the system t= o boot? The EFI runtime services may not work, but it should stop the pan= ic. It works on my RPi4 (original 4 GB model), which had the problem too. Mike > Andrew > >> On 9 Apr 2022, at 02:53, bob prohaska wrote: >> >> Might this be related to "RPi4B's got a PMIC replacement,..." reported= 4/3 ? >> >> A Pi4 (mechanical disk only, no microsd) trying to boot a fresh build = of >> -current reports: >> >> Resetting system ... >> >> U-Boot 2020.10 (Mar 04 2021 - 04:32:31 +0000) >> >> DRAM: 7.9 GiB >> RPI 4 Model B (0xd03114) >> MMC: mmc@7e300000: 1, emmc2@7e340000: 0 >> Loading Environment from FAT... sdhci_set_clock: Timeout to wait cmd &= data inhibit >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_send_command: MMC: 1 busy timeout increasing to: 200 ms. >> sdhci_send_command: MMC: 1 busy timeout increasing to: 400 ms. >> sdhci_send_command: MMC: 1 busy timeout increasing to: 800 ms. >> sdhci_send_command: MMC: 1 busy timeout increasing to: 1600 ms. >> sdhci_send_command: MMC: 1 busy timeout increasing to: 3200 ms. >> sdhci_send_command: MMC: 1 busy timeout. >> In: serial >> Out: vidconsole >> Err: vidconsole >> Net: eth0: ethernet@7d580000 >> PCIe BRCM: link up, 5.0 Gbps x1 (SSC) >> starting USB... >> Bus xhci_pci: Register 5000420 NbrPorts 5 >> Starting the controller >> USB XHCI 1.00 >> scanning bus xhci_pci for devices... 6 USB Device(s) found >> scanning usb for storage devices... 1 Storage Device(s) found >> Hit any key to stop autoboot: 0 >> Card did not respond to voltage select! >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_send_command: MMC: 1 busy timeout. >> >> Device 0: Vendor: SABRENT Rev: 0204 Prod: >> Type: Hard Disk >> Capacity: 953869.7 MB =3D 931.5 GB (1953525168 x 512) >> ... is now current device >> Scanning usb 0:1... >> Found EFI removable media binary efi/boot/bootaa64.efi >> libfdt fdt_check_header(): FDT_ERR_BADMAGIC >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_set_clock: Timeout to wait cmd & data inhibit >> sdhci_send_command: MMC: 1 busy timeout. >> Scanning disk mmc@7e300000.blk... >> Disk mmc@7e300000.blk not ready >> Card did not respond to voltage select! >> Scanning disk emmc2@7e340000.blk... >> Disk emmc2@7e340000.blk not ready >> Scanning disk usb_mass_storage.lun0... >> ** Unrecognized filesystem type ** >> Found 3 disks >> No EFI system partition >> BootOrder not defined >> EFI boot manager: Cannot load any image >> 1259292 bytes read in 5 ms (240.2 MiB/s) >> libfdt fdt_check_header(): FDT_ERR_BADMAGIC >> Booting /efi\boot\bootaa64.efi >> >> [whitespace trimmed] >> >> 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 4 07:32:03 UTC 2021 root@releng1.nyi.freebsd.org) >> >> Command line arguments: loader.efi >> Image base: 0x39cfc000 >> EFI version: 2.80 >> EFI Firmware: Das U-Boot (rev 8224.4096) >> Console: comconsole (0) >> Load Path: /efi\boot\bootaa64.efi >> Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/UsbClass(0= x0,0x0,0x9,0x0,0x3)/UsbClass(0x152d,0x1561,0x0,0x0,0x0)/HD(1,0x01,0,0x81f= ,0x18fa8) >> Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/UsbClass(0x0,= 0x0,0x9,0x0,0x3)/UsbClass(0x152d,0x1561,0x0,0x0,0x0)/HD(1,0x01,0,0x81f,0x= 18fa8) >> Setting currdev to disk0p1: >> Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/UsbClass(0x0,0x0,= 0x9,0x0,0x3)/UsbClass(0x152d,0x1561,0x0,0x0,0x0)/HD(2,0x01,0,0x197c7,0x74= 6ed5e9) >> 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=3D0x2a8 text=3D0x851220 text=3D0x24be84 data=3D= 0x1b9ba8 data=3D0x0+0x34f000 syms=3D[0x8+0x134028+0x8+0x15b5e1] >> Loading configured modules... >> /boot/kernel/filemon.ko text=3D0x1867 text=3D0x2558 data=3D0x510+0x20 = syms=3D[0x8+0xd08+0x8+0x7c9] >> /boot/kernel/umodem.ko text=3D0x2100 text=3D0x13a0 data=3D0x6d8+0x10 s= yms=3D[0x8+0xf18+0x8+0xb5c] >> loading required module 'ucom' >> /boot/kernel/ucom.ko text=3D0x2590 text=3D0x2f00 data=3D0x8e0+0x858 sy= ms=3D[0x8+0x1290+0x8+0xbd5] >> /boot/entropy size=3D0x1000 >> /etc/hostid size=3D0x25 >> >> Hit [Enter] to boot immediately, or any other key for command prompt. >> Booting [/boot/kernel/kernel]... >> Using DTB provided by EFI at 0x7ef0000. >> EFI framebuffer information: >> addr, size 0x3e22c000, 0x8ca000 >> dimensions 1920 x 1200 >> stride 1920 >> masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 >> ---<>--- >> GDB: debug ports: uart >> GDB: current port: uart >> KDB: debugger backends: ddb gdb >> KDB: current backend: ddb >> WARNING: Cannot find freebsd,dts-version property, cannot check DTB co= mpliance >> Copyright (c) 1992-2022 The FreeBSD Project. >> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 19= 94 >> The Regents of the University of California. All rights reserve= d. >> FreeBSD is a registered trademark of The FreeBSD Foundation. >> FreeBSD 14.0-CURRENT #40 main-aa597d4049-dirty: Fri Apr 8 11:44:42 PD= T 2022 >> bob@nemesis.zefox.com:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC ar= m64 >> FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llv= morg-13.0.0-0-gd7b669b3a303) >> WARNING: WITNESS option enabled, expect reduced performance. >> VT(efifb): resolution 1920x1200 >> module firmware already present! >> real memory =3D 8441835520 (8050 MB) >> avail memory =3D 8206352384 (7826 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 >> Fatal data abort: >> x0: ffffa0003b25dad0 >> x1: 8 >> x2: ffff00000088db8d (do_execve.fexecv_proc_title + 7674) >> x3: 78a >> x4: 0 >> x5: 69 >> x6: 40a7152f >> x7: f2db3c10 >> x8: ffffa0003b25dad0 >> x9: 200000000 >> x10: ffffa00000000000 >> x11: 3b25dad0 >> x12: 725f696665006966 >> x13: 100000102ff0001 >> x14: ffff000000b07300 (lock_class_mtx_sleep + 0) >> x15: 0 >> x16: 8 >> x17: f4b3707d >> x18: ffff000000fa79b0 (initstack + 39b0) >> x19: ffffa000008db380 >> x20: ffff000000ab4810 (efirt_moddata + 0) >> x21: ffff000000911163 (console_pausestr + 13a59) >> x22: ffff000000c6d000 (db_watch_table + b88) >> x23: ffff000000ba1000 (compiler_version + 20) >> x24: ffff000000dfb000 (gdb_tx_u + aa0) >> x25: 0 >> x26: ffff0000008a1723 (do_execve.fexecv_proc_title + 1b20a) >> x27: 3100000 >> x28: ffff000000dfb000 (gdb_tx_u + aa0) >> x29: ffff000000fa79c0 (initstack + 39c0) >> sp: ffff000000fa79b0 >> lr: ffff000000157ac4 (efirt_modevents + 78) >> elr: ffff000000157ad0 (efirt_modevents + 84) >> spsr: 200000c5 >> far: ffffa0003b25dad0 >> esr: 96000007 >> panic: vm_fault failed: ffff000000157ad0 error 1 >> cpuid =3D 0 >> time =3D 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+0x2f0 >> handle_el1h_sync() at handle_el1h_sync+0x10 >> --- exception, esr 0x96000007 >> efirt_modevents() at efirt_modevents+0x84 >> module_register_init() at module_register_init+0xc4 >> mi_startup() at mi_startup+0x130 >> virtdone() at virtdone+0x7c >> KDB: enter: panic >> [ thread pid 0 tid 100000 ] >> Stopped at kdb_enter+0x44: undefined f902011f >> db> bt >> Tracing pid 0 tid 100000 td 0xffff000000dfc0e0 >> db_trace_self() at db_trace_self >> db_stack_trace() at db_stack_trace+0x11c >> db_command() at db_command+0x368 >> db_command_loop() at db_command_loop+0x54 >> db_trap() at db_trap+0xf8 >> kdb_trap() at kdb_trap+0x1cc >> handle_el1h_sync() at handle_el1h_sync+0x10 >> --- exception, esr 0xf2000000 >> kdb_enter() at kdb_enter+0x44 >> vpanic() at vpanic+0x1b0 >> panic() at panic+0x44 >> data_abort() at data_abort+0x2f0 >> handle_el1h_sync() at handle_el1h_sync+0x10 >> --- exception, esr 0x96000007 >> efirt_modevents() at efirt_modevents+0x84 >> module_register_init() at module_register_init+0xc4 >> mi_startup() at mi_startup+0x130 >> virtdone() at virtdone+0x7c >> db> >> >> followed by >> >> db> reboot >> cpu_reset failed >> >> After power cycle the machine rebooted to >> FreeBSD 14.0-CURRENT #34 main-79c4c4be96-dirty: Tue Apr 5 09:26:19 PD= T 2022 >> without obvious problems. "Dirty" is in reference to /usr/src/tests, I= 've >> refrained from tampering with the sources. >> >> Thanks for reading, >> >> bob prohaska >> >>