[U-Boot] [PATCH] arm: qemu: fix failure in flash initialization if booting from TF-A

AKASHI Takahiro takahiro.akashi at linaro.org
Thu Jun 27 08:40:19 UTC 2019


Yamada-san,

On Thu, Jun 27, 2019 at 05:10:37PM +0900, Masahiro Yamada wrote:
> AKASHI-san,
> 
> On Thu, Jun 27, 2019 at 10:08 AM AKASHI Takahiro
> <takahiro.akashi at linaro.org> wrote:
> >
> > If U-Boot is loaded and started from TF-A (you need to change
> > SYS_TEXT_BASE to 0x60000000), it will hang up at flash initialization.
> >
> > If secure mode is off (default, or -machine virt,secure=off) at qemu,
> > it will provide dtb with two flash memory banks:
> >         flash at 0 {
> >                 bank-width = <0x4>;
> >                 reg = <0x0 0x0 0x0 0x4000000 0x0 0x4000000 0x0 0x4000000>;
> >                 compatible = "cfi-flash";
> >         };
> > If secure mode is on, on the other hand, qemu provides dtb with 1 bank:
> >         flash at 0 {
> >                 bank-width = <0x4>;
> >                 reg = <0x0 0x4000000 0x0 0x4000000>;
> >                 compatible = "cfi-flash";
> >         };
> >
> > As a result, flash_init()/flash_get_size() will eventually fail.
> > With this patch applied, relevant CONFIG values are modified.
> >
> > NOTE: you will not have to modify SYS_TEXT_BASE any more once
> > Yamada-san's patch[1] is merged.
> >
> > [1] https://lists.denx.de/pipermail/u-boot/2019-June/374178.html
> 
> No. My patch is unrelated.
> 
> You are talking about CONFIG_POSITION_INDEPENDENT,
> and you can enable it irrespective of my work.

Yes, I confirmed this. I might have already enabled this config
before I created/tested my patch.
I will drop this reference from the commit message.

Thanks,
-Takahiro Akashi

> 
> -- 
> Best Regards
> Masahiro Yamada


More information about the U-Boot mailing list