[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6419] mips: limit RAM size to 256MB on malta and qemu boar
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [6419] mips: limit RAM size to 256MB on malta and qemu boards |
Date: |
Sat, 24 Jan 2009 15:07:25 +0000 |
Revision: 6419
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6419
Author: aurel32
Date: 2009-01-24 15:07:25 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
mips: limit RAM size to 256MB on malta and qemu boards
This avoid crash when a bigger RAM size is requested (the devices are
mapped at 0x01000000).
Signed-off-by: Aurelien Jarno <address@hidden>
Modified Paths:
--------------
trunk/hw/mips_malta.c
trunk/hw/mips_r4k.c
Modified: trunk/hw/mips_malta.c
===================================================================
--- trunk/hw/mips_malta.c 2009-01-24 15:07:09 UTC (rev 6418)
+++ trunk/hw/mips_malta.c 2009-01-24 15:07:25 UTC (rev 6419)
@@ -802,6 +802,12 @@
qemu_register_reset(main_cpu_reset, env);
/* allocate RAM */
+ if (ram_size > (256 << 20)) {
+ fprintf(stderr,
+ "qemu: Too much memory for this machine: %d MB, maximum 256
MB\n",
+ ((unsigned int)ram_size / (1 << 20)));
+ exit(1);
+ }
cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
/* Map the bios at two physical locations, as on the real board. */
Modified: trunk/hw/mips_r4k.c
===================================================================
--- trunk/hw/mips_r4k.c 2009-01-24 15:07:09 UTC (rev 6418)
+++ trunk/hw/mips_r4k.c 2009-01-24 15:07:25 UTC (rev 6419)
@@ -178,6 +178,12 @@
qemu_register_reset(main_cpu_reset, env);
/* allocate RAM */
+ if (ram_size > (256 << 20)) {
+ fprintf(stderr,
+ "qemu: Too much memory for this machine: %d MB, maximum 256
MB\n",
+ ((unsigned int)ram_size / (1 << 20)));
+ exit(1);
+ }
cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
if (!mips_qemu_iomemtype) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6419] mips: limit RAM size to 256MB on malta and qemu boards,
Aurelien Jarno <=