Skip to contentSkip to conversation

[6283] target-ppc: define max amount of memory for G3 beige

Qemu-devel Aurelien Jarno 1 participant 1 message Jan 13, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6283

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6283
Author:   aurel32
Date:     2009-01-13 19:08:10 +0000 (Tue, 13 Jan 2009)

Log Message:
-----------
target-ppc: define max amount of memory for G3 beige

Modified Paths:
--------------
trunk/hw/ppc_oldworld.c

Modified: trunk/hw/ppc_oldworld.c
===================================================================

hw/ppc_oldworld.c +7 -0
@@ -159,6 +159,13 @@
     }
 
     /* 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);