From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtv0Q-00060u-Hw for qemu-devel@nongnu.org; Thu, 27 Nov 2014 04:04:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtv0L-0002O6-OJ for qemu-devel@nongnu.org; Thu, 27 Nov 2014 04:04:54 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:18265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtv0K-0002My-Ad for qemu-devel@nongnu.org; Thu, 27 Nov 2014 04:04:49 -0500 Message-ID: <5476E82F.20501@huawei.com> Date: Thu, 27 Nov 2014 17:00:31 +0800 From: Shannon Zhao MIME-Version: 1.0 References: <1414763612-4939-1-git-send-email-eric.auger@linaro.org> <1414763612-4939-2-git-send-email-eric.auger@linaro.org> In-Reply-To: <1414763612-4939-2-git-send-email-eric.auger@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Auger , eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com, kim.phillips@freescale.com, a.rigo@virtualopensystems.com, manish.jaggi@caviumnetworks.com, joel.schopp@amd.com Cc: kvmarm@lists.cs.columbia.edu, alex.williamson@redhat.com, will.deacon@arm.com, stuart.yoder@freescale.com, patches@linaro.org Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: > load_dtb is renamed into arm_load_dtb and becomes non static. > it will be used by machvirt for dynamic instantiation of > platform devices > > Signed-off-by: Eric Auger > > --- > > v2 -> v3: > load_dtb renamed into arm_load_dtb > > Conflicts: > hw/arm/boot.c > --- > hw/arm/boot.c | 12 ++++++------ > include/hw/arm/arm.h | 2 ++ > 2 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/hw/arm/boot.c b/hw/arm/boot.c > index bffbea5..f5714ea 100644 > --- a/hw/arm/boot.c > +++ b/hw/arm/boot.c > @@ -313,7 +313,7 @@ static void set_kernel_args_old(const struct arm_boot_info *info) > } > > /** > - * load_dtb() - load a device tree binary image into memory > + * arm_load_dtb() - load a device tree binary image into memory > * @addr: the address to load the image at > * @binfo: struct describing the boot environment > * @addr_limit: upper limit of the available memory area at @addr > @@ -330,8 +330,8 @@ static void set_kernel_args_old(const struct arm_boot_info *info) > * 0 if the image size exceeds the limit, > * -1 on errors. > */ > -static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo, > - hwaddr addr_limit) > +int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo, > + hwaddr addr_limit) > { > void *fdt = NULL; > int size, rc; > @@ -504,7 +504,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) > /* If we have a device tree blob, but no kernel to supply it to, > * copy it to the base of RAM for a bootloader to pick up. > */ > - if (load_dtb(info->loader_start, info, 0) < 0) { > + if (arm_load_dtb(info->loader_start, info, 0) < 0) { > exit(1); > } > } > @@ -572,7 +572,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) > if (elf_low_addr < info->loader_start) { > elf_low_addr = 0; > } > - if (load_dtb(info->loader_start, info, elf_low_addr) < 0) { > + if (arm_load_dtb(info->loader_start, info, elf_low_addr) < 0) { > exit(1); > } > } There is a "load_dtb" which is not updated. /* Pass elf_low_addr as address limit to load_dtb if it may be * pointing into RAM, otherwise pass '0' (no limit) */ Thanks, Shannon