From patchwork Fri Feb 16 07:02:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pekka Enberg X-Patchwork-Id: 874296 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JfMIamXs"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zjPHT5GtQz9t3G for ; Fri, 16 Feb 2018 18:03:16 +1100 (AEDT) Received: from localhost ([::1]:45297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ema38-0003Ri-2C for incoming@patchwork.ozlabs.org; Fri, 16 Feb 2018 02:03:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ema2E-0003QU-I1 for qemu-devel@nongnu.org; Fri, 16 Feb 2018 02:02:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ema2C-0007lJ-Db for qemu-devel@nongnu.org; Fri, 16 Feb 2018 02:02:18 -0500 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:42854) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ema2C-0007ko-6I for qemu-devel@nongnu.org; Fri, 16 Feb 2018 02:02:16 -0500 Received: by mail-lf0-x244.google.com with SMTP id t204so96559lff.9 for ; Thu, 15 Feb 2018 23:02:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=09xzsb++gDC2RMazuMhKUx69oipOdxYr7PztYT45Kek=; b=JfMIamXsz5Rncp4uAfeItUDMS89zGYigdi3OTqUZiUs4PkL8yC1mFhXOhZ4sZYPZM/ puKPvD/UYB+mp7zBLwLLKwFi5M3I3GQRDs24WE7FYTWioc1qUj6Ki+glLKe1lHHVKdJC XDUKZbVQQc+AjfckkOZOYybzh8lFn4EC/m7RUsTxztJZsJPIqM7NPTFInwNZLMmwsOea 60ObWg4TMMdRPbc2brhKzMFoDWfmcWmZwO6BxNDxjUonvn8aoo8a4Z7eYmETqeX7TaC1 VGmMoULRtIZNthLANqckpC3UKaY994Qf6xOm/ROSKpraRgutg0RvFWGQlHfALGIDAIc1 Qqog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=09xzsb++gDC2RMazuMhKUx69oipOdxYr7PztYT45Kek=; b=lrNGL5cH5QNZVPsBsK3+tmw1nSe8Wsa9Mq94s4nFytJn0C8I28o7j/dolYaIwqwJvv bJc7HLD4zjhmaDG211+NK9rpFvRKNYRi1J7ZlsjSWDZZX06IG2GzWOkCGVcySjMH3wSx NSKrRn4SIBVjKGyUuRcJC3yZHxDY+42heKq2LVU6gvKtUkGcoE8JfWfAtEjjXpMVTC1r b955GS3rWG+dxfpI56qmd0cGvmmpKGgrbtpXhMtVtMsA0Zd/UgBhFku1Ymm9iklUony8 FcYUF/i7LyCvw2I36m5P2aKiDTE1CL113vX9kcU6LuxsF/xjJEQ3zlDzawa4fnx0kx00 5dSA== X-Gm-Message-State: APf1xPA+ZzqZrAPaOGPnDcTOB278PL00d3H6f1gTfgLiOZXN1/Vg4lwb SOdoqnILnXVVT74JXRdp63psirEG X-Google-Smtp-Source: AH8x227iP7k54sqhFG0ZFQ2yIsaZHLz4i4xKhoQoJ2qOohpno70C8qjdw+3FrgC6+hr6uXW1FASc/A== X-Received: by 10.46.89.20 with SMTP id n20mr3334009ljb.50.1518764534710; Thu, 15 Feb 2018 23:02:14 -0800 (PST) Received: from localhost.localdomain (81-175-247-183.bb.dnainternet.fi. [81.175.247.183]) by smtp.gmail.com with ESMTPSA id r9sm3365313ljc.18.2018.02.15.23.02.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 23:02:14 -0800 (PST) From: Pekka Enberg To: qemu-devel@nongnu.org Date: Fri, 16 Feb 2018 09:02:01 +0200 Message-Id: <20180216070201.4271-4-penberg@iki.fi> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180216070201.4271-1-penberg@iki.fi> References: <20180216070201.4271-1-penberg@iki.fi> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 Subject: [Qemu-devel] [PATCH v2 3/3] 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: , Cc: peter.maydell@linaro.org, Pekka Enberg Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- hw/arm/raspi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 66fe10e376..ff54f45e3e 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