[U-Boot] [PATCH 06/12 v2] arm: at91: Enable watchdog support
hs at denx.de
Mon Apr 1 05:41:54 UTC 2019
added Simon Goldschmidt to cc, as he just posted a patchset, which
exactly wants to introduce "clear BSS before relocation" ...
Am 29.03.2019 um 13:06 schrieb Wolfgang Denk:
> Dear Heiko,
> In message <81e69dec-21e7-7b34-a261-e22ae9bef795 at denx.de> you wrote:
>> The big question is, how many places do we have in code, where we access
>> BSS before relocation ?
> Hopefully none.
Hmm... Hopefully, but I think, not easy to detect when reviewing
patches ... I just stumbeld over this issue in this patch from
Stefan, because I could try it on a hardware, and my hardware doesn;t
boot with this patch...
Theoretically you must check all vars, which are in BSS segment, if
they are used before relocation ... and drop an error, no idea yet,
how to detect this at compile time ...
>> May we better clear BSS very early (at last may possible on arm)?
> You cannot. There is no storage allocated for BSS - this happens
> only during relocation, and then it also gets zeroed.
Yes, valid for the boards which have no SPL ... but if U-Boot is
loaded with SPL into RAM, BSS is writeable. But as this is not
valid for all boards, we cannot do this!
Just see the patches from Simon:
Same problem ...
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
More information about the U-Boot