qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 054/136] mips/mips_jazz: add max ram size check


From: Paolo Bonzini
Subject: [PULL 054/136] mips/mips_jazz: add max ram size check
Date: Tue, 25 Feb 2020 12:49:44 +0100

From: Igor Mammedov <address@hidden>

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

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daude <address@hidden>
Message-Id: <address@hidden>
---
 hw/mips/mips_jazz.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index 85d49cf..32fbd10 100644
--- a/hw/mips/mips_jazz.c
+++ b/hw/mips/mips_jazz.c
@@ -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;
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]