From 2744ece8095b8cdb0d667654debc1d80dd57bbd3 Mon Sep 17 00:00:00 2001 From: Tao Xu Date: Fri, 9 Aug 2019 14:57:21 +0800 Subject: hw/arm: simplify arm_load_dtb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In struct arm_boot_info, kernel_filename, initrd_filename and kernel_cmdline are copied from from MachineState. This patch add MachineState as a parameter into arm_load_dtb() and move the copy chunk of kernel_filename, initrd_filename and kernel_cmdline into arm_load_kernel(). Reviewed-by: Igor Mammedov Reviewed-by: Liu Jingqi Suggested-by: Igor Mammedov Signed-off-by: Tao Xu Message-Id: <20190809065731.9097-2-tao3.xu@intel.com> Reviewed-by: Alistair Francis Acked-by: Andrew Jeffery Acked-by: Cédric Le Goater [ehabkost: include hw/boards.h again to fix build failures] Signed-off-by: Eduardo Habkost --- include/hw/arm/boot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/hw') diff --git a/include/hw/arm/boot.h b/include/hw/arm/boot.h index 5714dea..7f4d0ca 100644 --- a/include/hw/arm/boot.h +++ b/include/hw/arm/boot.h @@ -131,7 +131,7 @@ struct arm_boot_info { * before sysbus-fdt arm_register_platform_bus_fdt_creator. Indeed the * machine init done notifiers are called in registration reverse order. */ -void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info); +void arm_load_kernel(ARMCPU *cpu, MachineState *ms, struct arm_boot_info *info); AddressSpace *arm_boot_address_space(ARMCPU *cpu, const struct arm_boot_info *info); @@ -158,7 +158,7 @@ AddressSpace *arm_boot_address_space(ARMCPU *cpu, * Note: Must not be called unless have_dtb(binfo) is true. */ int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo, - hwaddr addr_limit, AddressSpace *as); + hwaddr addr_limit, AddressSpace *as, MachineState *ms); /* Write a secure board setup routine with a dummy handler for SMCs */ void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu, -- cgit v1.1