From owner-freebsd-arm@freebsd.org Fri Aug 21 14:58:16 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9FD43BF6D9 for ; Fri, 21 Aug 2020 14:58:16 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BY4QG6jsXz42Fl; Fri, 21 Aug 2020 14:58:14 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1598021886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Df5fM42n2Qn9mEwGO5gkqNn/fPPfP31xkuoMvgqu+I=; b=W4cSrVooclXEf/fHiADSswTw+NI6wnWWZgkNybMhFUUiWW9qebx7sNKkWMfzKdOLugnBu2 jUigd+QrkmzX2q8kSEAj0cmCsF0AusJgoXjuNkxXk+GN4sEzIDd+6FOUcWlAAboSMc5zVw S/N+aj9ARsO9oEwJCLB/H2VLywVXlek= Received: from skull.home.blih.net (lfbn-idf2-1-1138-237.w90-92.abo.wanadoo.fr [90.92.20.237]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 10c5ae4a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 21 Aug 2020 14:58:06 +0000 (UTC) Date: Fri, 21 Aug 2020 16:58:05 +0200 From: Emmanuel Vadot To: Johnny Sorocil Cc: Ian Lepore , freebsd-arm@freebsd.org Subject: Re: Disabling internal RTC ends up in hang Message-Id: <20200821165805.f36090fee5afac8a3ad1d570@bidouilliste.com> In-Reply-To: References: <6d88bd5659b854d9af73cb9a325c719c3d7d9da9.camel@freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BY4QG6jsXz42Fl X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=W4cSrVoo; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-1.67 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; FREEFALL_USER(0.00)[manu]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-0.22)[-0.224]; NEURAL_HAM_MEDIUM(-0.95)[-0.950]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2020 14:58:16 -0000 On Fri, 21 Aug 2020 12:24:17 +0200 Johnny Sorocil wrote: > On Wed, Aug 19, 2020 at 7:55 PM Ian Lepore wrote: > > > I think you may be running into a problem Andriy (avg@) described on > > irc the other day: the allwinner RTC hardware has no way to detect > > whether it lost power, so it always supplies the time, even if it's > > incorrect. When there are multiple RTCs in the system, the kernel asks > > them in the order they registered until one provides the time. > > > > I suspect the panic is happening because the internal RTC also provides > > the system 32khz clock, which is needed by other devices. > > > > He cooked up this patch: http://paste.ubuntu.com/p/6hhtQbJC85/ > > > > With that patch in place, the 32khz clock would be available, but the > > RTC would not supply the time unless it was correct. > > > > Attempt #1: > Booting GENERIC kernel and loading patched "aw_rtc.ko" > - already present in kernel > - system date not correct > > Attempt #2: > Booting custom kernel with option "nodevice aw_rtc" and loading patched > "aw_rtc.ko" > - same panic & hang as in previous message Both #1 and #2 are expected, aw_rtc is present in GENERIC and needs to be for the 32khz clock to be created. > Attempt #3: > Booting GENERIC kernel which has builtin patched "aw_rtc": > > mmc0: No compatible cards found on bus > aw_mmc1: Spurious interrupt - no active request, rint: 0x00000004 > > mmc1: on aw_mmc0 > Cannot set frequency for clk: mmc0, error: 34 > aw_mmc0: failed to set frequency to 50000000 Hz: 34 > uhub2: 1 port with 1 removable, self powered > uhub0: 1 port with 1 removable, self powered > ugen2.2: at usbus2 > mountroot: waiting for device /dev/ufs/rootfs... > Mounting from ufs:/dev/ufs/rootfs failed with error 19. > > Loader variables: > vfs.root.mountfrom=ufs:/dev/ufs/rootfs > vfs.root.mountfrom.options=rw > > Manual root filesystem specification: > : [options] > Mount using filesystem > and with the specified (optional) option list. > > eg. ufs:/dev/da0s1a > zfs:zroot/ROOT/default > cd9660:/dev/cd0 ro > (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) > > ? List valid disk boot devices > . Yield 1 second (for background tasks) > Abort manual input > > mountroot> aw_mmc0: controller timeout > aw_mmc0: timeout resetting DMA/FIFO > aw_mmc0: timeout updating clock > aw_mmc0: controller timeout > aw_mmc0: timeout resetting DMA/FIFO > aw_mmc0: timeout updating clock > aw_mmc0: controller timeout > aw_mmc0: timeout resetting DMA/FIFO That doesn't seems related at all, do you have any other modification ? > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" -- Emmanuel Vadot