diff options
42 files changed, 126 insertions, 133 deletions
diff --git a/hw/an5206.c b/hw/an5206.c index 7088466bc1..5cdda14136 100644 --- a/hw/an5206.c +++ b/hw/an5206.c @@ -27,7 +27,7 @@ void irq_info(Monitor *mon) /* Board init. */ -static void an5206_init(ram_addr_t ram_size, int vga_ram_size, +static void an5206_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/axis_dev88.c b/hw/axis_dev88.c index e9f2ecee9d..098c275afe 100644 --- a/hw/axis_dev88.c +++ b/hw/axis_dev88.c @@ -251,7 +251,7 @@ static void main_cpu_reset(void *opaque) } static -void axisdev88_init (ram_addr_t ram_size, int vga_ram_size, +void axisdev88_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/boards.h b/hw/boards.h index 5611d2c623..3866e93021 100644 --- a/hw/boards.h +++ b/hw/boards.h @@ -3,7 +3,7 @@ #ifndef HW_BOARDS_H #define HW_BOARDS_H -typedef void QEMUMachineInitFunc(ram_addr_t ram_size, int vga_ram_size, +typedef void QEMUMachineInitFunc(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 32cf3e41ac..48f89600e7 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -3239,13 +3239,13 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) * ***************************************/ -void isa_cirrus_vga_init(int vga_ram_size) +void isa_cirrus_vga_init(void) { CirrusVGAState *s; s = qemu_mallocz(sizeof(CirrusVGAState)); - vga_common_init(&s->vga, vga_ram_size); + vga_common_init(&s->vga, VGA_RAM_SIZE); cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0); s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, s->vga.screen_dump, s->vga.text_update, @@ -3301,7 +3301,7 @@ static void pci_cirrus_write_config(PCIDevice *d, cirrus_update_memory_access(s); } -void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size) +void pci_cirrus_vga_init(PCIBus *bus) { PCICirrusVGAState *d; uint8_t *pci_conf; @@ -3323,7 +3323,7 @@ void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size) /* setup VGA */ s = &d->cirrus_vga; - vga_common_init(&s->vga, vga_ram_size); + vga_common_init(&s->vga, VGA_RAM_SIZE); cirrus_init_common(s, device_id, 1); s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, diff --git a/hw/dummy_m68k.c b/hw/dummy_m68k.c index d9f14441a0..cb9b2eb88e 100644 --- a/hw/dummy_m68k.c +++ b/hw/dummy_m68k.c @@ -14,7 +14,7 @@ /* Board init. */ -static void dummy_m68k_init(ram_addr_t ram_size, int vga_ram_size, +static void dummy_m68k_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/etraxfs.c b/hw/etraxfs.c index 03bff48443..56cb249773 100644 --- a/hw/etraxfs.c +++ b/hw/etraxfs.c @@ -46,7 +46,7 @@ static void main_cpu_reset(void *opaque) } static -void bareetraxfs_init (ram_addr_t ram_size, int vga_ram_size, +void bareetraxfs_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/g364fb.c b/hw/g364fb.c index 44c0685cfb..6d37ca128e 100644 --- a/hw/g364fb.c +++ b/hw/g364fb.c @@ -584,7 +584,7 @@ static void g364fb_save(QEMUFile *f, void *opaque) qemu_put_be32(f, s->height); } -int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base, +int g364fb_mm_init(target_phys_addr_t vram_base, target_phys_addr_t ctrl_base, int it_shift, qemu_irq irq) { @@ -593,9 +593,9 @@ int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base, s = qemu_mallocz(sizeof(G364State)); - s->vram_offset = qemu_ram_alloc(vram_size); + s->vram_size = 8 * 1024 * 1024; + s->vram_offset = qemu_ram_alloc(s->vram_size); s->vram = qemu_get_ram_ptr(s->vram_offset); - s->vram_size = vram_size; s->irq = irq; qemu_register_reset(g364fb_reset, s); diff --git a/hw/gumstix.c b/hw/gumstix.c index d116126d15..7dd67ce417 100644 --- a/hw/gumstix.c +++ b/hw/gumstix.c @@ -41,7 +41,7 @@ static const int sector_len = 128 * 1024; -static void connex_init(ram_addr_t ram_size, int vga_ram_size, +static void connex_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -75,7 +75,7 @@ static void connex_init(ram_addr_t ram_size, int vga_ram_size, pxa2xx_gpio_in_get(cpu->gpio)[36]); } -static void verdex_init(ram_addr_t ram_size, int vga_ram_size, +static void verdex_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index 2169f2cf32..8dfc63ed52 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -449,7 +449,7 @@ static struct arm_boot_info integrator_binfo = { .board_id = 0x113, }; -static void integratorcp_init(ram_addr_t ram_size, int vga_ram_size, +static void integratorcp_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/mainstone.c b/hw/mainstone.c index 0e3082f9bf..cb10414e61 100644 --- a/hw/mainstone.c +++ b/hw/mainstone.c @@ -68,7 +68,7 @@ static struct arm_boot_info mainstone_binfo = { .ram_size = 0x04000000, }; -static void mainstone_common_init(ram_addr_t ram_size, int vga_ram_size, +static void mainstone_common_init(ram_addr_t ram_size, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model, enum mainstone_model_e model, int arm_id) @@ -126,12 +126,12 @@ static void mainstone_common_init(ram_addr_t ram_size, int vga_ram_size, arm_load_kernel(cpu->env, &mainstone_binfo); } -static void mainstone_init(ram_addr_t ram_size, int vga_ram_size, +static void mainstone_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - mainstone_common_init(ram_size, vga_ram_size, kernel_filename, + mainstone_common_init(ram_size, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, mainstone, 0x196); } diff --git a/hw/mcf5208.c b/hw/mcf5208.c index f22150a311..50d7f4fd83 100644 --- a/hw/mcf5208.c +++ b/hw/mcf5208.c @@ -193,7 +193,7 @@ static void mcf5208_sys_init(qemu_irq *pic) } } -static void mcf5208evb_init(ram_addr_t ram_size, int vga_ram_size, +static void mcf5208evb_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -10,7 +10,7 @@ void *ds1225y_init(target_phys_addr_t mem_base, const char *filename); void ds1225y_set_protection(void *opaque, int protection); /* g364fb.c */ -int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base, +int g364fb_mm_init(target_phys_addr_t vram_base, target_phys_addr_t ctrl_base, int it_shift, qemu_irq irq); diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c index 5ea4bba8cc..5cc709a52f 100644 --- a/hw/mips_jazz.c +++ b/hw/mips_jazz.c @@ -119,7 +119,7 @@ static void audio_init(qemu_irq *pic) #define MAGNUM_BIOS_SIZE (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX) static -void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, +void mips_jazz_init (ram_addr_t ram_size, const char *cpu_model, enum jazz_model_e jazz_model) { @@ -198,10 +198,10 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, /* Video card */ switch (jazz_model) { case JAZZ_MAGNUM: - g364fb_mm_init(vga_ram_size, 0x40000000, 0x60000000, 0, rc4030[3]); + g364fb_mm_init(0x40000000, 0x60000000, 0, rc4030[3]); break; case JAZZ_PICA61: - isa_vga_mm_init(vga_ram_size, 0x40000000, 0x60000000, 0); + isa_vga_mm_init(0x40000000, 0x60000000, 0); break; default: break; @@ -282,21 +282,21 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, } static -void mips_magnum_init (ram_addr_t ram_size, int vga_ram_size, +void mips_magnum_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - mips_jazz_init(ram_size, vga_ram_size, cpu_model, JAZZ_MAGNUM); + mips_jazz_init(ram_size, cpu_model, JAZZ_MAGNUM); } static -void mips_pica61_init (ram_addr_t ram_size, int vga_ram_size, +void mips_pica61_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - mips_jazz_init(ram_size, vga_ram_size, cpu_model, JAZZ_PICA61); + mips_jazz_init(ram_size, cpu_model, JAZZ_PICA61); } QEMUMachine mips_magnum_machine = { diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 083e73290e..fd81753d2b 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -758,7 +758,7 @@ static void main_cpu_reset(void *opaque) } static -void mips_malta_init (ram_addr_t ram_size, int vga_ram_size, +void mips_malta_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -942,11 +942,11 @@ void mips_malta_init (ram_addr_t ram_size, int vga_ram_size, /* Optional PCI video card */ if (cirrus_vga_enabled) { - pci_cirrus_vga_init(pci_bus, vga_ram_size); + pci_cirrus_vga_init(pci_bus); } else if (vmsvga_enabled) { - pci_vmsvga_init(pci_bus, vga_ram_size); + pci_vmsvga_init(pci_bus); } else if (std_vga_enabled) { - pci_vga_init(pci_bus, vga_ram_size, 0, 0); + pci_vga_init(pci_bus, 0, 0); } } diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c index 676cd265c5..54656ad194 100644 --- a/hw/mips_mipssim.c +++ b/hw/mips_mipssim.c @@ -107,7 +107,7 @@ static void main_cpu_reset(void *opaque) } static void -mips_mipssim_init (ram_addr_t ram_size, int vga_ram_size, +mips_mipssim_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index 51232cf36e..aea82cc9ff 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -147,7 +147,7 @@ static void main_cpu_reset(void *opaque) static const int sector_len = 32 * 1024; static -void mips_r4k_init (ram_addr_t ram_size, int vga_ram_size, +void mips_r4k_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -254,7 +254,7 @@ void mips_r4k_init (ram_addr_t ram_size, int vga_ram_size, } } - isa_vga_init(vga_ram_size); + isa_vga_init(); if (nd_table[0].vlan) isa_ne2000_init(0x300, i8259[9], &nd_table[0]); diff --git a/hw/musicpal.c b/hw/musicpal.c index b1cece4626..b7aff2e4f8 100644 --- a/hw/musicpal.c +++ b/hw/musicpal.c @@ -1512,7 +1512,7 @@ static struct arm_boot_info musicpal_binfo = { .board_id = 0x20e, }; -static void musicpal_init(ram_addr_t ram_size, int vga_ram_size, +static void musicpal_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/nseries.c b/hw/nseries.c index 8f90d535e4..63a1c336ea 100644 --- a/hw/nseries.c +++ b/hw/nseries.c @@ -1382,7 +1382,7 @@ static struct arm_boot_info n810_binfo = { .atag_board = n810_atag_setup, }; -static void n800_init(ram_addr_t ram_size, int vga_ram_size, +static void n800_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -1392,7 +1392,7 @@ static void n800_init(ram_addr_t ram_size, int vga_ram_size, cpu_model, &n800_binfo, 800); } -static void n810_init(ram_addr_t ram_size, int vga_ram_size, +static void n810_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/omap_sx1.c b/hw/omap_sx1.c index 5145a63e9c..5a538833d1 100644 --- a/hw/omap_sx1.c +++ b/hw/omap_sx1.c @@ -115,7 +115,7 @@ static struct arm_boot_info sx1_binfo = { .board_id = 0x265, }; -static void sx1_init(ram_addr_t ram_size, int vga_ram_size, +static void sx1_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model, @@ -205,21 +205,21 @@ static void sx1_init(ram_addr_t ram_size, int vga_ram_size, //~ qemu_console_resize(ds, 640, 480); } -static void sx1_init_v1(ram_addr_t ram_size, int vga_ram_size, +static void sx1_init_v1(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - sx1_init(ram_size, vga_ram_size, boot_device, kernel_filename, + sx1_init(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, 1); } -static void sx1_init_v2(ram_addr_t ram_size, int vga_ram_size, +static void sx1_init_v2(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - sx1_init(ram_size, vga_ram_size, boot_device, kernel_filename, + sx1_init(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, 2); } @@ -193,7 +193,7 @@ static struct arm_boot_info palmte_binfo = { .board_id = 0x331, }; -static void palmte_init(ram_addr_t ram_size, int vga_ram_size, +static void palmte_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -836,7 +836,7 @@ static int load_option_rom(const char *oprom, target_phys_addr_t start, } /* PC hardware initialisation */ -static void pc_init1(ram_addr_t ram_size, int vga_ram_size, +static void pc_init1(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, @@ -999,20 +999,20 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, if (cirrus_vga_enabled) { if (pci_enabled) { - pci_cirrus_vga_init(pci_bus, vga_ram_size); + pci_cirrus_vga_init(pci_bus); } else { - isa_cirrus_vga_init(vga_ram_size); + isa_cirrus_vga_init(); } } else if (vmsvga_enabled) { if (pci_enabled) - pci_vmsvga_init(pci_bus, vga_ram_size); + pci_vmsvga_init(pci_bus); else fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__); } else if (std_vga_enabled) { if (pci_enabled) { - pci_vga_init(pci_bus, vga_ram_size, 0, 0); + pci_vga_init(pci_bus, 0, 0); } else { - isa_vga_init(vga_ram_size); + isa_vga_init(); } } @@ -1162,26 +1162,26 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, } } -static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size, +static void pc_init_pci(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - pc_init1(ram_size, vga_ram_size, boot_device, + pc_init1(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, 1, cpu_model); } -static void pc_init_isa(ram_addr_t ram_size, int vga_ram_size, +static void pc_init_isa(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - pc_init1(ram_size, vga_ram_size, boot_device, + pc_init1(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, 0, cpu_model); } @@ -138,21 +138,15 @@ enum vga_retrace_method { extern enum vga_retrace_method vga_retrace_method; -#if !defined(TARGET_SPARC) || defined(TARGET_SPARC64) -#define VGA_RAM_SIZE (8192 * 1024) -#else -#define VGA_RAM_SIZE (9 * 1024 * 1024) -#endif - -int isa_vga_init(int vga_ram_size); -int pci_vga_init(PCIBus *bus, int vga_ram_size, +int isa_vga_init(void); +int pci_vga_init(PCIBus *bus, unsigned long vga_bios_offset, int vga_bios_size); -int isa_vga_mm_init(int vga_ram_size, target_phys_addr_t vram_base, +int isa_vga_mm_init(target_phys_addr_t vram_base, target_phys_addr_t ctrl_base, int it_shift); /* cirrus_vga.c */ -void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size); -void isa_cirrus_vga_init(int vga_ram_size); +void pci_cirrus_vga_init(PCIBus *bus); +void isa_cirrus_vga_init(void); /* ide.c */ void isa_ide_init(int iobase, int iobase2, qemu_irq irq, @@ -223,7 +223,7 @@ void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id); void *lsi_scsi_init(PCIBus *bus, int devfn); /* vmware_vga.c */ -void pci_vmsvga_init(PCIBus *bus, int vga_ram_size); +void pci_vmsvga_init(PCIBus *bus); /* usb-uhci.c */ void usb_uhci_piix3_init(PCIBus *bus, int devfn); diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c index c6ddfefdb8..bc5f1cf853 100644 --- a/hw/ppc405_boards.c +++ b/hw/ppc405_boards.c @@ -169,7 +169,7 @@ static void ref405ep_fpga_init (uint32_t base) qemu_register_reset(&ref405ep_fpga_reset, fpga); } -static void ref405ep_init (ram_addr_t ram_size, int vga_ram_size, +static void ref405ep_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, @@ -487,7 +487,7 @@ static void taihu_cpld_init (uint32_t base) qemu_register_reset(&taihu_cpld_reset, cpld); } -static void taihu_405ep_init(ram_addr_t ram_size, int vga_ram_size, +static void taihu_405ep_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index 6963309306..e396ac3204 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -84,7 +84,7 @@ out: return fdt; } -static void bamboo_init(ram_addr_t ram_size, int vga_ram_size, +static void bamboo_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c index 0fe8c5f14a..760249ea2a 100644 --- a/hw/ppc_newworld.c +++ b/hw/ppc_newworld.c @@ -85,7 +85,7 @@ static int fw_cfg_boot_set(void *opaque, const char *boot_device) } /* PowerPC Mac99 hardware initialisation */ -static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, +static void ppc_core99_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, @@ -284,8 +284,7 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, pic = openpic_init(NULL, &pic_mem_index, smp_cpus, openpic_irqs, NULL); pci_bus = pci_pmac_init(pic); /* init basic PC hardware */ - pci_vga_init(pci_bus, vga_ram_size, - vga_bios_offset, vga_bios_size); + pci_vga_init(pci_bus, vga_bios_offset, vga_bios_size); /* XXX: suppress that */ dummy_irq = i8259_init(NULL); diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index aa56d50825..a822bfe1d9 100644 --- a/hw/ppc_oldworld.c +++ b/hw/ppc_oldworld.c @@ -114,7 +114,7 @@ static int fw_cfg_boot_set(void *opaque, const char *boot_device) return 0; } -static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, +static void ppc_heathrow_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, @@ -298,8 +298,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, } pic = heathrow_pic_init(&pic_mem_index, 1, heathrow_irqs); pci_bus = pci_grackle_init(0xfec00000, pic); - pci_vga_init(pci_bus, vga_ram_size, - vga_bios_offset, vga_bios_size); + pci_vga_init(pci_bus, vga_bios_offset, vga_bios_size); escc_mem_index = escc_init(0x80013000, pic[0x0f], pic[0x10], serial_hds[0], serial_hds[1], ESCC_CLOCK, 4); diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index e078211d79..9584d91681 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -530,7 +530,7 @@ static CPUReadMemoryFunc *PPC_prep_io_read[] = { #define NVRAM_SIZE 0x2000 /* PowerPC PREP hardware initialisation */ -static void ppc_prep_init (ram_addr_t ram_size, int vga_ram_size, +static void ppc_prep_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, @@ -656,7 +656,7 @@ static void ppc_prep_init (ram_addr_t ram_size, int vga_ram_size, cpu_register_physical_memory(0x80000000, 0x00800000, PPC_io_memory); /* init basic PC hardware */ - pci_vga_init(pci_bus, vga_ram_size, 0, 0); + pci_vga_init(pci_bus, 0, 0); // openpic = openpic_init(0x00000000, 0xF0000000, 1); // pit = pit_init(0x40, i8259[0]); rtc_init(0x70, i8259[8], 2000); diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index d946f038e4..94a83d7179 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -151,7 +151,7 @@ out: return fdt; } -static void mpc8544ds_init(ram_addr_t ram_size, int vga_ram_size, +static void mpc8544ds_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, @@ -193,7 +193,7 @@ static int r2d_pci_map_irq(PCIDevice *d, int irq_num) return intx[d->devfn >> 3]; } -static void r2d_init(ram_addr_t ram_size, int vga_ram_size, +static void r2d_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/realview.c b/hw/realview.c index e41be49806..74fd9d82dd 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -24,7 +24,7 @@ static struct arm_boot_info realview_binfo = { .board_id = 0x33b, }; -static void realview_init(ram_addr_t ram_size, int vga_ram_size, +static void realview_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -46,7 +46,7 @@ void pic_info(Monitor *mon) /* XXXXX */ } -static void shix_init(ram_addr_t ram_size, int vga_ram_size, +static void shix_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/spitz.c b/hw/spitz.c index 805af353a7..d22174ef9a 100644 --- a/hw/spitz.c +++ b/hw/spitz.c @@ -903,7 +903,7 @@ static struct arm_boot_info spitz_binfo = { .ram_size = 0x04000000, }; -static void spitz_common_init(ram_addr_t ram_size, int vga_ram_size, +static void spitz_common_init(ram_addr_t ram_size, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model, enum spitz_model_e model, int arm_id) @@ -959,39 +959,39 @@ static void spitz_common_init(ram_addr_t ram_size, int vga_ram_size, sl_bootparam_write(SL_PXA_PARAM_BASE); } -static void spitz_init(ram_addr_t ram_size, int vga_ram_size, +static void spitz_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - spitz_common_init(ram_size, vga_ram_size, kernel_filename, + spitz_common_init(ram_size, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, spitz, 0x2c9); } -static void borzoi_init(ram_addr_t ram_size, int vga_ram_size, +static void borzoi_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - spitz_common_init(ram_size, vga_ram_size, kernel_filename, + spitz_common_init(ram_size, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, borzoi, 0x33f); } -static void akita_init(ram_addr_t ram_size, int vga_ram_size, +static void akita_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - spitz_common_init(ram_size, vga_ram_size, kernel_filename, + spitz_common_init(ram_size, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, akita, 0x2e8); } -static void terrier_init(ram_addr_t ram_size, int vga_ram_size, +static void terrier_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - spitz_common_init(ram_size, vga_ram_size, kernel_filename, + spitz_common_init(ram_size, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, terrier, 0x33f); } diff --git a/hw/stellaris.c b/hw/stellaris.c index 3a06c128ce..cfd1de9600 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -1373,7 +1373,7 @@ static void stellaris_init(const char *kernel_filename, const char *cpu_model, } /* FIXME: Figure out how to generate these from stellaris_boards. */ -static void lm3s811evb_init(ram_addr_t ram_size, int vga_ram_size, +static void lm3s811evb_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -1381,7 +1381,7 @@ static void lm3s811evb_init(ram_addr_t ram_size, int vga_ram_size, stellaris_init(kernel_filename, cpu_model, &stellaris_boards[0]); } -static void lm3s6965evb_init(ram_addr_t ram_size, int vga_ram_size, +static void lm3s6965evb_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/sun4m.c b/hw/sun4m.c index 1f1efd0733..8c7451ba40 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -931,7 +931,7 @@ static const struct sun4m_hwdef sun4m_hwdefs[] = { }; /* SPARCstation 5 hardware initialisation */ -static void ss5_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss5_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -941,7 +941,7 @@ static void ss5_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCstation 10 hardware initialisation */ -static void ss10_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss10_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -951,7 +951,7 @@ static void ss10_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCserver 600MP hardware initialisation */ -static void ss600mp_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss600mp_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, @@ -962,7 +962,7 @@ static void ss600mp_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCstation 20 hardware initialisation */ -static void ss20_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss20_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -972,7 +972,7 @@ static void ss20_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCstation Voyager hardware initialisation */ -static void vger_init(ram_addr_t RAM_size, int vga_ram_size, +static void vger_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -982,7 +982,7 @@ static void vger_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCstation LX hardware initialisation */ -static void ss_lx_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss_lx_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -992,7 +992,7 @@ static void ss_lx_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCstation 4 hardware initialisation */ -static void ss4_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss4_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -1002,7 +1002,7 @@ static void ss4_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCClassic hardware initialisation */ -static void scls_init(ram_addr_t RAM_size, int vga_ram_size, +static void scls_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -1012,7 +1012,7 @@ static void scls_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCbook hardware initialisation */ -static void sbook_init(ram_addr_t RAM_size, int vga_ram_size, +static void sbook_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -1313,7 +1313,7 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size, } /* SPARCserver 1000 hardware initialisation */ -static void ss1000_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss1000_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -1323,7 +1323,7 @@ static void ss1000_init(ram_addr_t RAM_size, int vga_ram_size, } /* SPARCcenter 2000 hardware initialisation */ -static void ss2000_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss2000_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -1539,7 +1539,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size, } /* SPARCstation 2 hardware initialisation */ -static void ss2_init(ram_addr_t RAM_size, int vga_ram_size, +static void ss2_init(ram_addr_t RAM_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/sun4u.c b/hw/sun4u.c index 8f9e56bb71..6dd4c0b988 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -326,7 +326,7 @@ pci_ebus_init(PCIBus *bus, int devfn) ebus_mmio_mapfunc); } -static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, +static void sun4uv_init(ram_addr_t RAM_size, const char *boot_devices, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model, @@ -447,7 +447,7 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, NULL, &pci_bus2, &pci_bus3); isa_mem_base = VGA_BASE; - pci_vga_init(pci_bus, vga_ram_size, 0, 0); + pci_vga_init(pci_bus, 0, 0); // XXX Should be pci_bus3 pci_ebus_init(pci_bus, -1); @@ -560,32 +560,32 @@ static const struct hwdef hwdefs[] = { }; /* Sun4u hardware initialisation */ -static void sun4u_init(ram_addr_t RAM_size, int vga_ram_size, +static void sun4u_init(ram_addr_t RAM_size, const char *boot_devices, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - sun4uv_init(RAM_size, vga_ram_size, boot_devices, kernel_filename, + sun4uv_init(RAM_size, boot_devices, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, &hwdefs[0]); } /* Sun4v hardware initialisation */ -static void sun4v_init(ram_addr_t RAM_size, int vga_ram_size, +static void sun4v_init(ram_addr_t RAM_size, const char *boot_devices, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - sun4uv_init(RAM_size, vga_ram_size, boot_devices, kernel_filename, + sun4uv_init(RAM_size, boot_devices, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, &hwdefs[1]); } /* Niagara hardware initialisation */ -static void niagara_init(ram_addr_t RAM_size, int vga_ram_size, +static void niagara_init(ram_addr_t RAM_size, const char *boot_devices, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - sun4uv_init(RAM_size, vga_ram_size, boot_devices, kernel_filename, + sun4uv_init(RAM_size, boot_devices, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, &hwdefs[2]); } @@ -196,7 +196,7 @@ static struct arm_boot_info tosa_binfo = { .ram_size = 0x04000000, }; -static void tosa_init(ram_addr_t ram_size, int vga_ram_size, +static void tosa_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) diff --git a/hw/versatilepb.c b/hw/versatilepb.c index c018a06f8a..95de81fee3 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -153,7 +153,7 @@ static qemu_irq *vpb_sic_init(uint32_t base, qemu_irq *parent, int irq) static struct arm_boot_info versatile_binfo; -static void versatile_init(ram_addr_t ram_size, int vga_ram_size, +static void versatile_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model, @@ -289,23 +289,23 @@ static void versatile_init(ram_addr_t ram_size, int vga_ram_size, arm_load_kernel(env, &versatile_binfo); } -static void vpb_init(ram_addr_t ram_size, int vga_ram_size, +static void vpb_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - versatile_init(ram_size, vga_ram_size, + versatile_init(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, 0x183); } -static void vab_init(ram_addr_t ram_size, int vga_ram_size, +static void vab_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - versatile_init(ram_size, vga_ram_size, + versatile_init(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, 0x25e); @@ -2428,13 +2428,13 @@ static void vga_mm_init(VGAState *s, target_phys_addr_t vram_base, qemu_register_coalesced_mmio(vram_base + 0x000a0000, 0x20000); } -int isa_vga_init(int vga_ram_size) +int isa_vga_init(void) { VGAState *s; s = qemu_mallocz(sizeof(VGAState)); - vga_common_init(s, vga_ram_size); + vga_common_init(s, VGA_RAM_SIZE); vga_init(s); s->ds = graphic_console_init(s->update, s->invalidate, @@ -2443,19 +2443,19 @@ int isa_vga_init(int vga_ram_size) #ifdef CONFIG_BOCHS_VBE /* XXX: use optimized standard vga accesses */ cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS, - vga_ram_size, s->vram_offset); + VGA_RAM_SIZE, s->vram_offset); #endif return 0; } -int isa_vga_mm_init(int vga_ram_size, target_phys_addr_t vram_base, +int isa_vga_mm_init(target_phys_addr_t vram_base, target_phys_addr_t ctrl_base, int it_shift) { VGAState *s; s = qemu_mallocz(sizeof(VGAState)); - vga_common_init(s, vga_ram_size); + vga_common_init(s, VGA_RAM_SIZE); vga_mm_init(s, vram_base, ctrl_base, it_shift); s->ds = graphic_console_init(s->update, s->invalidate, @@ -2464,7 +2464,7 @@ int isa_vga_mm_init(int vga_ram_size, target_phys_addr_t vram_base, #ifdef CONFIG_BOCHS_VBE /* XXX: use optimized standard vga accesses */ cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS, - vga_ram_size, s->vram_offset); + VGA_RAM_SIZE, s->vram_offset); #endif return 0; } @@ -2480,7 +2480,7 @@ static void pci_vga_write_config(PCIDevice *d, s->map_addr = 0; } -int pci_vga_init(PCIBus *bus, int vga_ram_size, +int pci_vga_init(PCIBus *bus, unsigned long vga_bios_offset, int vga_bios_size) { PCIVGAState *d; @@ -2494,7 +2494,7 @@ int pci_vga_init(PCIBus *bus, int vga_ram_size, return -1; s = &d->vga_state; - vga_common_init(s, vga_ram_size); + vga_common_init(s, VGA_RAM_SIZE); vga_init(s); s->ds = graphic_console_init(s->update, s->invalidate, @@ -2509,8 +2509,8 @@ int pci_vga_init(PCIBus *bus, int vga_ram_size, pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA); pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type - /* XXX: vga_ram_size must be a power of two */ - pci_register_io_region(&d->dev, 0, vga_ram_size, + /* XXX: VGA_RAM_SIZE must be a power of two */ + pci_register_io_region(&d->dev, 0, VGA_RAM_SIZE, PCI_ADDRESS_SPACE_MEM_PREFETCH, vga_map); if (vga_bios_size != 0) { unsigned int bios_total_size; diff --git a/hw/vga_int.h b/hw/vga_int.h index 3202cde229..631b1b0fc3 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -215,3 +215,6 @@ void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1, extern const uint8_t sr_mask[8]; extern const uint8_t gr_mask[16]; + +#define VGA_RAM_SIZE (8192 * 1024) + diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index ec82f53239..79da1ffd6a 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -1210,7 +1210,7 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num, iomemtype); } -void pci_vmsvga_init(PCIBus *bus, int vga_ram_size) +void pci_vmsvga_init(PCIBus *bus) { struct pci_vmsvga_state_s *s; @@ -1233,10 +1233,10 @@ void pci_vmsvga_init(PCIBus *bus, int vga_ram_size) pci_register_io_region(&s->card, 0, 0x10, PCI_ADDRESS_SPACE_IO, pci_vmsvga_map_ioport); - pci_register_io_region(&s->card, 1, vga_ram_size, + pci_register_io_region(&s->card, 1, VGA_RAM_SIZE, PCI_ADDRESS_SPACE_MEM_PREFETCH, pci_vmsvga_map_mem); - vmsvga_init(&s->chip, vga_ram_size); + vmsvga_init(&s->chip, VGA_RAM_SIZE); register_savevm("vmware_vga", 0, 0, pci_vmsvga_save, pci_vmsvga_load, s); } @@ -199,7 +199,6 @@ static IOPortWriteFunc *ioport_write_table[3][MAX_IOPORTS]; to store the VM snapshots */ DriveInfo drives_table[MAX_DRIVES+1]; int nb_drives; -static int vga_ram_size; enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB; static DisplayState *display_state; int nographic; @@ -4875,7 +4874,6 @@ int main(int argc, char **argv, char **envp) cpu_model = NULL; initrd_filename = NULL; ram_size = 0; - vga_ram_size = VGA_RAM_SIZE; snapshot = 0; nographic = 0; curses = 0; @@ -5898,7 +5896,7 @@ int main(int argc, char **argv, char **envp) } } - machine->init(ram_size, vga_ram_size, boot_devices, + machine->init(ram_size, boot_devices, kernel_filename, kernel_cmdline, initrd_filename, cpu_model); |