diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index df999c50ca97401c1675cd2edd6ac93c3bfc98b4..7ae555db79781a7182793cd3732bdc00926c4e00 100644 --- a/hw/ppc_oldworld.c +++ b/hw/ppc_oldworld.c @@ -159,6 +159,13 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, } /* allocate RAM */ + if (ram_size > (2047 << 20)) { + fprintf(stderr, + "qemu: Too much memory for this machine: %d MB, maximum 2047 MB\n", + ((unsigned int)ram_size / (1 << 20))); + exit(1); + } + ram_offset = qemu_ram_alloc(ram_size); cpu_register_physical_memory(0, ram_size, ram_offset);