From nobody Thu Aug 1 13:14:15 2024 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 4WZTvT5Ln4z5Slrq for ; Thu, 01 Aug 2024 13:14:29 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZTvT2MDBz46HD for ; Thu, 1 Aug 2024 13:14:29 +0000 (UTC) (envelope-from kamalpr@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-26119999171so4828649fac.2 for ; Thu, 01 Aug 2024 06:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722518068; x=1723122868; darn=freebsd.org; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=w6uX49nXE+eTOWQfuUbKUt7qQddwyIaBnWKhRoCMIUM=; b=D9PAOADQeqqCkKoNU2FrBHcZfjIAEpSCHoTHygWWbED4PmZ1HVOI02yE+4EUV+ZhEn RPM0k2ri22D4msxO4JMo1AaO1sEQDh0JsBmJBjro9JuGElMd1XjA7Ir9hg5xTuPP6CJP NExJqBHv7+O6w0nKpra+6L9dXWNude/6LmEzdDPPv13Vr0hmgV9TBihJU3B2qIHhmcTs YGkhejNnELEZ1OVSbz6uZZ+8XoZIF85AUxPJwK+t3AOM0XVUZ2yr8bDRGKO8Y9ec4yLw +OsgNAUUypO8BVj2FpbyulJbkM5qr5rQsGChdWXuMUZGxsGLCmbtIu7kyT5AdW+p9P73 uZeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722518068; x=1723122868; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w6uX49nXE+eTOWQfuUbKUt7qQddwyIaBnWKhRoCMIUM=; b=ui6QfB+yIVFLVBsoSrLpMkcr5oSIe30l87wTwcMBlRC+z9/PZdXc0YhlTPNFokLjsZ aRr38JSo5pZxT0APsRARQVUQcu8XjreUnjhbBc0czf/K1SVxhivXBkCXBGntTBINWPgU Ij7N5ODpqWUQtWHfHWMKXmqIj31WNCvYLoWuX3JZ3AGkYhwewDwwUw9RuC9HyiqyIuTh KN7B4vY0Hq96vyjN4yoFO5lpBEtVOuCpZbArTsHeM2SFoggwoBkZ5zc8PQHof8l70GDB T7VJT6qyt5/g6gvAo7hT2NekHekTi/oWkJ8YGn43v4cP3zulaPzy5gH+dxBpA3XMhzEE AqMA== X-Gm-Message-State: AOJu0YyinvnFYQ38x6VTDiM91iCDffngY2gO3zvniV1M5pHE3hr33d0U hFGoC83wLg9NmJfHOJUtpiCLIvrwN1JdIqakPxkLrjgt04UbG5j/oTAL7a251lh7S+rYy2H9vXt q7lIL5AV0cgKmUMMPVtVv4LUazkrUi30= X-Google-Smtp-Source: AGHT+IFLM6a5yXN6cCb9tchxe1lbA7XyUpMBsxIWx8doZ1PzSigxfSKLS07QACItU6Odt8VMHUj6Z0smwcsDJNnc50w= X-Received: by 2002:a05:6871:5b2a:b0:254:8666:cded with SMTP id 586e51a60fabf-26891d3b2acmr53048fac.11.1722518067683; Thu, 01 Aug 2024 06:14:27 -0700 (PDT) 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 References: <8734notn15.wl-herbert@gojira.at> In-Reply-To: <8734notn15.wl-herbert@gojira.at> Reply-To: kamalpr@gmail.com From: "Kamal R. Prasad" Date: Thu, 1 Aug 2024 18:44:15 +0530 Message-ID: Subject: Re: SD card timeouts on older Raspberry Pi 4 models on 14.1-BETA To: herbert@gojira.at Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="0000000000008b2968061e9efd18" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Queue-Id: 4WZTvT2MDBz46HD --0000000000008b2968061e9efd18 Content-Type: text/plain; charset="UTF-8" I had a similar problem on an eMMC card. The problem was that during boot up, a large contiguous block was being fetched and the kernel could handle only blocks of a certain block size. Hope this helps. Thanks -kamal On Thu, Aug 1, 2024, 18:31 Herbert J. Skuhra wrote: > On Tue, 07 May 2024 18:50:38 +0200, Mike Karels wrote: > > > > I tried to install 14.1-BETA1 on one of the first-generation Raspberry > Pi 4 > > systems. The kernel loads and starts, but is unable to mount the root > file > > system due to timeout errors like this: > > > > sdhci_bcm1-slot0: Controller timeout > > [register dump] > > mmcsd0: Error indicated: 1 Timeout > > [several timeouts later] > > Mounting from ufs:/dev/ufs/rootfs failed with error 19. > > > > Mark Millard also saw the error on a similar-vintage RPi4, but not on a > newer > > model (C0T). The EEPROM had been updated on his older RPi4 recently; my > > EEPROM was updated a year or so ago. My RPi3 boots also; it seems to use > > the same driver for the sdhci. I have used the same SD card for both > BETA1 > > and a recent snapshot of -current, with only BETA1 failing. If I recall > > correctly, 14.0 worked on the SD card too. > > > > I tested several recent snapshots of -current, and they seemed to work > without > > problems. I haven't noticed relevant differences between 14.1 and > -current, > > e.g. the sdhci controller driver, but something must be different. > Anyone have > > an idea, or suggestion on where to look? It would be nice to resolve > this > > before 14.1-RELEASE. > > > > Mike > > > > Excerpts from the boot log: > > > > sdhci_bcm1: mem 0x7e340000-0x7e3400ff > irq 79 on simplebus1 > > mmc1: on sdhci_bcm1 > > ... > > mmcsd0: 63GB at mmc1 > 50.0MHz/4bit/65535-block > > ... > > sdhci_bcm1-slot0: Controller timeout > > sdhci_bcm1-slot0: ============== REGISTER DUMP ============== > > sdhci_bcm1-slot0: Sys addr: 0x000000c8 | Version: 0x00001002 > > sdhci_bcm1-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000001 > > sdhci_bcm1-slot0: Argument: 0x0747afff | Trn mode: 0x00000012 > > sdhci_bcm1-slot0: Present: 0x1fff0a06 | Host ctl: 0x00000007 > > sdhci_bcm1-slot0: Power: 0x0000000f | Blk gap: 0x00000080 > > sdhci_bcm1-slot0: Wake-up: 0x00000000 | Clock: 0x00000107 > > sdhci_bcm1-slot0: Timeout: 0x00000003 | Int stat: 0x00000021 > > sdhci_bcm1-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff0008 > > sdhci_bcm1-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000 > > sdhci_bcm1-slot0: Caps: 0x45ee6432 | Caps2: 0x0000a525 > > sdhci_bcm1-slot0: Max curr: 0x00080008 | ADMA err: 0x00000000 > > sdhci_bcm1-slot0: ADMA addr:0x00000000 | Slot int: 0x00000000 > > sdhci_bcm1-slot0: =========================================== > > mmcsd0: Error indicated: 1 Timeout > > ... > > mmcsd0: Error indicated: 1 Timeout > > mountroot: waiting for device /dev/ufs/rootfs... > > Mounting from ufs:/dev/ufs/rootfs failed with error 19. > > Could you resolve this issue? > > I am running stable/14-n268234-f5fabf3dcfb on my Raspberry Pi 4 and > have the same issue after updating U-Boot from 2024.01 to 2024.04. :-( > > Do I/we need a newer firmware? > > --0000000000008b2968061e9efd18 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I had a similar problem on an eMMC card. The problem was tha= t during boot up, a large contiguous block was being fetched and the kernel= could handle only blocks of a certain block size. Hope this helps.

Thanks
-kamal


On Thu= , Aug 1, 2024, 18:31 Herbert J. Skuhra <herbert@gojira.at> wrote:
On Tue, 07 May 2024 18:50:38 +0200, Mike Karels wrote:
>
> I tried to install 14.1-BETA1 on one of the first-generation Raspberry= Pi 4
> systems.=C2=A0 The kernel loads and starts, but is unable to mount the= root file
> system due to timeout errors like this:
>
> sdhci_bcm1-slot0: Controller timeout
> [register dump]
> mmcsd0: Error indicated: 1 Timeout
> [several timeouts later]
> Mounting from ufs:/dev/ufs/rootfs failed with error 19.
>
> Mark Millard also saw the error on a similar-vintage RPi4, but not on = a newer
> model (C0T).=C2=A0 The EEPROM had been updated on his older RPi4 recen= tly; my
> EEPROM was updated a year or so ago.=C2=A0 My RPi3 boots also; it seem= s to use
> the same driver for the sdhci.=C2=A0 =C2=A0I have used the same SD car= d for both BETA1
> and a recent snapshot of -current, with only BETA1 failing.=C2=A0 If I= recall
> correctly, 14.0 worked on the SD card too.
>
> I tested several recent snapshots of -current, and they seemed to work= without
> problems.=C2=A0 I haven't noticed relevant differences between 14.= 1 and -current,
> e.g. the sdhci controller driver, but something must be different.=C2= =A0 Anyone have
> an idea, or suggestion on where to look?=C2=A0 It would be nice to res= olve this
> before 14.1-RELEASE.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Mike
>
> Excerpts from the boot log:
>
> sdhci_bcm1: <Broadcom 2708 SDHCI controller> mem 0x7e340000-0x7e= 3400ff irq 79 on simplebus1
> mmc1: <MMC/SD bus> on sdhci_bcm1
> ...
> mmcsd0: 63GB <SDHC ASTC 0.0 SN 000002D9 MFG 09/2022 by 159 TI> a= t mmc1 50.0MHz/4bit/65535-block
> ...
> sdhci_bcm1-slot0: Controller timeout
> sdhci_bcm1-slot0: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D REGISTER = DUMP =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> sdhci_bcm1-slot0: Sys addr: 0x000000c8 | Version:=C2=A0 0x00001002
> sdhci_bcm1-slot0: Blk size: 0x00000200 | Blk cnt:=C2=A0 0x00000001
> sdhci_bcm1-slot0: Argument: 0x0747afff | Trn mode: 0x00000012
> sdhci_bcm1-slot0: Present:=C2=A0 0x1fff0a06 | Host ctl: 0x00000007
> sdhci_bcm1-slot0: Power:=C2=A0 =C2=A0 0x0000000f | Blk gap:=C2=A0 0x00= 000080
> sdhci_bcm1-slot0: Wake-up:=C2=A0 0x00000000 | Clock:=C2=A0 =C2=A0 0x00= 000107
> sdhci_bcm1-slot0: Timeout:=C2=A0 0x00000003 | Int stat: 0x00000021
> sdhci_bcm1-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff0008
> sdhci_bcm1-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000
> sdhci_bcm1-slot0: Caps:=C2=A0 =C2=A0 =C2=A00x45ee6432 | Caps2:=C2=A0 = =C2=A0 0x0000a525
> sdhci_bcm1-slot0: Max curr: 0x00080008 | ADMA err: 0x00000000
> sdhci_bcm1-slot0: ADMA addr:0x00000000 | Slot int: 0x00000000
> sdhci_bcm1-slot0: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D
> mmcsd0: Error indicated: 1 Timeout
> ...
> mmcsd0: Error indicated: 1 Timeout
> mountroot: waiting for device /dev/ufs/rootfs...
> Mounting from ufs:/dev/ufs/rootfs failed with error 19.

Could you resolve this issue?

I am running stable/14-n268234-f5fabf3dcfb on my Raspberry Pi 4 and
have the same issue after updating U-Boot from 2024.01 to 2024.04. :-(

Do I/we need a newer firmware?

--0000000000008b2968061e9efd18--