From nobody Fri Jan 06 04:41:36 2023 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 4Np9fT71ypz2qlfZ for ; Fri, 6 Jan 2023 04:41:53 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Np9fT4gTYz4Pty for ; Fri, 6 Jan 2023 04:41:53 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62c.google.com with SMTP id vm8so1241310ejc.2 for ; Thu, 05 Jan 2023 20:41:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=niUKx2f8W+UBjI//J/2wulydmSH0nmA28qC/Us2RoKg=; b=UlSNkWEZtndy772mfogtLQ2fNKU38OqPYi9RfKglGDArBRu3uxKrnizLE2esStUaRh CNczhq5W9G1/fXM2/U0KFfZS7/Wcjf/FXQkkfidxlDI+oplLNx2hLoQD4F4RcQ7RhzBq k+RvwhFTAnpGjH1EmzW/ucxJjeNjsuScXIU+VDT2kjcQZdQDkJLaHpvW3eMykazeld+q aKdp4j+tkAdMABwrT7fc/3WJNomsmkw6GtYPJtfv3EHUG6a4vwiPd61Ty7pVgsaZ0ulN 5QdJjISjHBy82YOgAHNSh+SokkKMujiEsfMElNh5KrrGkzPXzLQbe31EZP0yXyJfTtDW TOEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=niUKx2f8W+UBjI//J/2wulydmSH0nmA28qC/Us2RoKg=; b=eZbB5LwV5u8/SetHUfO5LI8BxHc/8E77ei97gRebLD1rLeJHB8Iza3SqyCUtXsbfBr FINlWMv0IBkVHD4FRS/tqYixbeX7gbLnHyDS88M9QOvXmgWcgcSQpVPUVJ4if/pMg0nY T1nQTawYBGTe8uWEstJmRvyN1I4CuHGdcBf/vVVMHaHE4fspib+/pfPgDbgwoDKW0pHJ +7sfmPkfHDEaEv7ZzbhBth5C8b8x1jzAXwHOoLdRWlJvgIowjdbnjsSMQXSzwniCQ2HN GDMDbfx/cHF4y0zrkYDNmGHuQkXPQpQ4N2Si0TFFtrJVsbTlBFQ/oxZdMsVTuLC4LyW1 RI+g== X-Gm-Message-State: AFqh2kq5Dr1nE3cJx76yAwsLGBXrSnxHn60TFCNWjP1yVj+DuTvmYtvQ 2X/NgLR0ElQuGKBMCl6qvYA= X-Google-Smtp-Source: AMrXdXusVw1QpDiWSDTa6iZ+6tiQrughuaEQeqSmjJmwRX6bHs3VTAW0g4P9+9VsjNZclTsMl32tYQ== X-Received: by 2002:a17:906:3c18:b0:7ba:9b49:53d4 with SMTP id h24-20020a1709063c1800b007ba9b4953d4mr44466620ejg.71.1672980109403; Thu, 05 Jan 2023 20:41:49 -0800 (PST) Received: from smtpclient.apple (dynamic-046-114-061-228.46.114.pool.telefonica.de. [46.114.61.228]) by smtp.googlemail.com with ESMTPSA id g10-20020a17090604ca00b007aef930360asm29277eja.59.2023.01.05.20.41.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2023 20:41:48 -0800 (PST) From: =?utf-8?Q?Klaus_K=C3=BCchemann?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: (RPi) db> reboot -> cpu_reset failed [Klus's crash] Date: Fri, 6 Jan 2023 05:41:36 +0100 References: <29q7q878-091-r17n-8r3n-o3n68p3646@mnoonqbm.arg> <38B92299-2776-476D-A81F-7C8EB4D59A13@googlemail.com> <894C0DAA-A199-434A-A5D7-C4BB1FBC5BEC@yahoo.com> To: Mark Millard , "Bjoern A. Zeeb" , freebsd-arm@freebsd.org In-Reply-To: <894C0DAA-A199-434A-A5D7-C4BB1FBC5BEC@yahoo.com> Message-Id: <650C4A06-1205-489A-B69A-0BB657F1C0E5@googlemail.com> X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Rspamd-Queue-Id: 4Np9fT4gTYz4Pty X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Mark, thanks for the detailed hints ! I will investigate in that firmware issues/your suggested patch,=20 and will report back later. Regards K. > Am 05.01.2023 um 21:43 schrieb Mark Millard : >=20 > On Jan 5, 2023, at 11:32, Klaus K=C3=BCchemann = wrote: >=20 >> Hi Bj=C3=B6rn, >> ( ..I had a JTAG setup on the PI, but didn=E2=80=99t use it for some = time..) >>=20 >> yes that was a "live=E2=80=9C boot example from today of the cm4(on = orig. I/O-board), >> it hangs while initializing sdhci, while the boot partition is living = on the emmc : >> =E2=80=94 >>=20 >> sdhci_bcm0: mem = 0x7e300000-0x7e3000ff irq 24 on simplebus0 >> Fatal data abort: >> x0: ffffffff >> x1: ffff00000092b404 >> x2: 0 >> x3: 6 >> x4: ffff000000fdf77c >> x5: ffff000000fdf72c >> x6: 4000000 >> x7: 4000000 >> x8: ffff000000dfb6a0 >> x9: 20 >> x10: 0 >> x11: 1 >> x12: 300000000006e65 >> x13: fefefefeff0100 >> x14: 1d >> x15: 0 >> x16: 0 >> x17: 0 >> x18: ffff000000fdf7e0 >> x19: ffffffff >> x20: 0 >> x21: ffff000000bad000 >> x22: ffff000000bad000 >> x23: ffffa00000f8f038 >> x24: ffff00000091b5b2 >> x25: ffff0000008dfc9c >> x26: ffff0000009436b6 >> x27: ffffa00000f8b140 >> x28: 32000000 >> x29: ffff000000fdf7e0 >> sp: ffff000000fdf7e0 >> lr: ffff000000868040 >> elr: ffff0000008620d4 >> spsr: a00000c5 >> far: 20 >> esr: 96000004 >> panic: vm_fault failed: ffff0000008620d4 >> cpuid =3D 0 >> time =3D 1 >> KDB: stack backtrace: >> #0 0xffff000000516458 at kdb_backtrace+0x60 >> #1 0xffff0000004c24ac at vpanic+0x174 >> #2 0xffff0000004c2334 at panic+0x44 >> #3 0xffff0000007f48c0 at data_abort+0x204 >> #4 0xffff0000007d5010 at handle_el1h_sync+0x10 >> #5 0xffff00000086803c at bcm_sdhci_attach+0x314 >> #6 0xffff00000086803c at bcm_sdhci_attach+0x314 >> #7 0xffff000000502428 at device_attach+0x3fc >> #8 0xffff000000504514 at bus_generic_new_pass+0x120 >> #9 0xffff0000005044a4 at bus_generic_new_pass+0xb0 >> #10 0xffff0000005044a4 at bus_generic_new_pass+0xb0 >> #11 0xffff0000005044a4 at bus_generic_new_pass+0xb0 >> #12 0xffff0000005065f4 at root_bus_configure+0x40 >> #13 0xffff000000439ee8 at mi_startup+0x11c >> #14 0xffff0000000008b4 at virtdone+0x78 >> Uptime: 1s >>=20 >=20 > You are using modern enough RPI* firmware that the FreeBSD > kernel does not tolerate it. Same sort of backtrace as I > reported back in 2022-Apr when I explored what RPi* > firmware releases avoided kernel crashes on RPi4B's, > such as: >=20 > KDB: stack backtrace: > #0 0xffff000000516268 at kdb_backtrace+0x60 > #1 0xffff0000004c22bc at vpanic+0x174 > #2 0xffff0000004c2144 at panic+0x44 > #3 0xffff0000007f4928 at data_abort+0x204 > #4 0xffff0000007d5010 at handle_el1h_sync+0x10 > #5 0xffff00000086809c at bcm_sdhci_attach+0x314 > #6 0xffff00000086809c at bcm_sdhci_attach+0x314 > #7 0xffff000000502238 at device_attach+0x3fc > #8 0xffff000000504324 at bus_generic_new_pass+0x120 > #9 0xffff0000005042b4 at bus_generic_new_pass+0xb0 > #10 0xffff0000005042b4 at bus_generic_new_pass+0xb0 > #11 0xffff0000005042b4 at bus_generic_new_pass+0xb0 > #12 0xffff000000506404 at root_bus_configure+0x40 > #13 0xffff000000439cf8 at mi_startup+0x11c > #14 0xffff0000000008b4 at virtdone+0x78 >=20 > In: >=20 > = https://lists.freebsd.org/archives/freebsd-arm/2022-December/002115.html >=20 > I reported what I'm experimenting with (2nd version) for 13.1 and > main for allowing modern RPi* firmware. It basically leads to > bcm_dma being set up earlier so it is available for reference in > the bcm_sdhci_attach activity. >=20 > If you build your own kernel with the type of patching that > I report, the specific crash should disappear and booting > with modern RPi* firmware seems to have worked for me so > far on the machines I've done the experimenting on. >=20 > Expect more messages caused by new things in the .dtb files > that the kernel does not support but keeps rechecking during > boot. Sort of a noisy form of otherwise-ignored. >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com