public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: u-boot@lists.denx.de
Subject: Re: Broken commit de47ff536363289f92f85ed1e4901724d238432d
Date: Wed, 28 Dec 2022 12:13:12 -0500	[thread overview]
Message-ID: <20221228171312.GP3787616@bill-the-cat> (raw)
In-Reply-To: <20221228165043.imafayukj67mdani@pali>

[-- Attachment #1: Type: text/plain, Size: 3599 bytes --]

On Wed, Dec 28, 2022 at 05:50:43PM +0100, Pali Rohár wrote:
> 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)

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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-12-28 17:13 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02  9:13 Broken commit de47ff536363289f92f85ed1e4901724d238432d Pali Rohár
2022-08-02 10:58 ` Tom Rini
2022-08-03 16:00   ` Pali Rohár
2022-08-03 16:13     ` Tom Rini
2022-08-05 14:21       ` Pali Rohár
2022-08-05 14:47         ` Tom Rini
2022-08-05 14:59           ` Pali Rohár
2022-08-05 15:03             ` Tom Rini
2022-08-05 15:12               ` Pali Rohár
2022-08-05 15:44                 ` Tom Rini
2022-08-05 15:51                   ` Pali Rohár
2022-08-05 15:54                     ` Tom Rini
2022-08-05 20:17                       ` Pali Rohár
2022-08-05 22:20                         ` Tom Rini
2022-08-08  7:51                           ` Marek Behún
2022-08-08 13:37                             ` Tom Rini
2022-08-17  9:29                               ` Pali Rohár
2022-08-26 14:53                                 ` Tom Rini
2022-10-09 12:41                                   ` Pali Rohár
2022-10-09 12:45                                     ` Tom Rini
2022-10-09 13:10                                       ` Pali Rohár
2022-10-09 16:32                                         ` Tom Rini
2022-10-10 12:20                                           ` Marek Behún
2022-11-01 23:14                                             ` Pali Rohár
2022-11-21 17:56                                               ` Pali Rohár
2022-12-16 18:01                                                 ` Pali Rohár
2022-12-16 19:24                                                   ` Marek Behún
2022-12-16 21:56         ` Broken commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 Pali Rohár
2022-12-22  2:54           ` Tom Rini
2022-12-22  7:49             ` Pali Rohár
2022-12-22 14:29               ` Tom Rini
2022-12-22 17:13                 ` Pali Rohár
2022-12-22 17:33                   ` Tom Rini
2022-12-22 17:56                     ` Pali Rohár
2022-12-22 18:22                       ` Tom Rini
2022-12-22 21:02                         ` Pali Rohár
2022-12-23  0:36                           ` Tom Rini
2022-12-25 10:42                             ` Freescale P2020 Internal Boot ROM Pali Rohár
2022-12-23 19:10                         ` Broken commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 Pali Rohár
2022-12-23 19:18                           ` Tom Rini
2022-12-23 21:39                             ` Pali Rohár
2022-12-23 22:34                               ` Pali Rohár
2022-12-24 16:13                                 ` Tom Rini
2022-12-24 17:03                                   ` Pali Rohár
2022-12-28 14:45                               ` Pali Rohár
2022-12-23 21:56                     ` Pali Rohár
2022-12-22 17:36                   ` Simon Glass
2022-12-28 16:50 ` Broken commit de47ff536363289f92f85ed1e4901724d238432d Pali Rohár
2022-12-28 17:13   ` Tom Rini [this message]
2022-12-28 17:50   ` Broken socrates board (Was: Re: Broken commit de47ff536363289f92f85ed1e4901724d238432d) Pali Rohár
2022-12-29 22:38     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221228171312.GP3787616@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=pali@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox