From nobody Wed Apr 16 17:16:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151931327613278.48461062343631; Thu, 22 Feb 2018 07:27:56 -0800 (PST) Received: from localhost ([::1]:38991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eosmp-0008W1-9f for importer@patchew.org; Thu, 22 Feb 2018 10:27:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eosiU-0004gB-20 for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eosiS-0001Z6-Ah for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:26 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:46586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eosiS-0001Ye-0w for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:24 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1eosiR-00020Z-2M for qemu-devel@nongnu.org; Thu, 22 Feb 2018 15:23:23 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 22 Feb 2018 15:22:37 +0000 Message-Id: <20180222152307.7499-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180222152307.7499-1-peter.maydell@linaro.org> References: <20180222152307.7499-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 02/32] raspi: Add "raspi3" machine type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Pekka Enberg This patch adds a "raspi3" machine type, which can now be selected as the machine to run on by users via the "-M" command line option to QEMU. The machine type does *not* ignore memory transaction failures so we likely need to add some dummy devices later when people run something more complicated than what I'm using for testing. Signed-off-by: Pekka Enberg [PMM: added #ifdef TARGET_AARCH64 so we don't provide the 64-bit board in the 32-bit only arm-softmmu build.] Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peter Maydell --- hw/arm/raspi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 93121c56bf..a37881433c 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -187,3 +187,26 @@ static void raspi2_machine_init(MachineClass *mc) mc->ignore_memory_transaction_failures =3D true; }; DEFINE_MACHINE("raspi2", raspi2_machine_init) + +#ifdef TARGET_AARCH64 +static void raspi3_init(MachineState *machine) +{ + raspi_init(machine, 3); +} + +static void raspi3_machine_init(MachineClass *mc) +{ + mc->desc =3D "Raspberry Pi 3"; + mc->init =3D raspi3_init; + mc->block_default_type =3D IF_SD; + mc->no_parallel =3D 1; + mc->no_floppy =3D 1; + mc->no_cdrom =3D 1; + mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a53"); + mc->max_cpus =3D BCM2836_NCPUS; + mc->min_cpus =3D BCM2836_NCPUS; + mc->default_cpus =3D BCM2836_NCPUS; + mc->default_ram_size =3D 1024 * 1024 * 1024; +} +DEFINE_MACHINE("raspi3", raspi3_machine_init) +#endif --=20 2.16.1