From f93eb9ff66868df42f8433d16f2dc48a4af2490f Mon Sep 17 00:00:00 2001 From: balrog Date: Mon, 14 Apr 2008 20:27:51 +0000 Subject: Move the excess of arm_load_kernel() parameters into a struct. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4212 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/mainstone.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'hw/mainstone.c') diff --git a/hw/mainstone.c b/hw/mainstone.c index 5856791..9564fc3 100644 --- a/hw/mainstone.c +++ b/hw/mainstone.c @@ -59,12 +59,17 @@ static struct keymap map[0xE0] = { enum mainstone_model_e { mainstone }; +static struct arm_boot_info mainstone_binfo = { + .loader_start = PXA2XX_SDRAM_BASE, + .ram_size = 0x04000000, +}; + static void mainstone_common_init(int ram_size, int vga_ram_size, DisplayState *ds, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model, enum mainstone_model_e model, int arm_id) { - uint32_t mainstone_ram = 0x04000000; + uint32_t mainstone_ram = mainstone_binfo.ram_size; uint32_t mainstone_rom = 0x00800000; uint32_t mainstone_flash = 0x02000000; uint32_t sector_len = 256 * 1024; @@ -90,7 +95,7 @@ static void mainstone_common_init(int ram_size, int vga_ram_size, qemu_ram_alloc(mainstone_rom) | IO_MEM_ROM); /* Setup initial (reset) machine state */ - cpu->env->regs[15] = PXA2XX_SDRAM_BASE; + cpu->env->regs[15] = mainstone_binfo.loader_start; /* There are two 32MiB flash devices on the board */ for (i = 0; i < 2; i ++) { @@ -121,8 +126,11 @@ static void mainstone_common_init(int ram_size, int vga_ram_size, smc91c111_init(&nd_table[0], MST_ETH_PHYS, mst_irq[ETHERNET_IRQ]); - arm_load_kernel(cpu->env, mainstone_ram, kernel_filename, kernel_cmdline, - initrd_filename, arm_id, PXA2XX_SDRAM_BASE); + mainstone_binfo.kernel_filename = kernel_filename; + mainstone_binfo.kernel_cmdline = kernel_cmdline; + mainstone_binfo.initrd_filename = initrd_filename; + mainstone_binfo.board_id = arm_id; + arm_load_kernel(cpu->env, &mainstone_binfo); } static void mainstone_init(int ram_size, int vga_ram_size, -- cgit v1.1