From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byyAi-0003v6-6P for qemu-devel@nongnu.org; Tue, 25 Oct 2016 05:37:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byyAh-0003z0-2m for qemu-devel@nongnu.org; Tue, 25 Oct 2016 05:37:28 -0400 From: Jean-Christophe Dubois Date: Tue, 25 Oct 2016 11:37:11 +0200 Message-Id: <20161025093711.17407-1-jcd@tribudubois.net> Subject: [Qemu-devel] [PATCH] Versatile memory should not exceed 256MB. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-arm@nongnu.org, peter.maydell@linaro.org, qemu-devel@nongnu.org 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 --- 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