
Hi Tom,
On Thu, 16 Jan 2025 at 17:00, Tom Rini trini@konsulko.com wrote:
On Wed, Jan 15, 2025 at 06:27:01PM -0700, Simon Glass wrote:
This includes various patches towards implementing the VBE abrec bootmeth in U-Boot. It mostly focuses on introducing a relocating SPL-loader so that VBE can run in the limited amount of SRAM available on many devices.
Another minor new feature is support in VBE for specifying the image phase when loading from a FIT. This allows a single FIT to include images for several boot phases, thus simplifying image-creation.
One lingering niggle in this series is that it has a different code path for sandbox, since it does not support the relocating jump. It should be possible to resolve this with additional work, but I have not attempted this so far.
For v2, I have split the first patch into 5 pieces, to make it easier to see the code-size impact, plus added a few tweaks to reduce code size.
Overall, size wise this looks better than v1, so I'm generally happy enough. That said:
[snip]
boot/vbe_common.c | 375 +++++++++++++++++++++++++++++++++++++++++ boot/vbe_common.h | 137 +++++++++++++++ boot/vbe_simple.c | 98 ++--------- boot/vbe_simple.h | 16 +- boot/vbe_simple_fw.c | 207 +++++++++--------------
The size growth indeed comes from the compiler/linker not having as much insight as it used to (except for when LTO is enabled). Perhaps once we have more device types available it'll be clearer to see some way to better re-organize things for savings again. Thanks!
We need a clear idea of what data needs to be checked and what is considered trusted. One idea would be to have some extra checks which can be disabled to save code size. That is something which could help across U-Boot.
Regards, Simon