mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43: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
|
@ -25,9 +25,6 @@ static struct arm_boot_info collie_binfo = {
|
|||
|
||||
static void collie_init(MachineState *machine)
|
||||
{
|
||||
const char *kernel_filename = machine->kernel_filename;
|
||||
const char *kernel_cmdline = machine->kernel_cmdline;
|
||||
const char *initrd_filename = machine->initrd_filename;
|
||||
StrongARMState *s;
|
||||
DriveInfo *dinfo;
|
||||
MemoryRegion *sysmem = get_system_memory();
|
||||
|
@ -46,11 +43,8 @@ static void collie_init(MachineState *machine)
|
|||
|
||||
sysbus_create_simple("scoop", 0x40800000, NULL);
|
||||
|
||||
collie_binfo.kernel_filename = kernel_filename;
|
||||
collie_binfo.kernel_cmdline = kernel_cmdline;
|
||||
collie_binfo.initrd_filename = initrd_filename;
|
||||
collie_binfo.board_id = 0x208;
|
||||
arm_load_kernel(s->cpu, &collie_binfo);
|
||||
arm_load_kernel(s->cpu, machine, &collie_binfo);
|
||||
}
|
||||
|
||||
static void collie_machine_init(MachineClass *mc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue