public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: LABBE Corentin <clabbe@baylibre.com>
Cc: yogeshs@ti.com, lokeshvutla@ti.com, sjg@chromium.org,
	trini@konsulko.com, u-boot@lists.denx.de
Subject: Re: [SPAM] Boot regression on am335x-hs-evm
Date: Fri, 10 Jun 2022 13:01:40 +0200	[thread overview]
Message-ID: <20220610110140.GD1735@begut> (raw)
In-Reply-To: <YqMV+0qQmA6nc8N7@Red>

El Fri, Jun 10, 2022 at 11:59:23AM +0200, LABBE Corentin deia:
> --- a/drivers/core/lists.c
> +++ b/drivers/core/lists.c
> @@ -20,6 +20,10 @@
>  #include <fdtdec.h>
>  #include <linux/compiler.h>
>  
> +static int _errorcount;
> +int errorlist[1024];
> +int errorcount;
> +
>  struct driver *lists_driver_lookup_name(const char *name)
>  {
>         struct driver *drv =
> @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only)
>                 int ret;
>  
>                 ret = bind_drivers_pass(parent, pre_reloc_only);
> -               if (!ret)
> -                       break;
> +               errorlist[_errorcount] = ret;
> +               _errorcount++;
> +               errorcount = _errorcount;
>                 if (ret != -EAGAIN && !result)
>                         result = ret;
>         }
> 
> But errorcount is always 0 which is puzzling me since according to my think, lists_bind_drivers() is ran before secure_boot_verify_image().
>

I'm not sure at which point your code is called, but do you have working BSS? 

README: 
	[...]
	lowlevel_init():
		- no global_data or BSS
	[...]
	board_init_f():
	[...]
		- global_data is available
		- stack is in SRAM
		- BSS is not available, so you cannot use global/static variables,
			only stack variables and global_data
	
 
> Any idea on how to debug further ?
>

maybe you can add a field to global_data ?  

  reply	other threads:[~2022-06-10 11:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10  9:59 Boot regression on am335x-hs-evm LABBE Corentin
2022-06-10 11:01 ` Xavier Drudis Ferran [this message]
2022-06-10 12:16 ` Tom Rini
2022-06-10 14:51   ` LABBE Corentin
2022-06-10 15:01     ` Tom Rini
2022-06-10 15:45       ` LABBE Corentin
2022-06-10 15:48         ` Tom Rini
2022-06-13 12:51           ` LABBE Corentin
2022-06-13 14:20             ` Tom Rini
2022-06-13 14:56               ` Andrew Davis

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=20220610110140.GD1735@begut \
    --to=xdrudis@tinet.cat \
    --cc=clabbe@baylibre.com \
    --cc=lokeshvutla@ti.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=yogeshs@ti.com \
    /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