On 5 September 2014 16:15, Ard Biesheuvel <ard.biesheu...@linaro.org> 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 <ard.biesheu...@linaro.org> > --- > 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