From patchwork Thu Feb 22 15:22:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 129262 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2139967edc; Thu, 22 Feb 2018 07:28:40 -0800 (PST) X-Google-Smtp-Source: AH8x2246Z9T1zTmcgXMxXaSaOPdwF+wvKu72/feqscWN+3T60lWC3hy7jErmawXu93FXBYNDHYzw X-Received: by 10.13.212.196 with SMTP id w187mr5013292ywd.143.1519313320087; Thu, 22 Feb 2018 07:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519313320; cv=none; d=google.com; s=arc-20160816; b=vWmZYRqIg14O6k+3dxkmWWOwEllmVhPcvUINAfjBN8tL2ohHiQ+EcVDvoJnmMeKls7 gi64ojLPxreymzECZWfd1qPvqvB+gxanE3b7ubT+a67KHLPN5kCEnjfEmcQ5v5xg1hsp rMJK1br4xYLDHL5lj4i06pVdxiBucWNxIqAPXOs+5DFqACfBR73UArqqmin4MhqF+Mpf rigQdZ++s9Hig+fza4RjFL8wN+19tGOflvkToOVeiD0doIN3S9i6isMHm4w7q3pYzh+Y X5+Kndp+UR1vdzp+aPfhoE+3dUZt6vV6edAc0EnPD7Ps0fAqQf001jyp9qKz8ncrfJkd eObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=zQGFBouAS+wrf8FCU+gFCyzT+3HQ+Cz5Q3BffqPGJyk=; b=iRKwWPkqAqPFrQ1z3cP8fAZV/n6lBqZGxQwl/+3iIZJnC5JY69RoNadSd88EjL9tLX ZQ5c15Kg9N7ghcbWFFbA776CrAJ8YS9kYPMgtNWdNas4sdhboS+xx6K5r++8rdXdgQos DsW9giqgkeOz8wukMccEX/5lN+Cde8Q9U+9LsfZrhXFQO0Wgsy8NWgJdOPeYBEXhiouP CEmaLk0o0wRyQu7Q9UlrK1wyMIWrB5+y/bAm0XHzc96GIFezXOywlyWpCKQA1UPpnkI5 Rx+dOZVnEt7CaeylgMdppl8P7MAHghLhWt0lX2FttgvQlL6LcfhoBxgjQum0bExgaZ6p cl0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id l206-v6si46971ybc.689.2018.02.22.07.28.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 22 Feb 2018 07:28:40 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eosnX-0008W1-F4 for patch@linaro.org; Thu, 22 Feb 2018 10:28:39 -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 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Signed-off-by: Peter Maydell --- hw/arm/raspi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) -- 2.16.1 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 = 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 = "Raspberry Pi 3"; + mc->init = raspi3_init; + mc->block_default_type = IF_SD; + mc->no_parallel = 1; + mc->no_floppy = 1; + mc->no_cdrom = 1; + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a53"); + mc->max_cpus = BCM2836_NCPUS; + mc->min_cpus = BCM2836_NCPUS; + mc->default_cpus = BCM2836_NCPUS; + mc->default_ram_size = 1024 * 1024 * 1024; +} +DEFINE_MACHINE("raspi3", raspi3_machine_init) +#endif