From patchwork Mon Mar 28 13:44:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 88602 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D8977B6F8C for ; Tue, 29 Mar 2011 00:47:09 +1100 (EST) Received: from localhost ([127.0.0.1]:46314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4Cm6-0001vD-6N for incoming@patchwork.ozlabs.org; Mon, 28 Mar 2011 09:46:30 -0400 Received: from [140.186.70.92] (port=53954 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4CkE-0001jr-Ab for qemu-devel@nongnu.org; Mon, 28 Mar 2011 09:44:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4CkB-0004zo-Vw for qemu-devel@nongnu.org; Mon, 28 Mar 2011 09:44:33 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:45547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4CkB-0004zJ-J9 for qemu-devel@nongnu.org; Mon, 28 Mar 2011 09:44:31 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Q4Ck2-0005zR-J6; Mon, 28 Mar 2011 14:44:22 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 28 Mar 2011 14:44:19 +0100 Message-Id: <1301319862-22998-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1301319862-22998-1-git-send-email-peter.maydell@linaro.org> References: <1301319862-22998-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: Blue Swirl , patches@linaro.org Subject: [Qemu-devel] [PATCH v2 2/5] hw: Add maximum RAM specifications for ARM devboard models X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Specify the maximum memory permitted for the various ARM devboard models (integratorcp, realview-eb, realview-eb-mpcore, realview-pb-a8, realview-pbx-a9, versatilepb, versatileab). This means we now handle attempts to specify too much RAM gracefully rather than causing the guest to crash in an obscure fashion. Signed-off-by: Peter Maydell --- hw/integratorcp.c | 1 + hw/realview.c | 11 +++++++++++ hw/versatilepb.c | 5 +++++ 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index b049940..ccc44db 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -516,6 +516,7 @@ static QEMUMachine integratorcp_machine = { .name = "integratorcp", .desc = "ARM Integrator/CP (ARM926EJ-S)", .init = integratorcp_init, + .max_ram = 256 * 1024 * 1024, .is_default = 1, }; diff --git a/hw/realview.c b/hw/realview.c index a67861e..a158ade 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -432,6 +432,7 @@ static QEMUMachine realview_eb_machine = { .desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)", .init = realview_eb_init, .use_scsi = 1, + .max_ram = 256 * 1024 * 1024, }; static QEMUMachine realview_eb_mpcore_machine = { @@ -440,12 +441,18 @@ static QEMUMachine realview_eb_mpcore_machine = { .init = realview_eb_mpcore_init, .use_scsi = 1, .max_cpus = 4, + .max_ram = 256 * 1024 * 1024, }; static QEMUMachine realview_pb_a8_machine = { .name = "realview-pb-a8", .desc = "ARM RealView Platform Baseboard for Cortex-A8", .init = realview_pb_a8_init, + /* The PB-A8 has 512MB; qemu also supports an extra PBX-A9-like + * 512MB although strictly speaking that area of the address + * space is 'reserved' on the PB-A8. + */ + .max_ram = 1024 * 1024 * 1024, }; static QEMUMachine realview_pbx_a9_machine = { @@ -454,6 +461,10 @@ static QEMUMachine realview_pbx_a9_machine = { .init = realview_pbx_a9_init, .use_scsi = 1, .max_cpus = 4, + /* Realview PBX has 1GB of RAM (512MB on the motherboard + * and another 512MB on the daughterboard) + */ + .max_ram = 1024 * 1024 * 1024, }; static void realview_machine_init(void) diff --git a/hw/versatilepb.c b/hw/versatilepb.c index 9f1bfcf..aeddd28 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -329,6 +329,10 @@ static QEMUMachine versatilepb_machine = { .desc = "ARM Versatile/PB (ARM926EJ-S)", .init = vpb_init, .use_scsi = 1, + /* Hardware allows for up to 512MB expansion memory in two + * non-contiguous sections, but we only support up to 256MB + */ + .max_ram = 256 * 1024 * 1024, }; static QEMUMachine versatileab_machine = { @@ -336,6 +340,7 @@ static QEMUMachine versatileab_machine = { .desc = "ARM Versatile/AB (ARM926EJ-S)", .init = vab_init, .use_scsi = 1, + .max_ram = 256 * 1024 * 1024, }; static void versatile_machine_init(void)