On Sat, Jun 08, 2024 at 12:22:14AM +0530, Sughosh Ganu wrote:

> The image_setup_libfdt() function optionally calls the LMB API to
> reserve the region of memory occupied by the FDT blob. This was
> earlier determined through the presence of the pointer to the lmb
> structure, which is no longer present. Pass a flag to the
> image_setup_libfdt() function to indicate if the region occupied by
> the FDT blob is to be marked as reserved by the LMB module.
> 
> Signed-off-by: Sughosh Ganu <sughosh.g...@linaro.org>
[snip]
> ---
>  arch/mips/lib/bootm.c         | 2 +-
>  boot/image-board.c            | 2 +-
>  boot/image-fdt.c              | 7 +++----
>  cmd/elf.c                     | 2 +-
>  include/image.h               | 5 ++---
>  lib/efi_loader/efi_dt_fixup.c | 2 +-
>  lib/efi_loader/efi_helper.c   | 2 +-
>  7 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
> index 54d89e9cca..e4fc2e589d 100644
> --- a/arch/mips/lib/bootm.c
> +++ b/arch/mips/lib/bootm.c
> @@ -247,7 +247,7 @@ static int boot_setup_fdt(struct bootm_headers *images)
>       images->initrd_start = virt_to_phys((void *)images->initrd_start);
>       images->initrd_end = virt_to_phys((void *)images->initrd_end);
>  
> -     return image_setup_libfdt(images, images->ft_addr, &images->lmb);
> +     return image_setup_libfdt(images, images->ft_addr, 0);
>  }
>  
>  static void boot_prep_linux(struct bootm_headers *images)
> diff --git a/boot/image-board.c b/boot/image-board.c
> index 89ccf80066..481b333b4c 100644
> --- a/boot/image-board.c
> +++ b/boot/image-board.c
> @@ -897,7 +897,7 @@ int image_setup_linux(struct bootm_headers *images)
>       }
>  
>       if (CONFIG_IS_ENABLED(OF_LIBFDT) && of_size) {
> -             ret = image_setup_libfdt(images, *of_flat_tree, lmb);
> +             ret = image_setup_libfdt(images, *of_flat_tree, 1);
>               if (ret)
>                       return ret;
>       }
> diff --git a/boot/image-fdt.c b/boot/image-fdt.c
> index 08afde203c..4daced9e99 100644
> --- a/boot/image-fdt.c
> +++ b/boot/image-fdt.c
> @@ -567,8 +567,7 @@ __weak int arch_fixup_fdt(void *blob)
>       return 0;
>  }
>  
> -int image_setup_libfdt(struct bootm_headers *images, void *blob,
> -                    struct lmb *lmb)
> +int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb)
>  {
>       ulong *initrd_start = &images->initrd_start;
>       ulong *initrd_end = &images->initrd_end;

Since this is a bool, please use true/false in the callers.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to