[U-Boot] U-Boot proper(not SPL) relocate option
Masahiro Yamada
yamada.masahiro at socionext.com
Wed Nov 29 10:10:09 UTC 2017
Hi Wolfgang,
2017-11-27 22:21 GMT+09:00 Wolfgang Denk <wd at denx.de>:
> Dear Masahiro,
>
> In message <CAK7LNARc-MUPRmHSiSjtea9X6hpRAe9t9wgdbdfg2DYSEpC4RA at mail.gmail.com> you wrote:
>>
>> When we talk about "relocation", two things are happening.
>>
>> [1] U-Boot proper copies itself to the very end of DRAM
>
> ...to the very end of DRAM minus space reserved for any memory
> regions we want to reserver for / share with the Linux kernel
> (video memory, log buffer, protected RAM, ...)
>
>> [2] Fix-up the global symbols
>>
>> In my opinion, only [2] is useful.
>
> This is your opinion, accepted.
> I do not agree with this, i. e. I have a different opinion.
>
>> SPL initializes the DRAM, so it knows the base and size of DRAM.
>
> But it does not know the relocation address yet. As this is
> dynamically computed, depending on environment variable settings,
> moving this calculation into the SPL means the SPL must be capable to
> read the environment. this pulls in a ton of code, and any
> advantages you may have for falcon mode are damaged.
How precise do we need to compute this?
Platforms may choose a reasonable fixed size for reserved memory.
The end of memory minus 256KB, 512KB, or whatever as you like.
>> The following is how the ideal boot loader would work.
>>
>>
>> Requirement for U-Boot proper:
>> U-Boot never changes the location by itself.
>
> This means you kill all the features that depend on this?
Are there features that depend on two-time relocation?
As I stated above, the calculation can be compromised to some extent.
We may waste a small amount of memory by the rough calculation,
but is it a big deal?
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> f u cn rd ths, itn tyg h myxbl cd.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
--
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list