]> git.proxmox.com Git - qemu.git/blobdiff - vl.c
use ram allocation functions
[qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index 1757036c0529ae6b148903e10f339bbba9138b0b..a510df786f878a79ff4baffef69dbffef0b1fb9a 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -125,7 +125,6 @@ BlockDriverState *bs_table[MAX_DISKS + 1], *fd_table[MAX_FD];
 /* point to the block driver where the snapshots are managed */
 BlockDriverState *bs_snapshots;
 int vga_ram_size;
-int bios_size;
 static DisplayState display_state;
 int nographic;
 const char* keyboard_layout = NULL;
@@ -6564,7 +6563,6 @@ int main(int argc, char **argv)
         hd_filename[i] = NULL;
     ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
     vga_ram_size = VGA_RAM_SIZE;
-    bios_size = BIOS_SIZE;
 #ifdef CONFIG_GDBSTUB
     use_gdbstub = 0;
     gdbstub_port = DEFAULT_GDBSTUB_PORT;
@@ -7078,16 +7076,7 @@ int main(int argc, char **argv)
 #endif
 
     /* init the memory */
-    phys_ram_size = ram_size + vga_ram_size + bios_size;
-
-    for (i = 0; i < nb_option_roms; i++) {
-       int ret = get_image_size(option_rom[i]);
-       if (ret == -1) {
-           fprintf(stderr, "Could not load option rom '%s'\n", option_rom[i]);
-           exit(1);
-       }
-       phys_ram_size += ret;
-    }
+    phys_ram_size = ram_size + vga_ram_size + MAX_BIOS_SIZE;
 
     phys_ram_base = qemu_vmalloc(phys_ram_size);
     if (!phys_ram_base) {