From nobody Sun Dec 12 00:19:15 2021 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 CB5E918E722D for ; Sun, 12 Dec 2021 00:19:31 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-25.consmr.mail.gq1.yahoo.com (sonic311-25.consmr.mail.gq1.yahoo.com [98.137.65.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JBQHk5Dhfz3mTJ for ; Sun, 12 Dec 2021 00:19:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639268363; bh=U1DnYM/xiG2HhiFvAOw9BCkRNJQIsusuQN2nKu73sq8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=OjCX1XIlGLEptxe3TR07rPqHxodPdSp8USA6enNMFepRj7//inZtTNjYsJbpyQoxDvIl8nbytm59GKBTprdQAhd/enkQ6Ih6naJg9i9rGrWHXXUPCotV25TiSWT4OERFL9wiqqF80Uc1/hMI37NJRQ8O2E/Iho9jT54CSDodErYT2+dabpvcT07p3s/uyN1D6GZzqCmyOu4zKMR0cGyvWCjaP71HjbqQW1DpEvrf5HBgMvKD2+B/26N3+Z9h9KsLNfNBPKiDcDFLE0j1kBuxYcD8HcN2/QBiOjlsQFgGJeVOOhog+kdA/Qk1y4O2dEwF2f7S+WpOmY7Sk8wo3tyi2g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639268363; bh=hLGlkPQxwa0cGzdYnuuESTvKTxDEFFSPlJ5HcfR0sji=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=GJpzYr0Hqt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hP16LrOxHYUJz7FOyEG Ew3OBZQhTap0nVJiYl_C4xux68CqnVNJojSTUyxSnDDw7JfBZc6PNos65kRQMpaQuvJ3ph3yDwTo .w8EBHbayNEWKPd9aqOYxPgmyrnX0rqMF0P70TaSPUmuCZdbPNtXcAgolr3HG1r7TX.PpgG4z6rB Hd0DKHMM_IhOO8Xjzu6t9UEFiQZ_VvQUCxIhNxNujzkTQT71iRAdfTTQc8945276fgGumGvDX40O G5e5rNelfmElWelVtXe_PZG68gRdm6.rOwqG0s142UoazcL1tzmWUx.dm4namOGpIP.iVswjZHI7 dX1DJ.RAE8AQlEJ0UDZcj4HAyFHyrhC_g38OXDvgQWiXidLVnhgsqsOVtJjOsA9BfJgom299bojo 9oBKnrf724UHrgnHRpxYFzKDYD4brb60OZsH56v5jWGIIyadtNKcLUa0IgmjRfTKz.wykV6K6Zsk ndpFgiSj6cvDQFhmjTzrMBlX5fNWBl1enAfU71qc- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Sun, 12 Dec 2021 00:19:23 +0000 Received: by kubenode512.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 16d71f55615f10c8571ccdd7233f3d84; Sun, 12 Dec 2021 00:19:18 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 14.0 \(3654.120.0.1.13\)) Subject: Re: Rock64 configuration fails to boot for main 22c4ab6cb015 but worked for main 06bd74e1e39c (Nov 21): e.MMC mishandled? In-Reply-To: Date: Sat, 11 Dec 2021 16:19:15 -0800 Cc: =?utf-8?Q?Kornel_Dul=C4=99ba?= , Emmanuel Vadot Content-Transfer-Encoding: quoted-printable Message-Id: <7717F6CF-0239-4DC0-B23F-B9D5F75C0A8D@yahoo.com> References: <243CBFC7-DFB5-4F8B-A8A3-CFF78455148D.ref@yahoo.com> <243CBFC7-DFB5-4F8B-A8A3-CFF78455148D@yahoo.com> <20211209081930.7970b6995a8f7c5f7466227d@bidouilliste.com> <053617FD-AA34-4A3F-853A-4D2E44F8254B@yahoo.com> <43901D57-9C39-4FAC-A2BE-CCE642791705@yahoo.com> <8DAA50A1-3CF0-4AFA-9977-58FE15D4F171@yahoo.com> <21B0478B-340F-4BB2-9189-B5A6AE458134@yahoo.com> To: Free BSD X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4JBQHk5Dhfz3mTJ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=OjCX1XIl; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-0.66 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-0.78)[-0.781]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(0.62)[0.621]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.206:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.206:from]; RCVD_COUNT_TWO(0.00)[2] Reply-To: marklmi@yahoo.com From: Mark Millard via freebsd-arm X-Original-From: Mark Millard X-ThisMailContainsUnwantedMimeParts: N [I've cut out the history: just presenting some new evidence.] First, a little context from getting to the db> prompt. db> ps pid ppid pgrp uid state wmesg wchan cmd 18 0 0 0 DL syncer 0xffff000000eca5a8 [syncer] 17 0 0 0 DL vlruwt 0xffffa00007d2ea60 [vnlru] 16 0 0 0 DL (threaded) [bufdaemon] 100089 D qsleep 0xffff000000ec9478 [bufdaemon] 100092 D - 0xffff000000c11100 = [bufspacedaemon-0] 100093 D - 0xffff000000c21680 = [bufspacedaemon-1] 9 0 0 0 DL psleep 0xffff000000ef0650 [vmdaemon] 8 0 0 0 DL (threaded) = [pagedaemon] 100087 D psleep 0xffff000000ee2b38 [dom0] 100094 D launds 0xffff000000ee2b44 [laundry: = dom0] 100095 D umarcl 0xffff0000007b38d8 [uma] 7 0 0 0 DL mmcsd d 0xffffa00007b72e00 = [mmcsd0boot1: mmc/sd] 6 0 0 0 DL mmcsd d 0xffffa00007b71300 = [mmcsd0boot0: mmc/sd] 5 0 0 0 DL mmcreq 0xffff00009b5d0710 [mmcsd0: = mmc/sd card] 4 0 0 0 DL - 0xffff000000ccc020 = [rand_harvestq] 15 0 0 0 DL (threaded) [usb] . . . and "mmcreq" is from the while loop in: static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req) { =20 req->done =3D mmc_wakeup; req->done_data =3D sc; if (__predict_false(mmc_debug > 1)) { device_printf(sc->dev, "REQUEST: CMD%d arg %#x flags = %#x", req->cmd->opcode, req->cmd->arg, req->cmd->flags); = =20 if (req->cmd->data) { printf(" data %d\n", (int)req->cmd->data->len);=20= } else printf("\n"); } MMCBR_REQUEST(device_get_parent(sc->dev), sc->dev, req); MMC_LOCK(sc); while ((req->flags & MMC_REQ_DONE) =3D=3D 0) msleep(req, &sc->sc_mtx, 0, "mmcreq", 0); MMC_UNLOCK(sc); if (__predict_false(mmc_debug > 2 || (mmc_debug > 0 && req->cmd->error !=3D MMC_ERR_NONE))) device_printf(sc->dev, "CMD%d RESULT: %d\n", req->cmd->opcode, req->cmd->error); return (0); } So it appears that the error report: mmcsd0: Error indicated: 4 Failed ends up associated with (req->flags & MMC_REQ_DONE) =3D=3D 0 staying true in the above code: an unbounded loop with MMC_LOCK(sc) active. The "4" in the error report seems to be from: #define MMC_ERR_FAILED 4 It looks like there are some problems with handling errors, problems such that it gets stuck looping (no panic, no progress). That seems to be separate from why the MMC_ERR_FAILED was generated in the first place. So: 2 problems, not just one. Thus it may be a good context for tackling the looping problem with a known example failure to look at. Just for reference, I tried "boot -v" with debug.verbose_sysinit=3D1 in = place, just to capture and report the tail of the output for the boot failure. . . . subsystem f000000 release_aps(0)... Release APs...done done. intr_irq_shuffle(0)... Trying to mount root from = ufs:/dev/gpt/Rock64root []... done. netisr_start(0)... done. taskqgroup_bind_softirq(0)... done. GEOM: new disk mmcsd0 GEOM: new disk mmcsd0boot0 GEOM: new disk mmcsd0boot1 smp_after_idle_runnable(0)... done. taskqgroup_bind_if_config_tqg(0)... done. taskqgroup_bind_if_io_tqg(0)... done. tmr_setup_user_access(0)... done. subsystem f000001 mmcsd0: Error indicated: 4 Failed epoch_init_smp(0)... done. subsystem f100000 racctd_init(0)... done. subsystem fffffff start_periodic_resettodr(0)... done. oktousecallout(0)... done. clknode_finish(0)... Unresolved linked clock found: hdmi_phy Unresolved linked clock found: usb480m_phy done. regulator_constraint(0)... done. regulator_shutdown(0)... regulator: shutting down unused regulators regulator: shutting down vcc_sd... busy done. uhub0: 1 port with 1 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub3: 1 port with 1 removable, self powered uhub1: 1 port with 1 removable, self powered ugen4.2: at usbus4 umass0 on uhub2 umass0: on = usbus4 umass0: SCSI over Bulk-Only; quirks =3D 0x0000 umass0:0:0: Attached to scbus0 pass0 at umass-sim0 bus 0 scbus0 target 0 lun 0 pass0: Fixed Direct Access SPC-4 SCSI device pass0: Serial Number REPLACED pass0: 400.000MB/s transfers da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SPC-4 SCSI device da0: Serial Number REPLACED da0: 400.000MB/s transfers da0: 953869MB (1953525168 512 byte sectors) da0: quirks=3D0x2 da0: Delete methods: random: unblocking device. No more output after that. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)