[U-Boot] [PATCH 1/3] arm: socfpga: Convert reset manager from struct to defines

Ley Foon Tan lftan.linux at gmail.com
Wed Aug 28 13:28:34 UTC 2019


On Wed, Aug 28, 2019 at 8:44 PM Marek Vasut <marex at denx.de> wrote:
>
> On 8/28/19 10:13 AM, Ley Foon Tan wrote:
> [...]
>
> >>>>>> If want to use address from DT, we need get address every time need to
> >>>>>> use the address.
> >>>>>> For non-DM, it is easier to use constant address. Let me know if you
> >>>>>> still prefer to use address from DT.
> >>>>
> >>>> Surely you can cache the address or even better, convert to DM/DT ?
> >>> Will try to cache the address for now.  But, we need get address from
> >>> DT twice, one in SPL, one in Uboot. They not sharing global data.
> >>
> >> I don't think there's much we can do about that, unless we can somehow
> >> share parsed live DT from SPL to U-Boot, but that's for another
> >> discussion/patchset/etc.
> > I am working on this now and found there are 2 challenges if we get
> > base address from DT.
> > 1. We can only get the address from DT after gd->fdt_blob is
> > initialized in spl_early_init(). So, spl_early_init() need move to
> > beginning of board_init_f().
>
> This should be reasonably easy to solve I guess ?
Yes, this shouldn't be tough, just need testing. Make sure it doesn't
break anything.
>
> >    Tested this on Agilex, look okay. But, pending test on other device
> > families, like Gen5 or A10. Not sure any side effect with this change.
> > 2. Secure (for PSCI) and non-secure functions share same functions,
> > these functions can't use global data (for base address). Secure
> > functions have its own secure data region.
>
> There was a discussion about this before, instead of hacking up this
> part constantly, maybe we should create a separate build of U-Boot (like
> SPL/TPL) and use that for the "secure" mode. But that's for another
> patchset and another discussion.
Yes, we have discussion here internally regarding this secure firmware.
We plan change the boot flow to include ATF. But, our downstream git
still need to maintain this "secure" region for some period (so
customer can migrate to new boot flow).
If change to DT address, we need patch our downstream git for these
secure functions. :)
Anyway, I will try change for upstream. I'm trying to find where is
the proper place to get DT address in Uboot. SPL is more straight
forward, get the DT address in board_init_f.

Thanks.

Regards
Ley Foon

>
> > #2 is more difficult to overcome. Do you have strong opinion to get
> > base address from DT? Otherwise, can we use constant define for these
> > base addresses?
>
> See above, the secure part might need further work.


More information about the U-Boot mailing list