From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46C5EC4167B for ; Wed, 28 Dec 2022 17:13:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C751785248; Wed, 28 Dec 2022 18:13:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="tNBr3As/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCF628544F; Wed, 28 Dec 2022 18:13:18 +0100 (CET) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 313D485245 for ; Wed, 28 Dec 2022 18:13:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x835.google.com with SMTP id bp44so10511964qtb.0 for ; Wed, 28 Dec 2022 09:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sd0q6T0xGsxHBZqWtLDJE0XI1zF8YinUwzvb7m1g43M=; b=tNBr3As/VaUmSrgFfs8vpUl+OzqfomWvj9lT+w75PrVIwmaR0AWF3LEnDm6PNPWV// uM9NJbK8bXIRYzQyezDYX1rAphy/evoeHvLlb2317zgKq7cUcylOcWDMwgzCrKgkHP5M bRh0GOSwzjWOIWIV7twgbAPraGr4aRUjY94SM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sd0q6T0xGsxHBZqWtLDJE0XI1zF8YinUwzvb7m1g43M=; b=Agn6MDd/3ZzsW0qfMGRYl813hUnfXX0DazVZp4ff4o+rcxoBSCTDpHhUQ91KBgnlJG hHR/Ms6mSGJqgzHbiIXNDdMmg2/SV2Kbk72dhRRrMUgUvuHxRgZAhGkEx2tJV7vXbbzg Un1B2JzjvhWQQkvsEmfwTetjRzULd7nveHgita0L06uocSu4CkjuqXkm5AHdSi1V+zAo MWjRfdk8haPAEeZ1F22ZwSbmKhxujOzv/3NcTAbwSm13HbWTNr7fhgUVTJMyTwCplQTF AElwkT4XpbLw7sGhULHld8Q1ftPeC35vl31ffjO6pMZqTslfOkGt9f0QKASig5eegsON qYlA== X-Gm-Message-State: AFqh2kr4Y8BZo/JRnDAckBJWS72pzdl+MXyHBsJ8V1EGmo1I8rm+C0JX wzziy6MOlFyHCxkufBzllJAsuA== X-Google-Smtp-Source: AMrXdXtYQi/XIf8m3aU64NLb7KY2186ztJ8wfHJ4cDr3ya4lxdPbRWs5nn4g7wdco3ad8GIlrQowSg== X-Received: by 2002:ac8:47cd:0:b0:3a7:e4ad:5499 with SMTP id d13-20020ac847cd000000b003a7e4ad5499mr37838403qtr.32.1672247594863; Wed, 28 Dec 2022 09:13:14 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-8816-6dad-deb3-15d8.res6.spectrum.com. [2603:6081:7b00:6400:8816:6dad:deb3:15d8]) by smtp.gmail.com with ESMTPSA id w19-20020a05620a445300b006b5cc25535fsm11710616qkp.99.2022.12.28.09.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Dec 2022 09:13:14 -0800 (PST) Date: Wed, 28 Dec 2022 12:13:12 -0500 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: u-boot@lists.denx.de Subject: Re: Broken commit de47ff536363289f92f85ed1e4901724d238432d Message-ID: <20221228171312.GP3787616@bill-the-cat> References: <20220802091338.f4g45ldhc7qbg6hm@pali> <20221228165043.imafayukj67mdani@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iYqKdAm/h87GkMBB" Content-Disposition: inline In-Reply-To: <20221228165043.imafayukj67mdani@pali> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --iYqKdAm/h87GkMBB Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 28, 2022 at 05:50:43PM +0100, Pali Roh=E1r wrote: > And back to this issue... >=20 > On Tuesday 02 August 2022 11:13:38 Pali Roh=E1r wrote: > > Hello Tom! > >=20 > > Your commit de47ff536363289f92f85ed1e4901724d238432d ("Convert > > CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig") seems to be broken. > >=20 > > If you look at P1020RDB-PD_defconfig file change in this commit there i= s: > >=20 > > --- a/configs/P1020RDB-PD_defconfig > > +++ b/configs/P1020RDB-PD_defconfig > > @@ -9,6 +9,7 @@ CONFIG_MPC85xx=3Dy > > # CONFIG_CMD_ERRATA is not set > > CONFIG_TARGET_P1020RDB_PD=3Dy > > CONFIG_MPC85XX_HAVE_RESET_VECTOR=3Dy > > +CONFIG_SYS_MPC85XX_NO_RESETVEC=3Dy > > CONFIG_MP=3Dy > > CONFIG_FIT=3Dy > > CONFIG_FIT_VERBOSE=3Dy > >=20 > > Which does not make sense to me. > >=20 > > First thing is that CONFIG_MPC85XX_HAVE_RESET_VECTOR and > > CONFIG_SYS_MPC85XX_NO_RESETVEC are exclusive options. You can either > > disable generating of reset vector in image or enable it. What is > > expected from the result when you ask Kconfig to both enable and disable > > it? First specified option win? Or last specified win? Or random of > > those two options win? It is not really clear for me. >=20 > Experiments proved that CONFIG_SYS_MPC85XX_NO_RESETVEC wins over > CONFIG_MPC85XX_HAVE_RESET_VECTOR. So problematic commit > de47ff536363289f92f85ed1e4901724d238432d effectively disabled reset > vectors in more defconfig files. >=20 > > Second thing is that reset vector is required for (parallel) NOR booting > > and your change is adding CONFIG_SYS_MPC85XX_NO_RESETVEC=3Dy to defconf= ig > > for NOR, which to my guess make image non-bootable and broken. >=20 > And this is truth. CONFIG_SYS_MPC85XX_NO_RESETVEC=3Dy in defconfig broke > booting from parallel FLASH NOR memory. Without reset vector, u-boot > from FLASH cannot be booted. >=20 > When I manually disabled CONFIG_SYS_MPC85XX_NO_RESETVEC for P2020 then > together with CONFIG_SDCARD fix, I was able to boot U-Boot from FLASH. >=20 > So kconfig conversion in commit de47ff536363289f92f85ed1e4901724d238432d > was done incorrectly. Because in 2022.04 CONFIG_SYS_MPC85XX_NO_RESETVEC > was really not enabled in config.h for FLASH defconfigs. >=20 > > And seems that other defconfig files in that change have similar issues. >=20 > Tom, would you fix this commit de47ff536363289f92f85ed1e4901724d238432d > too? I do not know how you did that kconfig conversion but fix could be > straightforward. By boolean logic CONFIG_MPC85XX_HAVE_RESET_VECTOR xor > CONFIG_SYS_MPC85XX_NO_RESETVEC can be defined. Not both at the same > time. >=20 > By moveconfig.py following defconfigs are affected: >=20 > $ ./tools/moveconfig.py -f MPC85XX_HAVE_RESET_VECTOR SYS_MPC85XX_NO_RESET= VEC > 9 matches > P1020RDB-PC P1010RDB-PB_36BIT_NOR P1010RDB-PA_36BIT_NOR P1020RDB-PC_36BIT= P1010RDB-PA_NOR P1010RDB-PB_NOR P2020RDB-PC P2020RDB-PC_36BIT P1020RDB-PD >=20 > All of these defconfigs (by their names) boot from FLASH nor, so they > must have reset vector included and so *NO_RESETVEC* must *not* be > enabled. (Hope it is clear even with too many negations) Yes, I'll look at this again. My first observation is that the exhaustive list of incorrectly migrated platforms listed there is ALSO the list of platforms that had SDCARD/SPIFLASH enabled, when they shouldn't have and now have NO_PBL set, So, that being set wrong meant that the part here was wrong. I think the answer might be to just fix those configs, and then also add a "depends on !MPC85XX_HAVE_RESET_VECTOR" to the *SYS_MPC85XX_NO_RESETVEC options. --=20 Tom --iYqKdAm/h87GkMBB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOseSUACgkQFHw5/5Y0 tyzlDAv+PeXf805OyHdkgusUTOIEIyzH0z2lmJ60j3tfeP/a9V7EnD1BK/EdbdDX deb8pDIH4S5onzipH0VR0C5PZUBWq6xj7LaSTBh4X9hdkRG8FCo20umXesrquGx4 QbqgW05rSrGKun0WLrc0zRPLy3HBi8m8vIf2bGf1Vw+s07hP+4MB5MqK5jT+lhdE Od1N1dXTAS+PRXccuArbQCrL9gi9fTt4Gbu71SLwbNEqAfRiWpPzpePzsC2Ji1H6 N38dAm82a5mtv5a7ub+EBDRyyS0KW69QPV4pj8a/jUoDOHHEvEQ78MGAM6JiAaFb 8IebRtb9S/PosQd229jhgJhmPTyflVtrnnEOqST+9aakS6MarGTcWDBqn56jtWwu oapqFBdh+43YyJm+LAboaSjTHereDatcM+lA3nBH5O4OQkxC9BZM8J3TJT/qNhHx +gakN2hRGsearBcQ8uysPqVTiHkxzSCUArDuqGbiQijLwLdNiyyX/nwyViek6OlY dVDrLZxd =qtkK -----END PGP SIGNATURE----- --iYqKdAm/h87GkMBB--