From nobody Tue Sep 27 20:25:48 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 4McWNK02dmz4crQR for ; Tue, 27 Sep 2022 20:25: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 4McWNJ0GkWz4Fts for ; Tue, 27 Sep 2022 20:25:52 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: by mail-ej1-x62c.google.com with SMTP id nb11so23077974ejc.5 for ; Tue, 27 Sep 2022 13:25:51 -0700 (PDT) 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; bh=qb0hXnu3iMrie7US9TcK8t+kMXfs/cjluQE5e9iRQg4=; b=kM5h1so5rLlkCKE5QibkFazcTZwrmyLnI8a5ayx60eyCoLX/xLACclqmO8WoL0vb65 doK0RuRSU0qVBV0DjzYlgGAIQBbtKOfcCxtjhs4lerSrA/R5Q86e7vaDCZfkQY69lkba Z0tjeKQR0rFeiDRwZJWVpbWz8HVLcbPtdwff2QLzUA617y/Mnu2ImSbva7EQVt5BkrLl kg2W6ENmqEqJxzepBp4vNMkZGpSc9UnGWh4933lHTePeZD2qjqC5shjG5mHmUXhzXSIj r090lGyR9BM+Mu1y6Mi+n+gX30tjD03CMhZ1eKpEkG9jrRRa0OMiO0H9s6OQdVbQDOlB PR0g== 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; bh=qb0hXnu3iMrie7US9TcK8t+kMXfs/cjluQE5e9iRQg4=; b=Lp+CCARlK+Z6apayIhd8w7ZbxncB75gsinJMlKE67HeWG7/icUpgr1O+jWabjeUoVa 3TopPaKBsJB0oPopvM+f5WqJbMt0CfFJ6mn3BrrtEZjDoy4NAsP/EqavOEvZnZF6c00m cW66LXMbYup8lI46IjcYCYUhSSheyzStepRm3BNuZB17ZcjWwH9CAl24u80o7el9MIKe vYDbYrz08A4hF75kDMySQUcA0Z1952zxQBNvh+9vWowETx9eGrCJYbU3rCK1IVrnUqGF yY6/edO6/I2Vi/s5Ta3H3DT5av2k+xCK5U+b8iWDUY6IYOC9skTSM1jsXhop52+QiHTs qxjg== X-Gm-Message-State: ACrzQf1br4VxGrmwIBeH0eDyYcZN/WbzSDPutkI9+im9szIXueUaS7YB 78GWb5eADeRhmm6160YGiVQ= X-Google-Smtp-Source: AMsMyM5N7RCronca+5UWGdpnsZ8XYICf/toEKsI8XROcxNzVT45qzG/BdtFiZ+HYye9sGwCcMNORZQ== X-Received: by 2002:a17:906:58c6:b0:782:bfb1:eae8 with SMTP id e6-20020a17090658c600b00782bfb1eae8mr18409740ejs.546.1664310350798; Tue, 27 Sep 2022 13:25:50 -0700 (PDT) Received: from smtpclient.apple (dynamic-046-114-185-233.46.114.pool.telefonica.de. [46.114.185.233]) by smtp.googlemail.com with ESMTPSA id w1-20020a50fa81000000b00457c85bd890sm1263046edr.55.2022.09.27.13.25.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Sep 2022 13:25:50 -0700 (PDT) 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 \(3696.120.41.1.1\)) Subject: Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it Date: Tue, 27 Sep 2022 22:25:48 +0200 References: <20220921154240.GA37735@www.zefox.net> <8CC2A42B-21AC-44C6-BD02-44D320CADF63@yahoo.com> <20220921175026.GA45144@www.zefox.net> <5DB9C93B-B9E1-418D-ABA3-8A0CFCE85C0F@yahoo.com> <3781CF46-C4F7-4579-8655-B7558B724C0A@yahoo.com> <20220922014500.GA46697@www.zefox.net> <20220925160531.GA63213@www.zefox.net> <20220925193415.GA63733@www.zefox.net> <3D6CF13E-261D-41D2-AC5B-923C0BF54087@yahoo.com> <20220927160328.GA71742@www.zefox.net> <67C09E9F-AD1D-4D0D-9E6F-9C1B046D8952@googlemail.com> <4154AFCB-7428-4005-843A-4EF8C0EBCCB8@googlemail.com> <9A3609DF-D873-4712-A61D-C351C162EF2A@googlemail.com> <61CFA9D4-8DFD-41C5-A2B4-E5B3CD78C327@yahoo.com> To: Mark Millard , bob prohaska , freebsd-arm@freebsd.org In-Reply-To: <61CFA9D4-8DFD-41C5-A2B4-E5B3CD78C327@yahoo.com> Message-Id: <8B67D09A-C8E1-403E-9EF2-48FCBE2E5798@googlemail.com> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4McWNJ0GkWz4Fts X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=googlemail.com header.s=20210112 header.b=kM5h1so5; dmarc=pass (policy=quarantine) header.from=googlemail.com; spf=pass (mx1.freebsd.org: domain of maciphone2@googlemail.com designates 2a00:1450:4864:20::62c as permitted sender) smtp.mailfrom=maciphone2@googlemail.com X-Spamd-Result: default: False [-3.48 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.980]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[googlemail.com,quarantine]; R_DKIM_ALLOW(-0.20)[googlemail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[googlemail.com:dkim]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62c:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[googlemail.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[googlemail.com:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[yahoo.com,www.zefox.net,freebsd.org]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N > Am 27.09.2022 um 22:06 schrieb Mark Millard : >=20 >=20 > On 2022-Sep-27, at 12:48, Klaus K=C3=BCchemann = wrote: >=20 >> Am 27.09.2022 um 21:20 schrieb Mark Millard : >>>=20 >>> On 2022-Sep-27, at 11:33, Klaus K=C3=BCchemann = wrote: >>>=20 >>>=20 >>>>> Am 27.09.2022 um 19:58 schrieb Klaus K=C3=BCchemann = : >>>>>=20 >>>>>=20 >>>>>> Am 27.09.2022 um 18:03 schrieb bob prohaska : >>>>>>=20 >>>>>> I did look at common/usb.c but it's far from obvious how one >>>>>> can turn on the logging feature so as to report more errors >>>>>> to the console. >>>>>=20 >>>>> you can add the following to common/usb.c (e.g. insert in line = 44): >>>>>=20 >>>>> #define DEBUG >>>>>=20 >>>>> -- >>>>>=20 >>>>> that should then print out all debug functions inside the usb.c = file to the console=20 >>>>> after recompilation of u-boot. >>>>>=20 >>>>> Regards >>>>>=20 >>>>> Klaus >>>>=20 >>>> I saw there is /*#include */ available in usb.c=20 >>>> so you could also try to add : >>>>=20 >>>> #define LOG_DEBUG >>>>=20 >>>> to the common/usb.c file which should also then enable the debug = functions >>>> which then would be output in logging style. >>>>=20 >>>> You will need the debug output to to narrow down the issue. >>>>=20 >>>> just a guess :=20 >>>> electrical problem(of the Pi itself) which could perhaps be fixed = by manipulating the scan delay time . >>>=20 >>> Looks to me like: >>>=20 >>> https://github.com/u-boot/u-boot/blob/master/common/usb_hub.c >>>=20 >>> might be relevant, not just: >>>=20 >>> https://github.com/u-boot/u-boot/blob/master/common/usb.c >>>=20 >>>=20 >>> For example, usb_hub.c is where usb_pgood_delay is involved. >>> (My patch to enable my boot media assigns that, not that >>> such helped Bob.) >>>=20 >>> But I've not been able to uniquely identify all the specific >>> identifiers for all the (relevant) "usb boot scan delays", >>> although I'd expect that pgood_delay (and its usb_pgood_delay) >>> would be considered an example. >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> marklmi at yahoo.com >>=20 >> good idea, >> I would then suggest to enable debug also in common/usb_hub.c >> by adding #define DEBUG or #define LOG_DEBUG .. >>=20 >> for the usb.c I=E2=80=99d expect something from the mdelay function = as an usb scan timer.. >> so let=E2=80=99s see what debug logs usb.c & usb_hub.c will spit = out .. >=20 > I'm not sure it would be relevant, there is also: >=20 > https://github.com/u-boot/u-boot/blob/master/common/usb_storage.c >=20 > But , unlike usb_pgood_delay that I recognized and it > being in usb_hub.c , I've no specific identification > of something relevant from usb_storage.c . >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com Also a good idea :-),=20 So enable debug also in=20 usb_storage.c=20 It also has /* #include */ and /*#include */ And for the case of a debug output which points to a scan timing problem = the mdelay function appears 8 times in usb_storage.c . So a big playground for manipulating the delays , I hope not too big for us :-)=E2=80=A6=20 let=E2=80=99s see what debug outputs... Regards=20 Klaus=