[U-Boot] u-boot FIT image support

Simon Glass sjg at chromium.org
Sat Aug 8 00:47:44 CEST 2015


Hi York,

On 7 August 2015 at 14:48, York Sun <yorksun at freescale.com> wrote:
>
> Simon,
>
> I was doing an experiment to put the load address and entry address of Linux to
> higher than 32-bit address. I found it is broken to process more than 32-bit
> addresses. When I attempted to fix it, I was troubled by those code used for
> both host and target, like common/image-fit.c. For example, to process 64-bit
> address, the function
>
> int fit_image_get_load(const void *fit, int noffset, ulong *load)
>
> should be converted to
>
> int fit_image_get_load(const void *fit, int noffset, uint64_t *load)
>
> ulong is 64-bit for 64-bit target such as ARMv8, but it can be 32-bit on host.
> If I use uint64_t, all related code in bootm and others need to change. Before I
> go too far, I'd like to check if anyone has tried to enable this in FIT image.
>
> #address-cells = <2>;
>
> I can try to use uint64_t in place of ulong for all related code if that's
> right. That will be a lot of change.

Perhaps I misunderstand something, but I think ulong should be OK on
the host. I just needs to hold a machine address. On a 32-bit host
this cannot be 64-bit. Can you explain the problem a bit more?

I have not need #address-cells in a FIT.

It would be better to use ulong for addresses in U-Boot I think. It is
safe and efficient on both 32- and 64-bit machines.

Regards,
Simon


More information about the U-Boot mailing list