From patchwork Tue Mar 29 14:08: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: 88800 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 5CDAAB6EE8 for ; Wed, 30 Mar 2011 02:21:22 +1100 (EST) Received: from localhost ([127.0.0.1]:55743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4a0X-0006I4-Lu for incoming@patchwork.ozlabs.org; Tue, 29 Mar 2011 10:34:57 -0400 Received: from [140.186.70.92] (port=53783 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4Zhh-0007Bm-9y for qemu-devel@nongnu.org; Tue, 29 Mar 2011 10:15:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4Zb5-0005LV-PX for qemu-devel@nongnu.org; Tue, 29 Mar 2011 10:08:41 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:55528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4Zb5-0005J0-Fj for qemu-devel@nongnu.org; Tue, 29 Mar 2011 10:08:39 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Q4Zaq-0006OK-Uu; Tue, 29 Mar 2011 15:08:24 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 29 Mar 2011 15:08:19 +0100 Message-Id: <1301407704-24541-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1301407704-24541-1-git-send-email-peter.maydell@linaro.org> References: <1301407704-24541-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 v3 2/7] 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)