Commit fbe1b5953d061c77c07b91e4eb555c92195308d0

Authored by Paul Brook
1 parent 1481e16a

Remove vga_ram_size

The vga_ram_size argument to machine init functions always has the same
value, and is ignored by many machines (including SPARC32 which has an
obsolete ifdef for VGA_RAM_SIZE).

Remove it and push VGA_RAM_SIZE into vga_int.h.

Signed-off-by: Paul Brook <paul@codesourcery.com>
hw/an5206.c
@@ -27,7 +27,7 @@ void irq_info(Monitor *mon) @@ -27,7 +27,7 @@ void irq_info(Monitor *mon)
27 27
28 /* Board init. */ 28 /* Board init. */
29 29
30 -static void an5206_init(ram_addr_t ram_size, int vga_ram_size, 30 +static void an5206_init(ram_addr_t ram_size,
31 const char *boot_device, 31 const char *boot_device,
32 const char *kernel_filename, const char *kernel_cmdline, 32 const char *kernel_filename, const char *kernel_cmdline,
33 const char *initrd_filename, const char *cpu_model) 33 const char *initrd_filename, const char *cpu_model)
hw/axis_dev88.c
@@ -251,7 +251,7 @@ static void main_cpu_reset(void *opaque) @@ -251,7 +251,7 @@ static void main_cpu_reset(void *opaque)
251 } 251 }
252 252
253 static 253 static
254 -void axisdev88_init (ram_addr_t ram_size, int vga_ram_size, 254 +void axisdev88_init (ram_addr_t ram_size,
255 const char *boot_device, 255 const char *boot_device,
256 const char *kernel_filename, const char *kernel_cmdline, 256 const char *kernel_filename, const char *kernel_cmdline,
257 const char *initrd_filename, const char *cpu_model) 257 const char *initrd_filename, const char *cpu_model)
hw/boards.h
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 #ifndef HW_BOARDS_H 3 #ifndef HW_BOARDS_H
4 #define HW_BOARDS_H 4 #define HW_BOARDS_H
5 5
6 -typedef void QEMUMachineInitFunc(ram_addr_t ram_size, int vga_ram_size, 6 +typedef void QEMUMachineInitFunc(ram_addr_t ram_size,
7 const char *boot_device, 7 const char *boot_device,
8 const char *kernel_filename, 8 const char *kernel_filename,
9 const char *kernel_cmdline, 9 const char *kernel_cmdline,
hw/cirrus_vga.c
@@ -3239,13 +3239,13 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) @@ -3239,13 +3239,13 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci)
3239 * 3239 *
3240 ***************************************/ 3240 ***************************************/
3241 3241
3242 -void isa_cirrus_vga_init(int vga_ram_size) 3242 +void isa_cirrus_vga_init(void)
3243 { 3243 {
3244 CirrusVGAState *s; 3244 CirrusVGAState *s;
3245 3245
3246 s = qemu_mallocz(sizeof(CirrusVGAState)); 3246 s = qemu_mallocz(sizeof(CirrusVGAState));
3247 3247
3248 - vga_common_init(&s->vga, vga_ram_size); 3248 + vga_common_init(&s->vga, VGA_RAM_SIZE);
3249 cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0); 3249 cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);
3250 s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, 3250 s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
3251 s->vga.screen_dump, s->vga.text_update, 3251 s->vga.screen_dump, s->vga.text_update,
@@ -3301,7 +3301,7 @@ static void pci_cirrus_write_config(PCIDevice *d, @@ -3301,7 +3301,7 @@ static void pci_cirrus_write_config(PCIDevice *d,
3301 cirrus_update_memory_access(s); 3301 cirrus_update_memory_access(s);
3302 } 3302 }
3303 3303
3304 -void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size) 3304 +void pci_cirrus_vga_init(PCIBus *bus)
3305 { 3305 {
3306 PCICirrusVGAState *d; 3306 PCICirrusVGAState *d;
3307 uint8_t *pci_conf; 3307 uint8_t *pci_conf;
@@ -3323,7 +3323,7 @@ void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size) @@ -3323,7 +3323,7 @@ void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size)
3323 3323
3324 /* setup VGA */ 3324 /* setup VGA */
3325 s = &d->cirrus_vga; 3325 s = &d->cirrus_vga;
3326 - vga_common_init(&s->vga, vga_ram_size); 3326 + vga_common_init(&s->vga, VGA_RAM_SIZE);
3327 cirrus_init_common(s, device_id, 1); 3327 cirrus_init_common(s, device_id, 1);
3328 3328
3329 s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, 3329 s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
hw/dummy_m68k.c
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 14
15 /* Board init. */ 15 /* Board init. */
16 16
17 -static void dummy_m68k_init(ram_addr_t ram_size, int vga_ram_size, 17 +static void dummy_m68k_init(ram_addr_t ram_size,
18 const char *boot_device, 18 const char *boot_device,
19 const char *kernel_filename, const char *kernel_cmdline, 19 const char *kernel_filename, const char *kernel_cmdline,
20 const char *initrd_filename, const char *cpu_model) 20 const char *initrd_filename, const char *cpu_model)
hw/etraxfs.c
@@ -46,7 +46,7 @@ static void main_cpu_reset(void *opaque) @@ -46,7 +46,7 @@ static void main_cpu_reset(void *opaque)
46 } 46 }
47 47
48 static 48 static
49 -void bareetraxfs_init (ram_addr_t ram_size, int vga_ram_size, 49 +void bareetraxfs_init (ram_addr_t ram_size,
50 const char *boot_device, 50 const char *boot_device,
51 const char *kernel_filename, const char *kernel_cmdline, 51 const char *kernel_filename, const char *kernel_cmdline,
52 const char *initrd_filename, const char *cpu_model) 52 const char *initrd_filename, const char *cpu_model)
hw/g364fb.c
@@ -584,7 +584,7 @@ static void g364fb_save(QEMUFile *f, void *opaque) @@ -584,7 +584,7 @@ static void g364fb_save(QEMUFile *f, void *opaque)
584 qemu_put_be32(f, s->height); 584 qemu_put_be32(f, s->height);
585 } 585 }
586 586
587 -int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base, 587 +int g364fb_mm_init(target_phys_addr_t vram_base,
588 target_phys_addr_t ctrl_base, int it_shift, 588 target_phys_addr_t ctrl_base, int it_shift,
589 qemu_irq irq) 589 qemu_irq irq)
590 { 590 {
@@ -593,9 +593,9 @@ int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base, @@ -593,9 +593,9 @@ int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base,
593 593
594 s = qemu_mallocz(sizeof(G364State)); 594 s = qemu_mallocz(sizeof(G364State));
595 595
596 - s->vram_offset = qemu_ram_alloc(vram_size); 596 + s->vram_size = 8 * 1024 * 1024;
  597 + s->vram_offset = qemu_ram_alloc(s->vram_size);
597 s->vram = qemu_get_ram_ptr(s->vram_offset); 598 s->vram = qemu_get_ram_ptr(s->vram_offset);
598 - s->vram_size = vram_size;  
599 s->irq = irq; 599 s->irq = irq;
600 600
601 qemu_register_reset(g364fb_reset, s); 601 qemu_register_reset(g364fb_reset, s);
hw/gumstix.c
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 41
42 static const int sector_len = 128 * 1024; 42 static const int sector_len = 128 * 1024;
43 43
44 -static void connex_init(ram_addr_t ram_size, int vga_ram_size, 44 +static void connex_init(ram_addr_t ram_size,
45 const char *boot_device, 45 const char *boot_device,
46 const char *kernel_filename, const char *kernel_cmdline, 46 const char *kernel_filename, const char *kernel_cmdline,
47 const char *initrd_filename, const char *cpu_model) 47 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, @@ -75,7 +75,7 @@ static void connex_init(ram_addr_t ram_size, int vga_ram_size,
75 pxa2xx_gpio_in_get(cpu->gpio)[36]); 75 pxa2xx_gpio_in_get(cpu->gpio)[36]);
76 } 76 }
77 77
78 -static void verdex_init(ram_addr_t ram_size, int vga_ram_size, 78 +static void verdex_init(ram_addr_t ram_size,
79 const char *boot_device, 79 const char *boot_device,
80 const char *kernel_filename, const char *kernel_cmdline, 80 const char *kernel_filename, const char *kernel_cmdline,
81 const char *initrd_filename, const char *cpu_model) 81 const char *initrd_filename, const char *cpu_model)
hw/integratorcp.c
@@ -449,7 +449,7 @@ static struct arm_boot_info integrator_binfo = { @@ -449,7 +449,7 @@ static struct arm_boot_info integrator_binfo = {
449 .board_id = 0x113, 449 .board_id = 0x113,
450 }; 450 };
451 451
452 -static void integratorcp_init(ram_addr_t ram_size, int vga_ram_size, 452 +static void integratorcp_init(ram_addr_t ram_size,
453 const char *boot_device, 453 const char *boot_device,
454 const char *kernel_filename, const char *kernel_cmdline, 454 const char *kernel_filename, const char *kernel_cmdline,
455 const char *initrd_filename, const char *cpu_model) 455 const char *initrd_filename, const char *cpu_model)
hw/mainstone.c
@@ -68,7 +68,7 @@ static struct arm_boot_info mainstone_binfo = { @@ -68,7 +68,7 @@ static struct arm_boot_info mainstone_binfo = {
68 .ram_size = 0x04000000, 68 .ram_size = 0x04000000,
69 }; 69 };
70 70
71 -static void mainstone_common_init(ram_addr_t ram_size, int vga_ram_size, 71 +static void mainstone_common_init(ram_addr_t ram_size,
72 const char *kernel_filename, 72 const char *kernel_filename,
73 const char *kernel_cmdline, const char *initrd_filename, 73 const char *kernel_cmdline, const char *initrd_filename,
74 const char *cpu_model, enum mainstone_model_e model, int arm_id) 74 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, @@ -126,12 +126,12 @@ static void mainstone_common_init(ram_addr_t ram_size, int vga_ram_size,
126 arm_load_kernel(cpu->env, &mainstone_binfo); 126 arm_load_kernel(cpu->env, &mainstone_binfo);
127 } 127 }
128 128
129 -static void mainstone_init(ram_addr_t ram_size, int vga_ram_size, 129 +static void mainstone_init(ram_addr_t ram_size,
130 const char *boot_device, 130 const char *boot_device,
131 const char *kernel_filename, const char *kernel_cmdline, 131 const char *kernel_filename, const char *kernel_cmdline,
132 const char *initrd_filename, const char *cpu_model) 132 const char *initrd_filename, const char *cpu_model)
133 { 133 {
134 - mainstone_common_init(ram_size, vga_ram_size, kernel_filename, 134 + mainstone_common_init(ram_size, kernel_filename,
135 kernel_cmdline, initrd_filename, cpu_model, mainstone, 0x196); 135 kernel_cmdline, initrd_filename, cpu_model, mainstone, 0x196);
136 } 136 }
137 137
hw/mcf5208.c
@@ -193,7 +193,7 @@ static void mcf5208_sys_init(qemu_irq *pic) @@ -193,7 +193,7 @@ static void mcf5208_sys_init(qemu_irq *pic)
193 } 193 }
194 } 194 }
195 195
196 -static void mcf5208evb_init(ram_addr_t ram_size, int vga_ram_size, 196 +static void mcf5208evb_init(ram_addr_t ram_size,
197 const char *boot_device, 197 const char *boot_device,
198 const char *kernel_filename, const char *kernel_cmdline, 198 const char *kernel_filename, const char *kernel_cmdline,
199 const char *initrd_filename, const char *cpu_model) 199 const char *initrd_filename, const char *cpu_model)
hw/mips.h
@@ -10,7 +10,7 @@ void *ds1225y_init(target_phys_addr_t mem_base, const char *filename); @@ -10,7 +10,7 @@ void *ds1225y_init(target_phys_addr_t mem_base, const char *filename);
10 void ds1225y_set_protection(void *opaque, int protection); 10 void ds1225y_set_protection(void *opaque, int protection);
11 11
12 /* g364fb.c */ 12 /* g364fb.c */
13 -int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base, 13 +int g364fb_mm_init(target_phys_addr_t vram_base,
14 target_phys_addr_t ctrl_base, int it_shift, 14 target_phys_addr_t ctrl_base, int it_shift,
15 qemu_irq irq); 15 qemu_irq irq);
16 16
hw/mips_jazz.c
@@ -119,7 +119,7 @@ static void audio_init(qemu_irq *pic) @@ -119,7 +119,7 @@ static void audio_init(qemu_irq *pic)
119 #define MAGNUM_BIOS_SIZE (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX) 119 #define MAGNUM_BIOS_SIZE (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
120 120
121 static 121 static
122 -void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, 122 +void mips_jazz_init (ram_addr_t ram_size,
123 const char *cpu_model, 123 const char *cpu_model,
124 enum jazz_model_e jazz_model) 124 enum jazz_model_e jazz_model)
125 { 125 {
@@ -198,10 +198,10 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, @@ -198,10 +198,10 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size,
198 /* Video card */ 198 /* Video card */
199 switch (jazz_model) { 199 switch (jazz_model) {
200 case JAZZ_MAGNUM: 200 case JAZZ_MAGNUM:
201 - g364fb_mm_init(vga_ram_size, 0x40000000, 0x60000000, 0, rc4030[3]); 201 + g364fb_mm_init(0x40000000, 0x60000000, 0, rc4030[3]);
202 break; 202 break;
203 case JAZZ_PICA61: 203 case JAZZ_PICA61:
204 - isa_vga_mm_init(vga_ram_size, 0x40000000, 0x60000000, 0); 204 + isa_vga_mm_init(0x40000000, 0x60000000, 0);
205 break; 205 break;
206 default: 206 default:
207 break; 207 break;
@@ -282,21 +282,21 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, @@ -282,21 +282,21 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size,
282 } 282 }
283 283
284 static 284 static
285 -void mips_magnum_init (ram_addr_t ram_size, int vga_ram_size, 285 +void mips_magnum_init (ram_addr_t ram_size,
286 const char *boot_device, 286 const char *boot_device,
287 const char *kernel_filename, const char *kernel_cmdline, 287 const char *kernel_filename, const char *kernel_cmdline,
288 const char *initrd_filename, const char *cpu_model) 288 const char *initrd_filename, const char *cpu_model)
289 { 289 {
290 - mips_jazz_init(ram_size, vga_ram_size, cpu_model, JAZZ_MAGNUM); 290 + mips_jazz_init(ram_size, cpu_model, JAZZ_MAGNUM);
291 } 291 }
292 292
293 static 293 static
294 -void mips_pica61_init (ram_addr_t ram_size, int vga_ram_size, 294 +void mips_pica61_init (ram_addr_t ram_size,
295 const char *boot_device, 295 const char *boot_device,
296 const char *kernel_filename, const char *kernel_cmdline, 296 const char *kernel_filename, const char *kernel_cmdline,
297 const char *initrd_filename, const char *cpu_model) 297 const char *initrd_filename, const char *cpu_model)
298 { 298 {
299 - mips_jazz_init(ram_size, vga_ram_size, cpu_model, JAZZ_PICA61); 299 + mips_jazz_init(ram_size, cpu_model, JAZZ_PICA61);
300 } 300 }
301 301
302 QEMUMachine mips_magnum_machine = { 302 QEMUMachine mips_magnum_machine = {
hw/mips_malta.c
@@ -758,7 +758,7 @@ static void main_cpu_reset(void *opaque) @@ -758,7 +758,7 @@ static void main_cpu_reset(void *opaque)
758 } 758 }
759 759
760 static 760 static
761 -void mips_malta_init (ram_addr_t ram_size, int vga_ram_size, 761 +void mips_malta_init (ram_addr_t ram_size,
762 const char *boot_device, 762 const char *boot_device,
763 const char *kernel_filename, const char *kernel_cmdline, 763 const char *kernel_filename, const char *kernel_cmdline,
764 const char *initrd_filename, const char *cpu_model) 764 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, @@ -942,11 +942,11 @@ void mips_malta_init (ram_addr_t ram_size, int vga_ram_size,
942 942
943 /* Optional PCI video card */ 943 /* Optional PCI video card */
944 if (cirrus_vga_enabled) { 944 if (cirrus_vga_enabled) {
945 - pci_cirrus_vga_init(pci_bus, vga_ram_size); 945 + pci_cirrus_vga_init(pci_bus);
946 } else if (vmsvga_enabled) { 946 } else if (vmsvga_enabled) {
947 - pci_vmsvga_init(pci_bus, vga_ram_size); 947 + pci_vmsvga_init(pci_bus);
948 } else if (std_vga_enabled) { 948 } else if (std_vga_enabled) {
949 - pci_vga_init(pci_bus, vga_ram_size, 0, 0); 949 + pci_vga_init(pci_bus, 0, 0);
950 } 950 }
951 } 951 }
952 952
hw/mips_mipssim.c
@@ -107,7 +107,7 @@ static void main_cpu_reset(void *opaque) @@ -107,7 +107,7 @@ static void main_cpu_reset(void *opaque)
107 } 107 }
108 108
109 static void 109 static void
110 -mips_mipssim_init (ram_addr_t ram_size, int vga_ram_size, 110 +mips_mipssim_init (ram_addr_t ram_size,
111 const char *boot_device, 111 const char *boot_device,
112 const char *kernel_filename, const char *kernel_cmdline, 112 const char *kernel_filename, const char *kernel_cmdline,
113 const char *initrd_filename, const char *cpu_model) 113 const char *initrd_filename, const char *cpu_model)
hw/mips_r4k.c
@@ -147,7 +147,7 @@ static void main_cpu_reset(void *opaque) @@ -147,7 +147,7 @@ static void main_cpu_reset(void *opaque)
147 147
148 static const int sector_len = 32 * 1024; 148 static const int sector_len = 32 * 1024;
149 static 149 static
150 -void mips_r4k_init (ram_addr_t ram_size, int vga_ram_size, 150 +void mips_r4k_init (ram_addr_t ram_size,
151 const char *boot_device, 151 const char *boot_device,
152 const char *kernel_filename, const char *kernel_cmdline, 152 const char *kernel_filename, const char *kernel_cmdline,
153 const char *initrd_filename, const char *cpu_model) 153 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, @@ -254,7 +254,7 @@ void mips_r4k_init (ram_addr_t ram_size, int vga_ram_size,
254 } 254 }
255 } 255 }
256 256
257 - isa_vga_init(vga_ram_size); 257 + isa_vga_init();
258 258
259 if (nd_table[0].vlan) 259 if (nd_table[0].vlan)
260 isa_ne2000_init(0x300, i8259[9], &nd_table[0]); 260 isa_ne2000_init(0x300, i8259[9], &nd_table[0]);
hw/musicpal.c
@@ -1512,7 +1512,7 @@ static struct arm_boot_info musicpal_binfo = { @@ -1512,7 +1512,7 @@ static struct arm_boot_info musicpal_binfo = {
1512 .board_id = 0x20e, 1512 .board_id = 0x20e,
1513 }; 1513 };
1514 1514
1515 -static void musicpal_init(ram_addr_t ram_size, int vga_ram_size, 1515 +static void musicpal_init(ram_addr_t ram_size,
1516 const char *boot_device, 1516 const char *boot_device,
1517 const char *kernel_filename, const char *kernel_cmdline, 1517 const char *kernel_filename, const char *kernel_cmdline,
1518 const char *initrd_filename, const char *cpu_model) 1518 const char *initrd_filename, const char *cpu_model)
hw/nseries.c
@@ -1382,7 +1382,7 @@ static struct arm_boot_info n810_binfo = { @@ -1382,7 +1382,7 @@ static struct arm_boot_info n810_binfo = {
1382 .atag_board = n810_atag_setup, 1382 .atag_board = n810_atag_setup,
1383 }; 1383 };
1384 1384
1385 -static void n800_init(ram_addr_t ram_size, int vga_ram_size, 1385 +static void n800_init(ram_addr_t ram_size,
1386 const char *boot_device, 1386 const char *boot_device,
1387 const char *kernel_filename, const char *kernel_cmdline, 1387 const char *kernel_filename, const char *kernel_cmdline,
1388 const char *initrd_filename, const char *cpu_model) 1388 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, @@ -1392,7 +1392,7 @@ static void n800_init(ram_addr_t ram_size, int vga_ram_size,
1392 cpu_model, &n800_binfo, 800); 1392 cpu_model, &n800_binfo, 800);
1393 } 1393 }
1394 1394
1395 -static void n810_init(ram_addr_t ram_size, int vga_ram_size, 1395 +static void n810_init(ram_addr_t ram_size,
1396 const char *boot_device, 1396 const char *boot_device,
1397 const char *kernel_filename, const char *kernel_cmdline, 1397 const char *kernel_filename, const char *kernel_cmdline,
1398 const char *initrd_filename, const char *cpu_model) 1398 const char *initrd_filename, const char *cpu_model)
hw/omap_sx1.c
@@ -115,7 +115,7 @@ static struct arm_boot_info sx1_binfo = { @@ -115,7 +115,7 @@ static struct arm_boot_info sx1_binfo = {
115 .board_id = 0x265, 115 .board_id = 0x265,
116 }; 116 };
117 117
118 -static void sx1_init(ram_addr_t ram_size, int vga_ram_size, 118 +static void sx1_init(ram_addr_t ram_size,
119 const char *boot_device, 119 const char *boot_device,
120 const char *kernel_filename, const char *kernel_cmdline, 120 const char *kernel_filename, const char *kernel_cmdline,
121 const char *initrd_filename, const char *cpu_model, 121 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, @@ -205,21 +205,21 @@ static void sx1_init(ram_addr_t ram_size, int vga_ram_size,
205 //~ qemu_console_resize(ds, 640, 480); 205 //~ qemu_console_resize(ds, 640, 480);
206 } 206 }
207 207
208 -static void sx1_init_v1(ram_addr_t ram_size, int vga_ram_size, 208 +static void sx1_init_v1(ram_addr_t ram_size,
209 const char *boot_device, 209 const char *boot_device,
210 const char *kernel_filename, const char *kernel_cmdline, 210 const char *kernel_filename, const char *kernel_cmdline,
211 const char *initrd_filename, const char *cpu_model) 211 const char *initrd_filename, const char *cpu_model)
212 { 212 {
213 - sx1_init(ram_size, vga_ram_size, boot_device, kernel_filename, 213 + sx1_init(ram_size, boot_device, kernel_filename,
214 kernel_cmdline, initrd_filename, cpu_model, 1); 214 kernel_cmdline, initrd_filename, cpu_model, 1);
215 } 215 }
216 216
217 -static void sx1_init_v2(ram_addr_t ram_size, int vga_ram_size, 217 +static void sx1_init_v2(ram_addr_t ram_size,
218 const char *boot_device, 218 const char *boot_device,
219 const char *kernel_filename, const char *kernel_cmdline, 219 const char *kernel_filename, const char *kernel_cmdline,
220 const char *initrd_filename, const char *cpu_model) 220 const char *initrd_filename, const char *cpu_model)
221 { 221 {
222 - sx1_init(ram_size, vga_ram_size, boot_device, kernel_filename, 222 + sx1_init(ram_size, boot_device, kernel_filename,
223 kernel_cmdline, initrd_filename, cpu_model, 2); 223 kernel_cmdline, initrd_filename, cpu_model, 2);
224 } 224 }
225 225
hw/palm.c
@@ -193,7 +193,7 @@ static struct arm_boot_info palmte_binfo = { @@ -193,7 +193,7 @@ static struct arm_boot_info palmte_binfo = {
193 .board_id = 0x331, 193 .board_id = 0x331,
194 }; 194 };
195 195
196 -static void palmte_init(ram_addr_t ram_size, int vga_ram_size, 196 +static void palmte_init(ram_addr_t ram_size,
197 const char *boot_device, 197 const char *boot_device,
198 const char *kernel_filename, const char *kernel_cmdline, 198 const char *kernel_filename, const char *kernel_cmdline,
199 const char *initrd_filename, const char *cpu_model) 199 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, @@ -836,7 +836,7 @@ static int load_option_rom(const char *oprom, target_phys_addr_t start,
836 } 836 }
837 837
838 /* PC hardware initialisation */ 838 /* PC hardware initialisation */
839 -static void pc_init1(ram_addr_t ram_size, int vga_ram_size, 839 +static void pc_init1(ram_addr_t ram_size,
840 const char *boot_device, 840 const char *boot_device,
841 const char *kernel_filename, const char *kernel_cmdline, 841 const char *kernel_filename, const char *kernel_cmdline,
842 const char *initrd_filename, 842 const char *initrd_filename,
@@ -999,20 +999,20 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, @@ -999,20 +999,20 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
999 999
1000 if (cirrus_vga_enabled) { 1000 if (cirrus_vga_enabled) {
1001 if (pci_enabled) { 1001 if (pci_enabled) {
1002 - pci_cirrus_vga_init(pci_bus, vga_ram_size); 1002 + pci_cirrus_vga_init(pci_bus);
1003 } else { 1003 } else {
1004 - isa_cirrus_vga_init(vga_ram_size); 1004 + isa_cirrus_vga_init();
1005 } 1005 }
1006 } else if (vmsvga_enabled) { 1006 } else if (vmsvga_enabled) {
1007 if (pci_enabled) 1007 if (pci_enabled)
1008 - pci_vmsvga_init(pci_bus, vga_ram_size); 1008 + pci_vmsvga_init(pci_bus);
1009 else 1009 else
1010 fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__); 1010 fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
1011 } else if (std_vga_enabled) { 1011 } else if (std_vga_enabled) {
1012 if (pci_enabled) { 1012 if (pci_enabled) {
1013 - pci_vga_init(pci_bus, vga_ram_size, 0, 0); 1013 + pci_vga_init(pci_bus, 0, 0);
1014 } else { 1014 } else {
1015 - isa_vga_init(vga_ram_size); 1015 + isa_vga_init();
1016 } 1016 }
1017 } 1017 }
1018 1018
@@ -1162,26 +1162,26 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, @@ -1162,26 +1162,26 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
1162 } 1162 }
1163 } 1163 }
1164 1164
1165 -static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size, 1165 +static void pc_init_pci(ram_addr_t ram_size,
1166 const char *boot_device, 1166 const char *boot_device,
1167 const char *kernel_filename, 1167 const char *kernel_filename,
1168 const char *kernel_cmdline, 1168 const char *kernel_cmdline,
1169 const char *initrd_filename, 1169 const char *initrd_filename,
1170 const char *cpu_model) 1170 const char *cpu_model)
1171 { 1171 {
1172 - pc_init1(ram_size, vga_ram_size, boot_device, 1172 + pc_init1(ram_size, boot_device,
1173 kernel_filename, kernel_cmdline, 1173 kernel_filename, kernel_cmdline,
1174 initrd_filename, 1, cpu_model); 1174 initrd_filename, 1, cpu_model);
1175 } 1175 }
1176 1176
1177 -static void pc_init_isa(ram_addr_t ram_size, int vga_ram_size, 1177 +static void pc_init_isa(ram_addr_t ram_size,
1178 const char *boot_device, 1178 const char *boot_device,
1179 const char *kernel_filename, 1179 const char *kernel_filename,
1180 const char *kernel_cmdline, 1180 const char *kernel_cmdline,
1181 const char *initrd_filename, 1181 const char *initrd_filename,
1182 const char *cpu_model) 1182 const char *cpu_model)
1183 { 1183 {
1184 - pc_init1(ram_size, vga_ram_size, boot_device, 1184 + pc_init1(ram_size, boot_device,
1185 kernel_filename, kernel_cmdline, 1185 kernel_filename, kernel_cmdline,
1186 initrd_filename, 0, cpu_model); 1186 initrd_filename, 0, cpu_model);
1187 } 1187 }
@@ -138,21 +138,15 @@ enum vga_retrace_method { @@ -138,21 +138,15 @@ enum vga_retrace_method {
138 138
139 extern enum vga_retrace_method vga_retrace_method; 139 extern enum vga_retrace_method vga_retrace_method;
140 140
141 -#if !defined(TARGET_SPARC) || defined(TARGET_SPARC64)  
142 -#define VGA_RAM_SIZE (8192 * 1024)  
143 -#else  
144 -#define VGA_RAM_SIZE (9 * 1024 * 1024)  
145 -#endif  
146 -  
147 -int isa_vga_init(int vga_ram_size);  
148 -int pci_vga_init(PCIBus *bus, int vga_ram_size, 141 +int isa_vga_init(void);
  142 +int pci_vga_init(PCIBus *bus,
149 unsigned long vga_bios_offset, int vga_bios_size); 143 unsigned long vga_bios_offset, int vga_bios_size);
150 -int isa_vga_mm_init(int vga_ram_size, target_phys_addr_t vram_base, 144 +int isa_vga_mm_init(target_phys_addr_t vram_base,
151 target_phys_addr_t ctrl_base, int it_shift); 145 target_phys_addr_t ctrl_base, int it_shift);
152 146
153 /* cirrus_vga.c */ 147 /* cirrus_vga.c */
154 -void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size);  
155 -void isa_cirrus_vga_init(int vga_ram_size); 148 +void pci_cirrus_vga_init(PCIBus *bus);
  149 +void isa_cirrus_vga_init(void);
156 150
157 /* ide.c */ 151 /* ide.c */
158 void isa_ide_init(int iobase, int iobase2, qemu_irq irq, 152 void isa_ide_init(int iobase, int iobase2, qemu_irq irq,
hw/pci.h
@@ -223,7 +223,7 @@ void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id); @@ -223,7 +223,7 @@ void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id);
223 void *lsi_scsi_init(PCIBus *bus, int devfn); 223 void *lsi_scsi_init(PCIBus *bus, int devfn);
224 224
225 /* vmware_vga.c */ 225 /* vmware_vga.c */
226 -void pci_vmsvga_init(PCIBus *bus, int vga_ram_size); 226 +void pci_vmsvga_init(PCIBus *bus);
227 227
228 /* usb-uhci.c */ 228 /* usb-uhci.c */
229 void usb_uhci_piix3_init(PCIBus *bus, int devfn); 229 void usb_uhci_piix3_init(PCIBus *bus, int devfn);
hw/ppc405_boards.c
@@ -169,7 +169,7 @@ static void ref405ep_fpga_init (uint32_t base) @@ -169,7 +169,7 @@ static void ref405ep_fpga_init (uint32_t base)
169 qemu_register_reset(&ref405ep_fpga_reset, fpga); 169 qemu_register_reset(&ref405ep_fpga_reset, fpga);
170 } 170 }
171 171
172 -static void ref405ep_init (ram_addr_t ram_size, int vga_ram_size, 172 +static void ref405ep_init (ram_addr_t ram_size,
173 const char *boot_device, 173 const char *boot_device,
174 const char *kernel_filename, 174 const char *kernel_filename,
175 const char *kernel_cmdline, 175 const char *kernel_cmdline,
@@ -487,7 +487,7 @@ static void taihu_cpld_init (uint32_t base) @@ -487,7 +487,7 @@ static void taihu_cpld_init (uint32_t base)
487 qemu_register_reset(&taihu_cpld_reset, cpld); 487 qemu_register_reset(&taihu_cpld_reset, cpld);
488 } 488 }
489 489
490 -static void taihu_405ep_init(ram_addr_t ram_size, int vga_ram_size, 490 +static void taihu_405ep_init(ram_addr_t ram_size,
491 const char *boot_device, 491 const char *boot_device,
492 const char *kernel_filename, 492 const char *kernel_filename,
493 const char *kernel_cmdline, 493 const char *kernel_cmdline,
hw/ppc440_bamboo.c
@@ -84,7 +84,7 @@ out: @@ -84,7 +84,7 @@ out:
84 return fdt; 84 return fdt;
85 } 85 }
86 86
87 -static void bamboo_init(ram_addr_t ram_size, int vga_ram_size, 87 +static void bamboo_init(ram_addr_t ram_size,
88 const char *boot_device, 88 const char *boot_device,
89 const char *kernel_filename, 89 const char *kernel_filename,
90 const char *kernel_cmdline, 90 const char *kernel_cmdline,
hw/ppc_newworld.c
@@ -85,7 +85,7 @@ static int fw_cfg_boot_set(void *opaque, const char *boot_device) @@ -85,7 +85,7 @@ static int fw_cfg_boot_set(void *opaque, const char *boot_device)
85 } 85 }
86 86
87 /* PowerPC Mac99 hardware initialisation */ 87 /* PowerPC Mac99 hardware initialisation */
88 -static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, 88 +static void ppc_core99_init (ram_addr_t ram_size,
89 const char *boot_device, 89 const char *boot_device,
90 const char *kernel_filename, 90 const char *kernel_filename,
91 const char *kernel_cmdline, 91 const char *kernel_cmdline,
@@ -284,8 +284,7 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, @@ -284,8 +284,7 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size,
284 pic = openpic_init(NULL, &pic_mem_index, smp_cpus, openpic_irqs, NULL); 284 pic = openpic_init(NULL, &pic_mem_index, smp_cpus, openpic_irqs, NULL);
285 pci_bus = pci_pmac_init(pic); 285 pci_bus = pci_pmac_init(pic);
286 /* init basic PC hardware */ 286 /* init basic PC hardware */
287 - pci_vga_init(pci_bus, vga_ram_size,  
288 - vga_bios_offset, vga_bios_size); 287 + pci_vga_init(pci_bus, vga_bios_offset, vga_bios_size);
289 288
290 /* XXX: suppress that */ 289 /* XXX: suppress that */
291 dummy_irq = i8259_init(NULL); 290 dummy_irq = i8259_init(NULL);
hw/ppc_oldworld.c
@@ -114,7 +114,7 @@ static int fw_cfg_boot_set(void *opaque, const char *boot_device) @@ -114,7 +114,7 @@ static int fw_cfg_boot_set(void *opaque, const char *boot_device)
114 return 0; 114 return 0;
115 } 115 }
116 116
117 -static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, 117 +static void ppc_heathrow_init (ram_addr_t ram_size,
118 const char *boot_device, 118 const char *boot_device,
119 const char *kernel_filename, 119 const char *kernel_filename,
120 const char *kernel_cmdline, 120 const char *kernel_cmdline,
@@ -298,8 +298,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, @@ -298,8 +298,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
298 } 298 }
299 pic = heathrow_pic_init(&pic_mem_index, 1, heathrow_irqs); 299 pic = heathrow_pic_init(&pic_mem_index, 1, heathrow_irqs);
300 pci_bus = pci_grackle_init(0xfec00000, pic); 300 pci_bus = pci_grackle_init(0xfec00000, pic);
301 - pci_vga_init(pci_bus, vga_ram_size,  
302 - vga_bios_offset, vga_bios_size); 301 + pci_vga_init(pci_bus, vga_bios_offset, vga_bios_size);
303 302
304 escc_mem_index = escc_init(0x80013000, pic[0x0f], pic[0x10], serial_hds[0], 303 escc_mem_index = escc_init(0x80013000, pic[0x0f], pic[0x10], serial_hds[0],
305 serial_hds[1], ESCC_CLOCK, 4); 304 serial_hds[1], ESCC_CLOCK, 4);
hw/ppc_prep.c
@@ -530,7 +530,7 @@ static CPUReadMemoryFunc *PPC_prep_io_read[] = { @@ -530,7 +530,7 @@ static CPUReadMemoryFunc *PPC_prep_io_read[] = {
530 #define NVRAM_SIZE 0x2000 530 #define NVRAM_SIZE 0x2000
531 531
532 /* PowerPC PREP hardware initialisation */ 532 /* PowerPC PREP hardware initialisation */
533 -static void ppc_prep_init (ram_addr_t ram_size, int vga_ram_size, 533 +static void ppc_prep_init (ram_addr_t ram_size,
534 const char *boot_device, 534 const char *boot_device,
535 const char *kernel_filename, 535 const char *kernel_filename,
536 const char *kernel_cmdline, 536 const char *kernel_cmdline,
@@ -656,7 +656,7 @@ static void ppc_prep_init (ram_addr_t ram_size, int vga_ram_size, @@ -656,7 +656,7 @@ static void ppc_prep_init (ram_addr_t ram_size, int vga_ram_size,
656 cpu_register_physical_memory(0x80000000, 0x00800000, PPC_io_memory); 656 cpu_register_physical_memory(0x80000000, 0x00800000, PPC_io_memory);
657 657
658 /* init basic PC hardware */ 658 /* init basic PC hardware */
659 - pci_vga_init(pci_bus, vga_ram_size, 0, 0); 659 + pci_vga_init(pci_bus, 0, 0);
660 // openpic = openpic_init(0x00000000, 0xF0000000, 1); 660 // openpic = openpic_init(0x00000000, 0xF0000000, 1);
661 // pit = pit_init(0x40, i8259[0]); 661 // pit = pit_init(0x40, i8259[0]);
662 rtc_init(0x70, i8259[8], 2000); 662 rtc_init(0x70, i8259[8], 2000);
hw/ppce500_mpc8544ds.c
@@ -151,7 +151,7 @@ out: @@ -151,7 +151,7 @@ out:
151 return fdt; 151 return fdt;
152 } 152 }
153 153
154 -static void mpc8544ds_init(ram_addr_t ram_size, int vga_ram_size, 154 +static void mpc8544ds_init(ram_addr_t ram_size,
155 const char *boot_device, 155 const char *boot_device,
156 const char *kernel_filename, 156 const char *kernel_filename,
157 const char *kernel_cmdline, 157 const char *kernel_cmdline,
hw/r2d.c
@@ -193,7 +193,7 @@ static int r2d_pci_map_irq(PCIDevice *d, int irq_num) @@ -193,7 +193,7 @@ static int r2d_pci_map_irq(PCIDevice *d, int irq_num)
193 return intx[d->devfn >> 3]; 193 return intx[d->devfn >> 3];
194 } 194 }
195 195
196 -static void r2d_init(ram_addr_t ram_size, int vga_ram_size, 196 +static void r2d_init(ram_addr_t ram_size,
197 const char *boot_device, 197 const char *boot_device,
198 const char *kernel_filename, const char *kernel_cmdline, 198 const char *kernel_filename, const char *kernel_cmdline,
199 const char *initrd_filename, const char *cpu_model) 199 const char *initrd_filename, const char *cpu_model)
hw/realview.c
@@ -24,7 +24,7 @@ static struct arm_boot_info realview_binfo = { @@ -24,7 +24,7 @@ static struct arm_boot_info realview_binfo = {
24 .board_id = 0x33b, 24 .board_id = 0x33b,
25 }; 25 };
26 26
27 -static void realview_init(ram_addr_t ram_size, int vga_ram_size, 27 +static void realview_init(ram_addr_t ram_size,
28 const char *boot_device, 28 const char *boot_device,
29 const char *kernel_filename, const char *kernel_cmdline, 29 const char *kernel_filename, const char *kernel_cmdline,
30 const char *initrd_filename, const char *cpu_model) 30 const char *initrd_filename, const char *cpu_model)
hw/shix.c
@@ -46,7 +46,7 @@ void pic_info(Monitor *mon) @@ -46,7 +46,7 @@ void pic_info(Monitor *mon)
46 /* XXXXX */ 46 /* XXXXX */
47 } 47 }
48 48
49 -static void shix_init(ram_addr_t ram_size, int vga_ram_size, 49 +static void shix_init(ram_addr_t ram_size,
50 const char *boot_device, 50 const char *boot_device,
51 const char *kernel_filename, const char *kernel_cmdline, 51 const char *kernel_filename, const char *kernel_cmdline,
52 const char *initrd_filename, const char *cpu_model) 52 const char *initrd_filename, const char *cpu_model)
hw/spitz.c
@@ -903,7 +903,7 @@ static struct arm_boot_info spitz_binfo = { @@ -903,7 +903,7 @@ static struct arm_boot_info spitz_binfo = {
903 .ram_size = 0x04000000, 903 .ram_size = 0x04000000,
904 }; 904 };
905 905
906 -static void spitz_common_init(ram_addr_t ram_size, int vga_ram_size, 906 +static void spitz_common_init(ram_addr_t ram_size,
907 const char *kernel_filename, 907 const char *kernel_filename,
908 const char *kernel_cmdline, const char *initrd_filename, 908 const char *kernel_cmdline, const char *initrd_filename,
909 const char *cpu_model, enum spitz_model_e model, int arm_id) 909 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, @@ -959,39 +959,39 @@ static void spitz_common_init(ram_addr_t ram_size, int vga_ram_size,
959 sl_bootparam_write(SL_PXA_PARAM_BASE); 959 sl_bootparam_write(SL_PXA_PARAM_BASE);
960 } 960 }
961 961
962 -static void spitz_init(ram_addr_t ram_size, int vga_ram_size, 962 +static void spitz_init(ram_addr_t ram_size,
963 const char *boot_device, 963 const char *boot_device,
964 const char *kernel_filename, const char *kernel_cmdline, 964 const char *kernel_filename, const char *kernel_cmdline,
965 const char *initrd_filename, const char *cpu_model) 965 const char *initrd_filename, const char *cpu_model)
966 { 966 {
967 - spitz_common_init(ram_size, vga_ram_size, kernel_filename, 967 + spitz_common_init(ram_size, kernel_filename,
968 kernel_cmdline, initrd_filename, cpu_model, spitz, 0x2c9); 968 kernel_cmdline, initrd_filename, cpu_model, spitz, 0x2c9);
969 } 969 }
970 970
971 -static void borzoi_init(ram_addr_t ram_size, int vga_ram_size, 971 +static void borzoi_init(ram_addr_t ram_size,
972 const char *boot_device, 972 const char *boot_device,
973 const char *kernel_filename, const char *kernel_cmdline, 973 const char *kernel_filename, const char *kernel_cmdline,
974 const char *initrd_filename, const char *cpu_model) 974 const char *initrd_filename, const char *cpu_model)
975 { 975 {
976 - spitz_common_init(ram_size, vga_ram_size, kernel_filename, 976 + spitz_common_init(ram_size, kernel_filename,
977 kernel_cmdline, initrd_filename, cpu_model, borzoi, 0x33f); 977 kernel_cmdline, initrd_filename, cpu_model, borzoi, 0x33f);
978 } 978 }
979 979
980 -static void akita_init(ram_addr_t ram_size, int vga_ram_size, 980 +static void akita_init(ram_addr_t ram_size,
981 const char *boot_device, 981 const char *boot_device,
982 const char *kernel_filename, const char *kernel_cmdline, 982 const char *kernel_filename, const char *kernel_cmdline,
983 const char *initrd_filename, const char *cpu_model) 983 const char *initrd_filename, const char *cpu_model)
984 { 984 {
985 - spitz_common_init(ram_size, vga_ram_size, kernel_filename, 985 + spitz_common_init(ram_size, kernel_filename,
986 kernel_cmdline, initrd_filename, cpu_model, akita, 0x2e8); 986 kernel_cmdline, initrd_filename, cpu_model, akita, 0x2e8);
987 } 987 }
988 988
989 -static void terrier_init(ram_addr_t ram_size, int vga_ram_size, 989 +static void terrier_init(ram_addr_t ram_size,
990 const char *boot_device, 990 const char *boot_device,
991 const char *kernel_filename, const char *kernel_cmdline, 991 const char *kernel_filename, const char *kernel_cmdline,
992 const char *initrd_filename, const char *cpu_model) 992 const char *initrd_filename, const char *cpu_model)
993 { 993 {
994 - spitz_common_init(ram_size, vga_ram_size, kernel_filename, 994 + spitz_common_init(ram_size, kernel_filename,
995 kernel_cmdline, initrd_filename, cpu_model, terrier, 0x33f); 995 kernel_cmdline, initrd_filename, cpu_model, terrier, 0x33f);
996 } 996 }
997 997
hw/stellaris.c
@@ -1373,7 +1373,7 @@ static void stellaris_init(const char *kernel_filename, const char *cpu_model, @@ -1373,7 +1373,7 @@ static void stellaris_init(const char *kernel_filename, const char *cpu_model,
1373 } 1373 }
1374 1374
1375 /* FIXME: Figure out how to generate these from stellaris_boards. */ 1375 /* FIXME: Figure out how to generate these from stellaris_boards. */
1376 -static void lm3s811evb_init(ram_addr_t ram_size, int vga_ram_size, 1376 +static void lm3s811evb_init(ram_addr_t ram_size,
1377 const char *boot_device, 1377 const char *boot_device,
1378 const char *kernel_filename, const char *kernel_cmdline, 1378 const char *kernel_filename, const char *kernel_cmdline,
1379 const char *initrd_filename, const char *cpu_model) 1379 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, @@ -1381,7 +1381,7 @@ static void lm3s811evb_init(ram_addr_t ram_size, int vga_ram_size,
1381 stellaris_init(kernel_filename, cpu_model, &stellaris_boards[0]); 1381 stellaris_init(kernel_filename, cpu_model, &stellaris_boards[0]);
1382 } 1382 }
1383 1383
1384 -static void lm3s6965evb_init(ram_addr_t ram_size, int vga_ram_size, 1384 +static void lm3s6965evb_init(ram_addr_t ram_size,
1385 const char *boot_device, 1385 const char *boot_device,
1386 const char *kernel_filename, const char *kernel_cmdline, 1386 const char *kernel_filename, const char *kernel_cmdline,
1387 const char *initrd_filename, const char *cpu_model) 1387 const char *initrd_filename, const char *cpu_model)
hw/sun4m.c
@@ -931,7 +931,7 @@ static const struct sun4m_hwdef sun4m_hwdefs[] = { @@ -931,7 +931,7 @@ static const struct sun4m_hwdef sun4m_hwdefs[] = {
931 }; 931 };
932 932
933 /* SPARCstation 5 hardware initialisation */ 933 /* SPARCstation 5 hardware initialisation */
934 -static void ss5_init(ram_addr_t RAM_size, int vga_ram_size, 934 +static void ss5_init(ram_addr_t RAM_size,
935 const char *boot_device, 935 const char *boot_device,
936 const char *kernel_filename, const char *kernel_cmdline, 936 const char *kernel_filename, const char *kernel_cmdline,
937 const char *initrd_filename, const char *cpu_model) 937 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, @@ -941,7 +941,7 @@ static void ss5_init(ram_addr_t RAM_size, int vga_ram_size,
941 } 941 }
942 942
943 /* SPARCstation 10 hardware initialisation */ 943 /* SPARCstation 10 hardware initialisation */
944 -static void ss10_init(ram_addr_t RAM_size, int vga_ram_size, 944 +static void ss10_init(ram_addr_t RAM_size,
945 const char *boot_device, 945 const char *boot_device,
946 const char *kernel_filename, const char *kernel_cmdline, 946 const char *kernel_filename, const char *kernel_cmdline,
947 const char *initrd_filename, const char *cpu_model) 947 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, @@ -951,7 +951,7 @@ static void ss10_init(ram_addr_t RAM_size, int vga_ram_size,
951 } 951 }
952 952
953 /* SPARCserver 600MP hardware initialisation */ 953 /* SPARCserver 600MP hardware initialisation */
954 -static void ss600mp_init(ram_addr_t RAM_size, int vga_ram_size, 954 +static void ss600mp_init(ram_addr_t RAM_size,
955 const char *boot_device, 955 const char *boot_device,
956 const char *kernel_filename, 956 const char *kernel_filename,
957 const char *kernel_cmdline, 957 const char *kernel_cmdline,
@@ -962,7 +962,7 @@ static void ss600mp_init(ram_addr_t RAM_size, int vga_ram_size, @@ -962,7 +962,7 @@ static void ss600mp_init(ram_addr_t RAM_size, int vga_ram_size,
962 } 962 }
963 963
964 /* SPARCstation 20 hardware initialisation */ 964 /* SPARCstation 20 hardware initialisation */
965 -static void ss20_init(ram_addr_t RAM_size, int vga_ram_size, 965 +static void ss20_init(ram_addr_t RAM_size,
966 const char *boot_device, 966 const char *boot_device,
967 const char *kernel_filename, const char *kernel_cmdline, 967 const char *kernel_filename, const char *kernel_cmdline,
968 const char *initrd_filename, const char *cpu_model) 968 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, @@ -972,7 +972,7 @@ static void ss20_init(ram_addr_t RAM_size, int vga_ram_size,
972 } 972 }
973 973
974 /* SPARCstation Voyager hardware initialisation */ 974 /* SPARCstation Voyager hardware initialisation */
975 -static void vger_init(ram_addr_t RAM_size, int vga_ram_size, 975 +static void vger_init(ram_addr_t RAM_size,
976 const char *boot_device, 976 const char *boot_device,
977 const char *kernel_filename, const char *kernel_cmdline, 977 const char *kernel_filename, const char *kernel_cmdline,
978 const char *initrd_filename, const char *cpu_model) 978 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, @@ -982,7 +982,7 @@ static void vger_init(ram_addr_t RAM_size, int vga_ram_size,
982 } 982 }
983 983
984 /* SPARCstation LX hardware initialisation */ 984 /* SPARCstation LX hardware initialisation */
985 -static void ss_lx_init(ram_addr_t RAM_size, int vga_ram_size, 985 +static void ss_lx_init(ram_addr_t RAM_size,
986 const char *boot_device, 986 const char *boot_device,
987 const char *kernel_filename, const char *kernel_cmdline, 987 const char *kernel_filename, const char *kernel_cmdline,
988 const char *initrd_filename, const char *cpu_model) 988 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, @@ -992,7 +992,7 @@ static void ss_lx_init(ram_addr_t RAM_size, int vga_ram_size,
992 } 992 }
993 993
994 /* SPARCstation 4 hardware initialisation */ 994 /* SPARCstation 4 hardware initialisation */
995 -static void ss4_init(ram_addr_t RAM_size, int vga_ram_size, 995 +static void ss4_init(ram_addr_t RAM_size,
996 const char *boot_device, 996 const char *boot_device,
997 const char *kernel_filename, const char *kernel_cmdline, 997 const char *kernel_filename, const char *kernel_cmdline,
998 const char *initrd_filename, const char *cpu_model) 998 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, @@ -1002,7 +1002,7 @@ static void ss4_init(ram_addr_t RAM_size, int vga_ram_size,
1002 } 1002 }
1003 1003
1004 /* SPARCClassic hardware initialisation */ 1004 /* SPARCClassic hardware initialisation */
1005 -static void scls_init(ram_addr_t RAM_size, int vga_ram_size, 1005 +static void scls_init(ram_addr_t RAM_size,
1006 const char *boot_device, 1006 const char *boot_device,
1007 const char *kernel_filename, const char *kernel_cmdline, 1007 const char *kernel_filename, const char *kernel_cmdline,
1008 const char *initrd_filename, const char *cpu_model) 1008 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, @@ -1012,7 +1012,7 @@ static void scls_init(ram_addr_t RAM_size, int vga_ram_size,
1012 } 1012 }
1013 1013
1014 /* SPARCbook hardware initialisation */ 1014 /* SPARCbook hardware initialisation */
1015 -static void sbook_init(ram_addr_t RAM_size, int vga_ram_size, 1015 +static void sbook_init(ram_addr_t RAM_size,
1016 const char *boot_device, 1016 const char *boot_device,
1017 const char *kernel_filename, const char *kernel_cmdline, 1017 const char *kernel_filename, const char *kernel_cmdline,
1018 const char *initrd_filename, const char *cpu_model) 1018 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, @@ -1313,7 +1313,7 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size,
1313 } 1313 }
1314 1314
1315 /* SPARCserver 1000 hardware initialisation */ 1315 /* SPARCserver 1000 hardware initialisation */
1316 -static void ss1000_init(ram_addr_t RAM_size, int vga_ram_size, 1316 +static void ss1000_init(ram_addr_t RAM_size,
1317 const char *boot_device, 1317 const char *boot_device,
1318 const char *kernel_filename, const char *kernel_cmdline, 1318 const char *kernel_filename, const char *kernel_cmdline,
1319 const char *initrd_filename, const char *cpu_model) 1319 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, @@ -1323,7 +1323,7 @@ static void ss1000_init(ram_addr_t RAM_size, int vga_ram_size,
1323 } 1323 }
1324 1324
1325 /* SPARCcenter 2000 hardware initialisation */ 1325 /* SPARCcenter 2000 hardware initialisation */
1326 -static void ss2000_init(ram_addr_t RAM_size, int vga_ram_size, 1326 +static void ss2000_init(ram_addr_t RAM_size,
1327 const char *boot_device, 1327 const char *boot_device,
1328 const char *kernel_filename, const char *kernel_cmdline, 1328 const char *kernel_filename, const char *kernel_cmdline,
1329 const char *initrd_filename, const char *cpu_model) 1329 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, @@ -1539,7 +1539,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
1539 } 1539 }
1540 1540
1541 /* SPARCstation 2 hardware initialisation */ 1541 /* SPARCstation 2 hardware initialisation */
1542 -static void ss2_init(ram_addr_t RAM_size, int vga_ram_size, 1542 +static void ss2_init(ram_addr_t RAM_size,
1543 const char *boot_device, 1543 const char *boot_device,
1544 const char *kernel_filename, const char *kernel_cmdline, 1544 const char *kernel_filename, const char *kernel_cmdline,
1545 const char *initrd_filename, const char *cpu_model) 1545 const char *initrd_filename, const char *cpu_model)
hw/sun4u.c
@@ -326,7 +326,7 @@ pci_ebus_init(PCIBus *bus, int devfn) @@ -326,7 +326,7 @@ pci_ebus_init(PCIBus *bus, int devfn)
326 ebus_mmio_mapfunc); 326 ebus_mmio_mapfunc);
327 } 327 }
328 328
329 -static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, 329 +static void sun4uv_init(ram_addr_t RAM_size,
330 const char *boot_devices, 330 const char *boot_devices,
331 const char *kernel_filename, const char *kernel_cmdline, 331 const char *kernel_filename, const char *kernel_cmdline,
332 const char *initrd_filename, const char *cpu_model, 332 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, @@ -447,7 +447,7 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size,
447 pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, NULL, &pci_bus2, 447 pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, NULL, &pci_bus2,
448 &pci_bus3); 448 &pci_bus3);
449 isa_mem_base = VGA_BASE; 449 isa_mem_base = VGA_BASE;
450 - pci_vga_init(pci_bus, vga_ram_size, 0, 0); 450 + pci_vga_init(pci_bus, 0, 0);
451 451
452 // XXX Should be pci_bus3 452 // XXX Should be pci_bus3
453 pci_ebus_init(pci_bus, -1); 453 pci_ebus_init(pci_bus, -1);
@@ -560,32 +560,32 @@ static const struct hwdef hwdefs[] = { @@ -560,32 +560,32 @@ static const struct hwdef hwdefs[] = {
560 }; 560 };
561 561
562 /* Sun4u hardware initialisation */ 562 /* Sun4u hardware initialisation */
563 -static void sun4u_init(ram_addr_t RAM_size, int vga_ram_size, 563 +static void sun4u_init(ram_addr_t RAM_size,
564 const char *boot_devices, 564 const char *boot_devices,
565 const char *kernel_filename, const char *kernel_cmdline, 565 const char *kernel_filename, const char *kernel_cmdline,
566 const char *initrd_filename, const char *cpu_model) 566 const char *initrd_filename, const char *cpu_model)
567 { 567 {
568 - sun4uv_init(RAM_size, vga_ram_size, boot_devices, kernel_filename, 568 + sun4uv_init(RAM_size, boot_devices, kernel_filename,
569 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[0]); 569 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[0]);
570 } 570 }
571 571
572 /* Sun4v hardware initialisation */ 572 /* Sun4v hardware initialisation */
573 -static void sun4v_init(ram_addr_t RAM_size, int vga_ram_size, 573 +static void sun4v_init(ram_addr_t RAM_size,
574 const char *boot_devices, 574 const char *boot_devices,
575 const char *kernel_filename, const char *kernel_cmdline, 575 const char *kernel_filename, const char *kernel_cmdline,
576 const char *initrd_filename, const char *cpu_model) 576 const char *initrd_filename, const char *cpu_model)
577 { 577 {
578 - sun4uv_init(RAM_size, vga_ram_size, boot_devices, kernel_filename, 578 + sun4uv_init(RAM_size, boot_devices, kernel_filename,
579 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[1]); 579 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[1]);
580 } 580 }
581 581
582 /* Niagara hardware initialisation */ 582 /* Niagara hardware initialisation */
583 -static void niagara_init(ram_addr_t RAM_size, int vga_ram_size, 583 +static void niagara_init(ram_addr_t RAM_size,
584 const char *boot_devices, 584 const char *boot_devices,
585 const char *kernel_filename, const char *kernel_cmdline, 585 const char *kernel_filename, const char *kernel_cmdline,
586 const char *initrd_filename, const char *cpu_model) 586 const char *initrd_filename, const char *cpu_model)
587 { 587 {
588 - sun4uv_init(RAM_size, vga_ram_size, boot_devices, kernel_filename, 588 + sun4uv_init(RAM_size, boot_devices, kernel_filename,
589 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[2]); 589 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[2]);
590 } 590 }
591 591
hw/tosa.c
@@ -196,7 +196,7 @@ static struct arm_boot_info tosa_binfo = { @@ -196,7 +196,7 @@ static struct arm_boot_info tosa_binfo = {
196 .ram_size = 0x04000000, 196 .ram_size = 0x04000000,
197 }; 197 };
198 198
199 -static void tosa_init(ram_addr_t ram_size, int vga_ram_size, 199 +static void tosa_init(ram_addr_t ram_size,
200 const char *boot_device, 200 const char *boot_device,
201 const char *kernel_filename, const char *kernel_cmdline, 201 const char *kernel_filename, const char *kernel_cmdline,
202 const char *initrd_filename, const char *cpu_model) 202 const char *initrd_filename, const char *cpu_model)
hw/versatilepb.c
@@ -153,7 +153,7 @@ static qemu_irq *vpb_sic_init(uint32_t base, qemu_irq *parent, int irq) @@ -153,7 +153,7 @@ static qemu_irq *vpb_sic_init(uint32_t base, qemu_irq *parent, int irq)
153 153
154 static struct arm_boot_info versatile_binfo; 154 static struct arm_boot_info versatile_binfo;
155 155
156 -static void versatile_init(ram_addr_t ram_size, int vga_ram_size, 156 +static void versatile_init(ram_addr_t ram_size,
157 const char *boot_device, 157 const char *boot_device,
158 const char *kernel_filename, const char *kernel_cmdline, 158 const char *kernel_filename, const char *kernel_cmdline,
159 const char *initrd_filename, const char *cpu_model, 159 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, @@ -289,23 +289,23 @@ static void versatile_init(ram_addr_t ram_size, int vga_ram_size,
289 arm_load_kernel(env, &versatile_binfo); 289 arm_load_kernel(env, &versatile_binfo);
290 } 290 }
291 291
292 -static void vpb_init(ram_addr_t ram_size, int vga_ram_size, 292 +static void vpb_init(ram_addr_t ram_size,
293 const char *boot_device, 293 const char *boot_device,
294 const char *kernel_filename, const char *kernel_cmdline, 294 const char *kernel_filename, const char *kernel_cmdline,
295 const char *initrd_filename, const char *cpu_model) 295 const char *initrd_filename, const char *cpu_model)
296 { 296 {
297 - versatile_init(ram_size, vga_ram_size, 297 + versatile_init(ram_size,
298 boot_device, 298 boot_device,
299 kernel_filename, kernel_cmdline, 299 kernel_filename, kernel_cmdline,
300 initrd_filename, cpu_model, 0x183); 300 initrd_filename, cpu_model, 0x183);
301 } 301 }
302 302
303 -static void vab_init(ram_addr_t ram_size, int vga_ram_size, 303 +static void vab_init(ram_addr_t ram_size,
304 const char *boot_device, 304 const char *boot_device,
305 const char *kernel_filename, const char *kernel_cmdline, 305 const char *kernel_filename, const char *kernel_cmdline,
306 const char *initrd_filename, const char *cpu_model) 306 const char *initrd_filename, const char *cpu_model)
307 { 307 {
308 - versatile_init(ram_size, vga_ram_size, 308 + versatile_init(ram_size,
309 boot_device, 309 boot_device,
310 kernel_filename, kernel_cmdline, 310 kernel_filename, kernel_cmdline,
311 initrd_filename, cpu_model, 0x25e); 311 initrd_filename, cpu_model, 0x25e);
hw/vga.c
@@ -2428,13 +2428,13 @@ static void vga_mm_init(VGAState *s, target_phys_addr_t vram_base, @@ -2428,13 +2428,13 @@ static void vga_mm_init(VGAState *s, target_phys_addr_t vram_base,
2428 qemu_register_coalesced_mmio(vram_base + 0x000a0000, 0x20000); 2428 qemu_register_coalesced_mmio(vram_base + 0x000a0000, 0x20000);
2429 } 2429 }
2430 2430
2431 -int isa_vga_init(int vga_ram_size) 2431 +int isa_vga_init(void)
2432 { 2432 {
2433 VGAState *s; 2433 VGAState *s;
2434 2434
2435 s = qemu_mallocz(sizeof(VGAState)); 2435 s = qemu_mallocz(sizeof(VGAState));
2436 2436
2437 - vga_common_init(s, vga_ram_size); 2437 + vga_common_init(s, VGA_RAM_SIZE);
2438 vga_init(s); 2438 vga_init(s);
2439 2439
2440 s->ds = graphic_console_init(s->update, s->invalidate, 2440 s->ds = graphic_console_init(s->update, s->invalidate,
@@ -2443,19 +2443,19 @@ int isa_vga_init(int vga_ram_size) @@ -2443,19 +2443,19 @@ int isa_vga_init(int vga_ram_size)
2443 #ifdef CONFIG_BOCHS_VBE 2443 #ifdef CONFIG_BOCHS_VBE
2444 /* XXX: use optimized standard vga accesses */ 2444 /* XXX: use optimized standard vga accesses */
2445 cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS, 2445 cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
2446 - vga_ram_size, s->vram_offset); 2446 + VGA_RAM_SIZE, s->vram_offset);
2447 #endif 2447 #endif
2448 return 0; 2448 return 0;
2449 } 2449 }
2450 2450
2451 -int isa_vga_mm_init(int vga_ram_size, target_phys_addr_t vram_base, 2451 +int isa_vga_mm_init(target_phys_addr_t vram_base,
2452 target_phys_addr_t ctrl_base, int it_shift) 2452 target_phys_addr_t ctrl_base, int it_shift)
2453 { 2453 {
2454 VGAState *s; 2454 VGAState *s;
2455 2455
2456 s = qemu_mallocz(sizeof(VGAState)); 2456 s = qemu_mallocz(sizeof(VGAState));
2457 2457
2458 - vga_common_init(s, vga_ram_size); 2458 + vga_common_init(s, VGA_RAM_SIZE);
2459 vga_mm_init(s, vram_base, ctrl_base, it_shift); 2459 vga_mm_init(s, vram_base, ctrl_base, it_shift);
2460 2460
2461 s->ds = graphic_console_init(s->update, s->invalidate, 2461 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, @@ -2464,7 +2464,7 @@ int isa_vga_mm_init(int vga_ram_size, target_phys_addr_t vram_base,
2464 #ifdef CONFIG_BOCHS_VBE 2464 #ifdef CONFIG_BOCHS_VBE
2465 /* XXX: use optimized standard vga accesses */ 2465 /* XXX: use optimized standard vga accesses */
2466 cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS, 2466 cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
2467 - vga_ram_size, s->vram_offset); 2467 + VGA_RAM_SIZE, s->vram_offset);
2468 #endif 2468 #endif
2469 return 0; 2469 return 0;
2470 } 2470 }
@@ -2480,7 +2480,7 @@ static void pci_vga_write_config(PCIDevice *d, @@ -2480,7 +2480,7 @@ static void pci_vga_write_config(PCIDevice *d,
2480 s->map_addr = 0; 2480 s->map_addr = 0;
2481 } 2481 }
2482 2482
2483 -int pci_vga_init(PCIBus *bus, int vga_ram_size, 2483 +int pci_vga_init(PCIBus *bus,
2484 unsigned long vga_bios_offset, int vga_bios_size) 2484 unsigned long vga_bios_offset, int vga_bios_size)
2485 { 2485 {
2486 PCIVGAState *d; 2486 PCIVGAState *d;
@@ -2494,7 +2494,7 @@ int pci_vga_init(PCIBus *bus, int vga_ram_size, @@ -2494,7 +2494,7 @@ int pci_vga_init(PCIBus *bus, int vga_ram_size,
2494 return -1; 2494 return -1;
2495 s = &d->vga_state; 2495 s = &d->vga_state;
2496 2496
2497 - vga_common_init(s, vga_ram_size); 2497 + vga_common_init(s, VGA_RAM_SIZE);
2498 vga_init(s); 2498 vga_init(s);
2499 2499
2500 s->ds = graphic_console_init(s->update, s->invalidate, 2500 s->ds = graphic_console_init(s->update, s->invalidate,
@@ -2509,8 +2509,8 @@ int pci_vga_init(PCIBus *bus, int vga_ram_size, @@ -2509,8 +2509,8 @@ int pci_vga_init(PCIBus *bus, int vga_ram_size,
2509 pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA); 2509 pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA);
2510 pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type 2510 pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type
2511 2511
2512 - /* XXX: vga_ram_size must be a power of two */  
2513 - pci_register_io_region(&d->dev, 0, vga_ram_size, 2512 + /* XXX: VGA_RAM_SIZE must be a power of two */
  2513 + pci_register_io_region(&d->dev, 0, VGA_RAM_SIZE,
2514 PCI_ADDRESS_SPACE_MEM_PREFETCH, vga_map); 2514 PCI_ADDRESS_SPACE_MEM_PREFETCH, vga_map);
2515 if (vga_bios_size != 0) { 2515 if (vga_bios_size != 0) {
2516 unsigned int bios_total_size; 2516 unsigned int bios_total_size;
hw/vga_int.h
@@ -215,3 +215,6 @@ void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1, @@ -215,3 +215,6 @@ void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1,
215 215
216 extern const uint8_t sr_mask[8]; 216 extern const uint8_t sr_mask[8];
217 extern const uint8_t gr_mask[16]; 217 extern const uint8_t gr_mask[16];
  218 +
  219 +#define VGA_RAM_SIZE (8192 * 1024)
  220 +
hw/vmware_vga.c
@@ -1210,7 +1210,7 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num, @@ -1210,7 +1210,7 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num,
1210 iomemtype); 1210 iomemtype);
1211 } 1211 }
1212 1212
1213 -void pci_vmsvga_init(PCIBus *bus, int vga_ram_size) 1213 +void pci_vmsvga_init(PCIBus *bus)
1214 { 1214 {
1215 struct pci_vmsvga_state_s *s; 1215 struct pci_vmsvga_state_s *s;
1216 1216
@@ -1233,10 +1233,10 @@ void pci_vmsvga_init(PCIBus *bus, int vga_ram_size) @@ -1233,10 +1233,10 @@ void pci_vmsvga_init(PCIBus *bus, int vga_ram_size)
1233 1233
1234 pci_register_io_region(&s->card, 0, 0x10, 1234 pci_register_io_region(&s->card, 0, 0x10,
1235 PCI_ADDRESS_SPACE_IO, pci_vmsvga_map_ioport); 1235 PCI_ADDRESS_SPACE_IO, pci_vmsvga_map_ioport);
1236 - pci_register_io_region(&s->card, 1, vga_ram_size, 1236 + pci_register_io_region(&s->card, 1, VGA_RAM_SIZE,
1237 PCI_ADDRESS_SPACE_MEM_PREFETCH, pci_vmsvga_map_mem); 1237 PCI_ADDRESS_SPACE_MEM_PREFETCH, pci_vmsvga_map_mem);
1238 1238
1239 - vmsvga_init(&s->chip, vga_ram_size); 1239 + vmsvga_init(&s->chip, VGA_RAM_SIZE);
1240 1240
1241 register_savevm("vmware_vga", 0, 0, pci_vmsvga_save, pci_vmsvga_load, s); 1241 register_savevm("vmware_vga", 0, 0, pci_vmsvga_save, pci_vmsvga_load, s);
1242 } 1242 }
@@ -199,7 +199,6 @@ static IOPortWriteFunc *ioport_write_table[3][MAX_IOPORTS]; @@ -199,7 +199,6 @@ static IOPortWriteFunc *ioport_write_table[3][MAX_IOPORTS];
199 to store the VM snapshots */ 199 to store the VM snapshots */
200 DriveInfo drives_table[MAX_DRIVES+1]; 200 DriveInfo drives_table[MAX_DRIVES+1];
201 int nb_drives; 201 int nb_drives;
202 -static int vga_ram_size;  
203 enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB; 202 enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
204 static DisplayState *display_state; 203 static DisplayState *display_state;
205 int nographic; 204 int nographic;
@@ -4875,7 +4874,6 @@ int main(int argc, char **argv, char **envp) @@ -4875,7 +4874,6 @@ int main(int argc, char **argv, char **envp)
4875 cpu_model = NULL; 4874 cpu_model = NULL;
4876 initrd_filename = NULL; 4875 initrd_filename = NULL;
4877 ram_size = 0; 4876 ram_size = 0;
4878 - vga_ram_size = VGA_RAM_SIZE;  
4879 snapshot = 0; 4877 snapshot = 0;
4880 nographic = 0; 4878 nographic = 0;
4881 curses = 0; 4879 curses = 0;
@@ -5898,7 +5896,7 @@ int main(int argc, char **argv, char **envp) @@ -5898,7 +5896,7 @@ int main(int argc, char **argv, char **envp)
5898 } 5896 }
5899 } 5897 }
5900 5898
5901 - machine->init(ram_size, vga_ram_size, boot_devices, 5899 + machine->init(ram_size, boot_devices,
5902 kernel_filename, kernel_cmdline, initrd_filename, cpu_model); 5900 kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
5903 5901
5904 5902