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 27  
28 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 31 const char *boot_device,
32 32 const char *kernel_filename, const char *kernel_cmdline,
33 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 251 }
252 252  
253 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 255 const char *boot_device,
256 256 const char *kernel_filename, const char *kernel_cmdline,
257 257 const char *initrd_filename, const char *cpu_model)
... ...
hw/boards.h
... ... @@ -3,7 +3,7 @@
3 3 #ifndef HW_BOARDS_H
4 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 7 const char *boot_device,
8 8 const char *kernel_filename,
9 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 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 3244 CirrusVGAState *s;
3245 3245  
3246 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 3249 cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);
3250 3250 s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
3251 3251 s->vga.screen_dump, s->vga.text_update,
... ... @@ -3301,7 +3301,7 @@ static void pci_cirrus_write_config(PCIDevice *d,
3301 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 3306 PCICirrusVGAState *d;
3307 3307 uint8_t *pci_conf;
... ... @@ -3323,7 +3323,7 @@ void pci_cirrus_vga_init(PCIBus *bus, int vga_ram_size)
3323 3323  
3324 3324 /* setup VGA */
3325 3325 s = &d->cirrus_vga;
3326   - vga_common_init(&s->vga, vga_ram_size);
  3326 + vga_common_init(&s->vga, VGA_RAM_SIZE);
3327 3327 cirrus_init_common(s, device_id, 1);
3328 3328  
3329 3329 s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
... ...
hw/dummy_m68k.c
... ... @@ -14,7 +14,7 @@
14 14  
15 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 18 const char *boot_device,
19 19 const char *kernel_filename, const char *kernel_cmdline,
20 20 const char *initrd_filename, const char *cpu_model)
... ...
hw/etraxfs.c
... ... @@ -46,7 +46,7 @@ static void main_cpu_reset(void *opaque)
46 46 }
47 47  
48 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 50 const char *boot_device,
51 51 const char *kernel_filename, const char *kernel_cmdline,
52 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 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 588 target_phys_addr_t ctrl_base, int it_shift,
589 589 qemu_irq irq)
590 590 {
... ... @@ -593,9 +593,9 @@ int g364fb_mm_init(int vram_size, target_phys_addr_t vram_base,
593 593  
594 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 598 s->vram = qemu_get_ram_ptr(s->vram_offset);
598   - s->vram_size = vram_size;
599 599 s->irq = irq;
600 600  
601 601 qemu_register_reset(g364fb_reset, s);
... ...
hw/gumstix.c
... ... @@ -41,7 +41,7 @@
41 41  
42 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 45 const char *boot_device,
46 46 const char *kernel_filename, const char *kernel_cmdline,
47 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 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 79 const char *boot_device,
80 80 const char *kernel_filename, const char *kernel_cmdline,
81 81 const char *initrd_filename, const char *cpu_model)
... ...
hw/integratorcp.c
... ... @@ -449,7 +449,7 @@ static struct arm_boot_info integrator_binfo = {
449 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 453 const char *boot_device,
454 454 const char *kernel_filename, const char *kernel_cmdline,
455 455 const char *initrd_filename, const char *cpu_model)
... ...
hw/mainstone.c
... ... @@ -68,7 +68,7 @@ static struct arm_boot_info mainstone_binfo = {
68 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 72 const char *kernel_filename,
73 73 const char *kernel_cmdline, const char *initrd_filename,
74 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 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 130 const char *boot_device,
131 131 const char *kernel_filename, const char *kernel_cmdline,
132 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 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 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 197 const char *boot_device,
198 198 const char *kernel_filename, const char *kernel_cmdline,
199 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 10 void ds1225y_set_protection(void *opaque, int protection);
11 11  
12 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 14 target_phys_addr_t ctrl_base, int it_shift,
15 15 qemu_irq irq);
16 16  
... ...
hw/mips_jazz.c
... ... @@ -119,7 +119,7 @@ static void audio_init(qemu_irq *pic)
119 119 #define MAGNUM_BIOS_SIZE (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
120 120  
121 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 123 const char *cpu_model,
124 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 198 /* Video card */
199 199 switch (jazz_model) {
200 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 202 break;
203 203 case JAZZ_PICA61:
204   - isa_vga_mm_init(vga_ram_size, 0x40000000, 0x60000000, 0);
  204 + isa_vga_mm_init(0x40000000, 0x60000000, 0);
205 205 break;
206 206 default:
207 207 break;
... ... @@ -282,21 +282,21 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size,
282 282 }
283 283  
284 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 286 const char *boot_device,
287 287 const char *kernel_filename, const char *kernel_cmdline,
288 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 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 295 const char *boot_device,
296 296 const char *kernel_filename, const char *kernel_cmdline,
297 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 302 QEMUMachine mips_magnum_machine = {
... ...
hw/mips_malta.c
... ... @@ -758,7 +758,7 @@ static void main_cpu_reset(void *opaque)
758 758 }
759 759  
760 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 762 const char *boot_device,
763 763 const char *kernel_filename, const char *kernel_cmdline,
764 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 942  
943 943 /* Optional PCI video card */
944 944 if (cirrus_vga_enabled) {
945   - pci_cirrus_vga_init(pci_bus, vga_ram_size);
  945 + pci_cirrus_vga_init(pci_bus);
946 946 } else if (vmsvga_enabled) {
947   - pci_vmsvga_init(pci_bus, vga_ram_size);
  947 + pci_vmsvga_init(pci_bus);
948 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 107 }
108 108  
109 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 111 const char *boot_device,
112 112 const char *kernel_filename, const char *kernel_cmdline,
113 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 147  
148 148 static const int sector_len = 32 * 1024;
149 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 151 const char *boot_device,
152 152 const char *kernel_filename, const char *kernel_cmdline,
153 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 254 }
255 255 }
256 256  
257   - isa_vga_init(vga_ram_size);
  257 + isa_vga_init();
258 258  
259 259 if (nd_table[0].vlan)
260 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 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 1516 const char *boot_device,
1517 1517 const char *kernel_filename, const char *kernel_cmdline,
1518 1518 const char *initrd_filename, const char *cpu_model)
... ...
hw/nseries.c
... ... @@ -1382,7 +1382,7 @@ static struct arm_boot_info n810_binfo = {
1382 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 1386 const char *boot_device,
1387 1387 const char *kernel_filename, const char *kernel_cmdline,
1388 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 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 1396 const char *boot_device,
1397 1397 const char *kernel_filename, const char *kernel_cmdline,
1398 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 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 119 const char *boot_device,
120 120 const char *kernel_filename, const char *kernel_cmdline,
121 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 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 209 const char *boot_device,
210 210 const char *kernel_filename, const char *kernel_cmdline,
211 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 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 218 const char *boot_device,
219 219 const char *kernel_filename, const char *kernel_cmdline,
220 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 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 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 197 const char *boot_device,
198 198 const char *kernel_filename, const char *kernel_cmdline,
199 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 836 }
837 837  
838 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 840 const char *boot_device,
841 841 const char *kernel_filename, const char *kernel_cmdline,
842 842 const char *initrd_filename,
... ... @@ -999,20 +999,20 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
999 999  
1000 1000 if (cirrus_vga_enabled) {
1001 1001 if (pci_enabled) {
1002   - pci_cirrus_vga_init(pci_bus, vga_ram_size);
  1002 + pci_cirrus_vga_init(pci_bus);
1003 1003 } else {
1004   - isa_cirrus_vga_init(vga_ram_size);
  1004 + isa_cirrus_vga_init();
1005 1005 }
1006 1006 } else if (vmsvga_enabled) {
1007 1007 if (pci_enabled)
1008   - pci_vmsvga_init(pci_bus, vga_ram_size);
  1008 + pci_vmsvga_init(pci_bus);
1009 1009 else
1010 1010 fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
1011 1011 } else if (std_vga_enabled) {
1012 1012 if (pci_enabled) {
1013   - pci_vga_init(pci_bus, vga_ram_size, 0, 0);
  1013 + pci_vga_init(pci_bus, 0, 0);
1014 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 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 1166 const char *boot_device,
1167 1167 const char *kernel_filename,
1168 1168 const char *kernel_cmdline,
1169 1169 const char *initrd_filename,
1170 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 1173 kernel_filename, kernel_cmdline,
1174 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 1178 const char *boot_device,
1179 1179 const char *kernel_filename,
1180 1180 const char *kernel_cmdline,
1181 1181 const char *initrd_filename,
1182 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 1185 kernel_filename, kernel_cmdline,
1186 1186 initrd_filename, 0, cpu_model);
1187 1187 }
... ...
... ... @@ -138,21 +138,15 @@ enum vga_retrace_method {
138 138  
139 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 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 145 target_phys_addr_t ctrl_base, int it_shift);
152 146  
153 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 151 /* ide.c */
158 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 223 void *lsi_scsi_init(PCIBus *bus, int devfn);
224 224  
225 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 228 /* usb-uhci.c */
229 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 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 173 const char *boot_device,
174 174 const char *kernel_filename,
175 175 const char *kernel_cmdline,
... ... @@ -487,7 +487,7 @@ static void taihu_cpld_init (uint32_t base)
487 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 491 const char *boot_device,
492 492 const char *kernel_filename,
493 493 const char *kernel_cmdline,
... ...
hw/ppc440_bamboo.c
... ... @@ -84,7 +84,7 @@ out:
84 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 88 const char *boot_device,
89 89 const char *kernel_filename,
90 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 85 }
86 86  
87 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 89 const char *boot_device,
90 90 const char *kernel_filename,
91 91 const char *kernel_cmdline,
... ... @@ -284,8 +284,7 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size,
284 284 pic = openpic_init(NULL, &pic_mem_index, smp_cpus, openpic_irqs, NULL);
285 285 pci_bus = pci_pmac_init(pic);
286 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 289 /* XXX: suppress that */
291 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 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 118 const char *boot_device,
119 119 const char *kernel_filename,
120 120 const char *kernel_cmdline,
... ... @@ -298,8 +298,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
298 298 }
299 299 pic = heathrow_pic_init(&pic_mem_index, 1, heathrow_irqs);
300 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 303 escc_mem_index = escc_init(0x80013000, pic[0x0f], pic[0x10], serial_hds[0],
305 304 serial_hds[1], ESCC_CLOCK, 4);
... ...
hw/ppc_prep.c
... ... @@ -530,7 +530,7 @@ static CPUReadMemoryFunc *PPC_prep_io_read[] = {
530 530 #define NVRAM_SIZE 0x2000
531 531  
532 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 534 const char *boot_device,
535 535 const char *kernel_filename,
536 536 const char *kernel_cmdline,
... ... @@ -656,7 +656,7 @@ static void ppc_prep_init (ram_addr_t ram_size, int vga_ram_size,
656 656 cpu_register_physical_memory(0x80000000, 0x00800000, PPC_io_memory);
657 657  
658 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 660 // openpic = openpic_init(0x00000000, 0xF0000000, 1);
661 661 // pit = pit_init(0x40, i8259[0]);
662 662 rtc_init(0x70, i8259[8], 2000);
... ...
hw/ppce500_mpc8544ds.c
... ... @@ -151,7 +151,7 @@ out:
151 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 155 const char *boot_device,
156 156 const char *kernel_filename,
157 157 const char *kernel_cmdline,
... ...
hw/r2d.c
... ... @@ -193,7 +193,7 @@ static int r2d_pci_map_irq(PCIDevice *d, int irq_num)
193 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 197 const char *boot_device,
198 198 const char *kernel_filename, const char *kernel_cmdline,
199 199 const char *initrd_filename, const char *cpu_model)
... ...
hw/realview.c
... ... @@ -24,7 +24,7 @@ static struct arm_boot_info realview_binfo = {
24 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 28 const char *boot_device,
29 29 const char *kernel_filename, const char *kernel_cmdline,
30 30 const char *initrd_filename, const char *cpu_model)
... ...
hw/shix.c
... ... @@ -46,7 +46,7 @@ void pic_info(Monitor *mon)
46 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 50 const char *boot_device,
51 51 const char *kernel_filename, const char *kernel_cmdline,
52 52 const char *initrd_filename, const char *cpu_model)
... ...
hw/spitz.c
... ... @@ -903,7 +903,7 @@ static struct arm_boot_info spitz_binfo = {
903 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 907 const char *kernel_filename,
908 908 const char *kernel_cmdline, const char *initrd_filename,
909 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 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 963 const char *boot_device,
964 964 const char *kernel_filename, const char *kernel_cmdline,
965 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 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 972 const char *boot_device,
973 973 const char *kernel_filename, const char *kernel_cmdline,
974 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 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 981 const char *boot_device,
982 982 const char *kernel_filename, const char *kernel_cmdline,
983 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 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 990 const char *boot_device,
991 991 const char *kernel_filename, const char *kernel_cmdline,
992 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 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 1373 }
1374 1374  
1375 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 1377 const char *boot_device,
1378 1378 const char *kernel_filename, const char *kernel_cmdline,
1379 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 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 1385 const char *boot_device,
1386 1386 const char *kernel_filename, const char *kernel_cmdline,
1387 1387 const char *initrd_filename, const char *cpu_model)
... ...
hw/sun4m.c
... ... @@ -931,7 +931,7 @@ static const struct sun4m_hwdef sun4m_hwdefs[] = {
931 931 };
932 932  
933 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 935 const char *boot_device,
936 936 const char *kernel_filename, const char *kernel_cmdline,
937 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 941 }
942 942  
943 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 945 const char *boot_device,
946 946 const char *kernel_filename, const char *kernel_cmdline,
947 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 951 }
952 952  
953 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 955 const char *boot_device,
956 956 const char *kernel_filename,
957 957 const char *kernel_cmdline,
... ... @@ -962,7 +962,7 @@ static void ss600mp_init(ram_addr_t RAM_size, int vga_ram_size,
962 962 }
963 963  
964 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 966 const char *boot_device,
967 967 const char *kernel_filename, const char *kernel_cmdline,
968 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 972 }
973 973  
974 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 976 const char *boot_device,
977 977 const char *kernel_filename, const char *kernel_cmdline,
978 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 982 }
983 983  
984 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 986 const char *boot_device,
987 987 const char *kernel_filename, const char *kernel_cmdline,
988 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 992 }
993 993  
994 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 996 const char *boot_device,
997 997 const char *kernel_filename, const char *kernel_cmdline,
998 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 1002 }
1003 1003  
1004 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 1006 const char *boot_device,
1007 1007 const char *kernel_filename, const char *kernel_cmdline,
1008 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 1012 }
1013 1013  
1014 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 1016 const char *boot_device,
1017 1017 const char *kernel_filename, const char *kernel_cmdline,
1018 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 1313 }
1314 1314  
1315 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 1317 const char *boot_device,
1318 1318 const char *kernel_filename, const char *kernel_cmdline,
1319 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 1323 }
1324 1324  
1325 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 1327 const char *boot_device,
1328 1328 const char *kernel_filename, const char *kernel_cmdline,
1329 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 1539 }
1540 1540  
1541 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 1543 const char *boot_device,
1544 1544 const char *kernel_filename, const char *kernel_cmdline,
1545 1545 const char *initrd_filename, const char *cpu_model)
... ...
hw/sun4u.c
... ... @@ -326,7 +326,7 @@ pci_ebus_init(PCIBus *bus, int devfn)
326 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 330 const char *boot_devices,
331 331 const char *kernel_filename, const char *kernel_cmdline,
332 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 447 pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, NULL, &pci_bus2,
448 448 &pci_bus3);
449 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 452 // XXX Should be pci_bus3
453 453 pci_ebus_init(pci_bus, -1);
... ... @@ -560,32 +560,32 @@ static const struct hwdef hwdefs[] = {
560 560 };
561 561  
562 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 564 const char *boot_devices,
565 565 const char *kernel_filename, const char *kernel_cmdline,
566 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 569 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[0]);
570 570 }
571 571  
572 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 574 const char *boot_devices,
575 575 const char *kernel_filename, const char *kernel_cmdline,
576 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 579 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[1]);
580 580 }
581 581  
582 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 584 const char *boot_devices,
585 585 const char *kernel_filename, const char *kernel_cmdline,
586 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 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 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 200 const char *boot_device,
201 201 const char *kernel_filename, const char *kernel_cmdline,
202 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 153  
154 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 157 const char *boot_device,
158 158 const char *kernel_filename, const char *kernel_cmdline,
159 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 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 293 const char *boot_device,
294 294 const char *kernel_filename, const char *kernel_cmdline,
295 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 298 boot_device,
299 299 kernel_filename, kernel_cmdline,
300 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 304 const char *boot_device,
305 305 const char *kernel_filename, const char *kernel_cmdline,
306 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 309 boot_device,
310 310 kernel_filename, kernel_cmdline,
311 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 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 2433 VGAState *s;
2434 2434  
2435 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 2438 vga_init(s);
2439 2439  
2440 2440 s->ds = graphic_console_init(s->update, s->invalidate,
... ... @@ -2443,19 +2443,19 @@ int isa_vga_init(int vga_ram_size)
2443 2443 #ifdef CONFIG_BOCHS_VBE
2444 2444 /* XXX: use optimized standard vga accesses */
2445 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 2447 #endif
2448 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 2452 target_phys_addr_t ctrl_base, int it_shift)
2453 2453 {
2454 2454 VGAState *s;
2455 2455  
2456 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 2459 vga_mm_init(s, vram_base, ctrl_base, it_shift);
2460 2460  
2461 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 2464 #ifdef CONFIG_BOCHS_VBE
2465 2465 /* XXX: use optimized standard vga accesses */
2466 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 2468 #endif
2469 2469 return 0;
2470 2470 }
... ... @@ -2480,7 +2480,7 @@ static void pci_vga_write_config(PCIDevice *d,
2480 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 2484 unsigned long vga_bios_offset, int vga_bios_size)
2485 2485 {
2486 2486 PCIVGAState *d;
... ... @@ -2494,7 +2494,7 @@ int pci_vga_init(PCIBus *bus, int vga_ram_size,
2494 2494 return -1;
2495 2495 s = &d->vga_state;
2496 2496  
2497   - vga_common_init(s, vga_ram_size);
  2497 + vga_common_init(s, VGA_RAM_SIZE);
2498 2498 vga_init(s);
2499 2499  
2500 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 2509 pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA);
2510 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 2514 PCI_ADDRESS_SPACE_MEM_PREFETCH, vga_map);
2515 2515 if (vga_bios_size != 0) {
2516 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 215  
216 216 extern const uint8_t sr_mask[8];
217 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 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 1215 struct pci_vmsvga_state_s *s;
1216 1216  
... ... @@ -1233,10 +1233,10 @@ void pci_vmsvga_init(PCIBus *bus, int vga_ram_size)
1233 1233  
1234 1234 pci_register_io_region(&s->card, 0, 0x10,
1235 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 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 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 199 to store the VM snapshots */
200 200 DriveInfo drives_table[MAX_DRIVES+1];
201 201 int nb_drives;
202   -static int vga_ram_size;
203 202 enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
204 203 static DisplayState *display_state;
205 204 int nographic;
... ... @@ -4875,7 +4874,6 @@ int main(int argc, char **argv, char **envp)
4875 4874 cpu_model = NULL;
4876 4875 initrd_filename = NULL;
4877 4876 ram_size = 0;
4878   - vga_ram_size = VGA_RAM_SIZE;
4879 4877 snapshot = 0;
4880 4878 nographic = 0;
4881 4879 curses = 0;
... ... @@ -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 5900 kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
5903 5901  
5904 5902  
... ...