[U-Boot] [U-Boot, v9, 15/18] efi: sandbox: Tidy up copy_fdt() to work with sandbox
Alexander Graf
agraf at suse.de
Sun Aug 26 17:23:25 UTC 2018
> At present this function takes a pointer as its argument, then passes this
> to efi_allocate_pages(), which actually takes an address. It uses casts,
> which are not supported on sandbox.
>
> Also the function calculates the FDT size rounded up to the neared EFI
> page size, then its caller recalculates the size and adds a bit more to
> it.
>
> This function is much better written as something that works with
> addresses only, and returns both the address and the size of the relocated
> FDT.
>
> Also, copy_fdt() returns NULL on error, but really should propagate the
> error from efi_allocate_pages(). To do this it needs to return an
> efi_status_t, not a void *.
>
> Update the code in this way, so that it is easier to follow, and also
> supports sandbox.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
Thanks, applied to efi-next
Alex
More information about the U-Boot
mailing list