All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Versatile memory should not exceed 256MB.
@ 2016-10-25  9:37 Jean-Christophe Dubois
  2016-10-25 12:12 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Christophe Dubois @ 2016-10-25  9:37 UTC (permalink / raw)
  To: qemu-arm, peter.maydell, qemu-devel; +Cc: Jean-Christophe Dubois

For now Qemu accpet a memory size greater than 256 MB but it would
crash afterward.

Versatile devices are starting at 256 MB bondary.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---
 hw/arm/versatilepb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 8ae5392..7f11651 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -198,6 +198,14 @@ static void versatile_init(MachineState *machine, int board_id)
     int done_smc = 0;
     DriveInfo *dinfo;
 
+    if (machine->ram_size > 0x10000000) {
+        /* devices are starting at address 0x10000000,
+         * Memory cannot overlap with devices.
+         */ 
+        fprintf(stderr, "Memory size cannot exceed 256MB\n");
+        exit(1);
+    }
+
     if (!machine->cpu_model) {
         machine->cpu_model = "arm926";
     }
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-25 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25  9:37 [Qemu-devel] [PATCH] Versatile memory should not exceed 256MB Jean-Christophe Dubois
2016-10-25 12:12 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.