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 09B36C4167B for ; Wed, 28 Dec 2022 16:50:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 320268521D; Wed, 28 Dec 2022 17:50:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="BLYsGcSi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E0E028544F; Wed, 28 Dec 2022 17:50:50 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A628684F66 for ; Wed, 28 Dec 2022 17:50:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3ACCAB816F4; Wed, 28 Dec 2022 16:50:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAEA2C433D2; Wed, 28 Dec 2022 16:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672246247; bh=6JGw30CwYNdUmOLBVp4DJkfgabNPk1kPfYojSfEAtbY=; h=Date:From:To:Subject:References:In-Reply-To:From; b=BLYsGcSieUjEueWci6VNkHqJCZSD64/sy/Z6Z/+ZSdunhjHjkJ+oapinZ8LPcZE5L HbMtrATZLVZaVXH3POcQFxDQ8yFOHO3Mgjtvaf9I+0eZ5HRpZK9XhNC0iEJ1jDmO3D IRVgQz6H53TmMGVtYz4lzCWLh8IG4yFJgOn7o7SIeuAMZ3wMBOG/l5r4lPlBdZLmur 8FJWVFxUdFJ0gm/0oFqPoTpYT8uwm5PEid74faT9DmBU/UTgbXc71w7j42NObfbRav DTSM5ymwBNZKYzoMVPTtipFeJx6D2NumEx2dvsypvl0O0a31E9J8JQf45Zg8OEhrwl D2HdqJ0Bs9Z7Q== Received: by pali.im (Postfix) id E69B8942; Wed, 28 Dec 2022 17:50:43 +0100 (CET) Date: Wed, 28 Dec 2022 17:50:43 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini , u-boot@lists.denx.de Subject: Re: Broken commit de47ff536363289f92f85ed1e4901724d238432d Message-ID: <20221228165043.imafayukj67mdani@pali> References: <20220802091338.f4g45ldhc7qbg6hm@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220802091338.f4g45ldhc7qbg6hm@pali> User-Agent: NeoMutt/20180716 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 And back to this issue... On Tuesday 02 August 2022 11:13:38 Pali Rohár wrote: > Hello Tom! > > Your commit de47ff536363289f92f85ed1e4901724d238432d ("Convert > CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig") seems to be broken. > > If you look at P1020RDB-PD_defconfig file change in this commit there is: > > --- a/configs/P1020RDB-PD_defconfig > +++ b/configs/P1020RDB-PD_defconfig > @@ -9,6 +9,7 @@ CONFIG_MPC85xx=y > # CONFIG_CMD_ERRATA is not set > CONFIG_TARGET_P1020RDB_PD=y > CONFIG_MPC85XX_HAVE_RESET_VECTOR=y > +CONFIG_SYS_MPC85XX_NO_RESETVEC=y > CONFIG_MP=y > CONFIG_FIT=y > CONFIG_FIT_VERBOSE=y > > Which does not make sense to me. > > 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. 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. > Second thing is that reset vector is required for (parallel) NOR booting > and your change is adding CONFIG_SYS_MPC85XX_NO_RESETVEC=y to defconfig > for NOR, which to my guess make image non-bootable and broken. And this is truth. CONFIG_SYS_MPC85XX_NO_RESETVEC=y in defconfig broke booting from parallel FLASH NOR memory. Without reset vector, u-boot from FLASH cannot be booted. 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. 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. > And seems that other defconfig files in that change have similar issues. 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. By moveconfig.py following defconfigs are affected: $ ./tools/moveconfig.py -f MPC85XX_HAVE_RESET_VECTOR SYS_MPC85XX_NO_RESETVEC 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 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)