mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
hw/arm: simplify arm_load_dtb
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 <imammedo@redhat.com> Reviewed-by: Liu Jingqi <jingqi.liu@intel.com> Suggested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tao Xu <tao3.xu@intel.com> Message-Id: <20190809065731.9097-2-tao3.xu@intel.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Acked-by: Cédric Le Goater <clg@kaod.org> [ehabkost: include hw/boards.h again to fix build failures] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
14a25a511b
commit
2744ece809
30 changed files with 44 additions and 147 deletions
|
@ -351,13 +351,10 @@ static void realview_init(MachineState *machine,
|
|||
memory_region_add_subregion(sysmem, SMP_BOOT_ADDR, ram_hack);
|
||||
|
||||
realview_binfo.ram_size = ram_size;
|
||||
realview_binfo.kernel_filename = machine->kernel_filename;
|
||||
realview_binfo.kernel_cmdline = machine->kernel_cmdline;
|
||||
realview_binfo.initrd_filename = machine->initrd_filename;
|
||||
realview_binfo.nb_cpus = smp_cpus;
|
||||
realview_binfo.board_id = realview_board_id[board_type];
|
||||
realview_binfo.loader_start = (board_type == BOARD_PB_A8 ? 0x70000000 : 0);
|
||||
arm_load_kernel(ARM_CPU(first_cpu), &realview_binfo);
|
||||
arm_load_kernel(ARM_CPU(first_cpu), machine, &realview_binfo);
|
||||
}
|
||||
|
||||
static void realview_eb_init(MachineState *machine)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue