[PATCH 1/2] spl: Use standard FIT entries
Simon Glass
sjg at chromium.org
Mon Sep 7 03:43:51 CEST 2020
Hi Michal,
On Thu, 3 Sep 2020 at 05:03, Michal Simek <michal.simek at xilinx.com> wrote:
>
> SPL is creating fit-images DT node when loadables are recorded in selected
> configuration. Entries which are created are using entry-point and
> load-addr property names. But there shouldn't be a need to use non standard
> properties because entry/load are standard FIT properties. But using
> standard FIT properties enables option to use generic FIT functions to
> descrease SPL size. Here is result for ZynqMP virt configuration:
> xilinx_zynqmp_virt: spl/u-boot-spl:all -82 spl/u-boot-spl:rodata -22 spl/u-boot-spl:text -60
>
> The patch causes change in run time fit image record.
> Before:
> fit-images {
> uboot {
> os = "u-boot";
> type = "firmware";
> size = <0xfd520>;
> entry-point = <0x8000000>;
> load-addr = <0x8000000>;
> };
> };
>
> After:
> fit-images {
> uboot {
> os = "u-boot";
> type = "firmware";
> size = <0xfd520>;
> entry = <0x8000000>;
> load = <0x8000000>;
> };
> };
>
> Replacing calling fdt_getprop_u32() by fit_image_get_entry/load() also
> enables support for reading entry/load properties recorded in 64bit format.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
Reviewed-by: Simon Glass <sjg at chromium.org>
Isn't there a test that could be updated here?
>
> Would be good to know history of fit-images and it's property names but
> there shouldn't be a need to use non standard names where we have
> FIT_*_PROP recorded as macros in include/image.h.
I agree.
> Concern regarding backward compatibility is definitely valid but not sure
> how many systems can be affected by this change.
Me neither. Probably a good idea to fix it.
>
> Adding temporary support for entry-point/load-addr is also possible.
> Or second way around is to create new wrappers as
> fit_image_get_entry_point()/fit_image_get_load_addr() or
> call fit_image_get_address() directly.
>
> ---
> common/fdt_support.c | 4 ++--
> common/spl/spl_atf.c | 7 ++++---
> common/spl/spl_fit.c | 6 +++++-
> 3 files changed, 11 insertions(+), 6 deletions(-)
>
Regards,
SImon
More information about the U-Boot
mailing list