mips/mips_jazz: add max ram size check

error out in case user asked for more RAM than board
supports.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Message-Id: <20200219160953.13771-55-imammedo@redhat.com>
This commit is contained in:
Igor Mammedov 2020-02-19 11:09:28 -05:00 committed by Patchew Importer
parent 2a9bded9a3
commit 7c3dd4c6a5
1 changed files with 5 additions and 0 deletions

View File

@ -164,6 +164,11 @@ static void mips_jazz_init(MachineState *machine,
SysBusESPState *sysbus_esp;
ESPState *esp;
if (machine->ram_size > 256 * MiB) {
error_report("RAM size more than 256Mb is not supported");
exit(EXIT_FAILURE);
}
/* init CPUs */
cpu = MIPS_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;