Revision 7fb4fdcf vl.c
b/vl.c | ||
---|---|---|
8277 | 8277 |
machine = first_machine; |
8278 | 8278 |
cpu_model = NULL; |
8279 | 8279 |
initrd_filename = NULL; |
8280 |
ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
|
|
8280 |
ram_size = -1;
|
|
8281 | 8281 |
vga_ram_size = VGA_RAM_SIZE; |
8282 | 8282 |
#ifdef CONFIG_GDBSTUB |
8283 | 8283 |
use_gdbstub = 0; |
... | ... | |
8963 | 8963 |
#endif |
8964 | 8964 |
|
8965 | 8965 |
/* init the memory */ |
8966 |
phys_ram_size = ram_size + vga_ram_size + MAX_BIOS_SIZE; |
|
8966 |
phys_ram_size = machine->ram_require & ~RAMSIZE_FIXED; |
|
8967 |
|
|
8968 |
if (machine->ram_require & RAMSIZE_FIXED) { |
|
8969 |
if (ram_size > 0) { |
|
8970 |
if (ram_size < phys_ram_size) { |
|
8971 |
fprintf(stderr, "Machine `%s' requires %i bytes of memory\n", |
|
8972 |
machine->name, phys_ram_size); |
|
8973 |
exit(-1); |
|
8974 |
} |
|
8975 |
|
|
8976 |
phys_ram_size = ram_size; |
|
8977 |
} else |
|
8978 |
ram_size = phys_ram_size; |
|
8979 |
} else { |
|
8980 |
if (ram_size < 0) |
|
8981 |
ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; |
|
8982 |
|
|
8983 |
phys_ram_size += ram_size; |
|
8984 |
} |
|
8967 | 8985 |
|
8968 | 8986 |
phys_ram_base = qemu_vmalloc(phys_ram_size); |
8969 | 8987 |
if (!phys_ram_base) { |
Also available in: Unified diff