qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/6] hw/arm/boot: return size of loaded DTB from


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 2/6] hw/arm/boot: return size of loaded DTB from load_dtb()
Date: Tue, 9 Sep 2014 18:57:51 +0100

On 5 September 2014 16:15, Ard Biesheuvel <address@hidden> wrote:
> Add a dtb_size output parameter to load_dtb() so that we can find out
> what its memory footprint is.
>
> Signed-off-by: Ard Biesheuvel <address@hidden>
> ---
>  hw/arm/boot.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/boot.c b/hw/arm/boot.c
> index e32f2f415885..c103a8fdc941 100644
> --- a/hw/arm/boot.c
> +++ b/hw/arm/boot.c
> @@ -312,7 +312,8 @@ static void set_kernel_args_old(const struct 
> arm_boot_info *info)
>      }
>  }
>
> -static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo)
> +static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
> +                    uint32_t *dtb_size)

Given that the return value is just a success/fail
indicator at the moment we could just change it
so we return the size of the dtb, with 0 meaning
"failure".

Either way, the size parameter/return should be
hwaddr, not uint32_t.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]