[U-Boot] [PATCH 1/3] arm: socfpga: Convert reset manager from struct to defines
simon.k.r.goldschmidt at gmail.com
Wed Aug 28 13:03:14 UTC 2019
Marek Vasut <marex at denx.de> schrieb am Mi., 28. Aug. 2019, 14:44:
> 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
> >>>>>> 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 ?
I did that for gen5 already in my pending patchset. It was kind of easy,
although problems like coding bugs or lack of heap are hard to debug as the
debug Hart doesn't work that early (no ponmux setup etc.)
> > 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.
> > #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