From patchwork Thu Feb 6 01:17:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1234067 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rCCx5r18; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48CgYr1zDjz9sRm for ; Thu, 6 Feb 2020 12:18:56 +1100 (AEDT) Received: from localhost ([::1]:59144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izVok-00007i-4w for incoming@patchwork.ozlabs.org; Wed, 05 Feb 2020 20:18:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53399) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izVnw-00007V-G3 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 20:18:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izVnu-0001Cj-0m for qemu-devel@nongnu.org; Wed, 05 Feb 2020 20:18:04 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:43363) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izVnt-00014z-Pn; Wed, 05 Feb 2020 20:18:01 -0500 Received: by mail-wr1-x435.google.com with SMTP id z9so5097032wrs.10; Wed, 05 Feb 2020 17:18:01 -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:mime-version :content-transfer-encoding; bh=z1xR+0C5iuS2wN0NuNjbYnlECeDv4TSFHvruaFSgWQ8=; b=rCCx5r18dNcTT2f6Jbau+M/SsPO+FkV0V3R2FgN1AKZzWzD7RruZRXAnlOAbUfwxoi 3IbD4WoEG6NmV1JrW7yWjYp+tXRlSqAW1jPjZq9x8rerqah3+Rsg8rMu97NBEn0KqUoX BdGFNg0Q872sEGINoX8n3egtPS7f+dikGQO8zPwssILGaMFaSC1JVkCV5AFsCCQ5KpZH EBn+VQcWOzlOjKETMCGMWtzV73lyD1C10lqK+CRQvnzC0L/IhN+h7bagfZzKruicxO+x BOs3jnReB7Um/9jyextxigsmjMAMWkgkYmyEPCWTj8/JplMrfbwRPA+K/x37YuMI/mwY XLmQ== 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 :mime-version:content-transfer-encoding; bh=z1xR+0C5iuS2wN0NuNjbYnlECeDv4TSFHvruaFSgWQ8=; b=ksDKChMD7IfSKi5GBZx67mien/onaUnYw8vdpgClQ4ZC2jiXUKgiFqTKvKHHn7ET4/ 9fGkb38lD9j4UD1ptDzqicynFgopURm243+UTZ6Sd9nZaChHkDrwW1xchEZVHFYZASPP i2Jqr3iyeM5BlbMYINVfKoEcX3eUZetIiTaD5DjfmKsFEONr8VV5x0GD6qh4MHIq2hWq WYkksMJoNxqfOx+ZQqA2tKayR/ViDrp1iCAj/d08ZVRkcoCdVWSSpHGkefAellqnZAtS WmsQM6bQuC1K7/ltcdR1vSqwDh+PVJdsTe/gzT2e4trsy0gYAOT2hvWfr52juRIpfC7S Ol5Q== X-Gm-Message-State: APjAAAVdb5UhZrTjFxWHo+mDGujX/9xKMDDFa4SOIGm0T4IkuqrwE6fw 6aDuiCCLAq0VG8xi67yV4Mo0BheD X-Google-Smtp-Source: APXvYqyJP++MC9R05whn7QRYY/xuy5beAu1NKmegEu4ItiJWObnlq1CLEoPHVXifTrS1+WJZbYC1Gg== X-Received: by 2002:adf:e692:: with SMTP id r18mr305949wrm.413.1580951880165; Wed, 05 Feb 2020 17:18:00 -0800 (PST) Received: from localhost.localdomain (2.red-95-127-156.staticip.rima-tde.net. [95.127.156.2]) by smtp.gmail.com with ESMTPSA id w13sm2053526wru.38.2020.02.05.17.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 17:17:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 00/30] hw/arm/raspi: Dynamically create machines based on the board revision Date: Thu, 6 Feb 2020 02:17:26 +0100 Message-Id: <20200206011756.2413-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joaquin de Andres , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Andrew Baumann , Esteban Bosse , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Hi, These patches simplify adding the raspi0/raspi1/raspi4 boards. Igor has been working in his "refactor main RAM allocation to use hostmem backend" series, and now v4 [1] is almost reviewed. His raspi patch [2] clashes with my work, Since it is easier for him to apply his on top of mine, I am sending these patches first. Only the 4 first patches matter regarding Igor's refactor, to include "Extract the RAM size from the board revision" which should solve the problem he has to fix in [2]. I finally finished the SoC code, so can add the raspi0/1. Avocado tests also include to demostrate the boards work. I will probably move the raspi tests out of boot_linux_console.py, but that is another series. Latest patches NOTFORMERGE are mostly to justify this refactor, like the raspi0 and 1, it is easy to add a new soc/board. However other bcm peripherals patches need to get merged first (on the list but old so I need to rebase/repost them). Please review, at least up to patch 21 (before the tests). Phil. [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg675738.html [2] https://www.mail-archive.com/qemu-devel@nongnu.org/msg675752.html Supersedes: <20200203082619.7426-1-f4bug@amsat.org> https://www.mail-archive.com/qemu-devel@nongnu.org/msg676154.html Philippe Mathieu-Daudé (30): hw/arm/raspi: Use BCM2708 machine type with pre Device Tree kernels hw/arm/raspi: Correct the board descriptions hw/arm/raspi: Extract the version from the board revision hw/arm/raspi: Extract the RAM size from the board revision hw/arm/raspi: Extract the processor type from the board revision hw/arm/raspi: Trivial code movement hw/arm/raspi: Make machines children of abstract RaspiMachineClass hw/arm/raspi: Make board_rev a field of RaspiMachineClass hw/arm/raspi: Let class_init() directly call raspi_machine_init() hw/arm/raspi: Set default RAM size to size encoded in board revision hw/arm/raspi: Extract the board model from the board revision hw/arm/raspi: Use a unique raspi_machine_class_init() method hw/arm/raspi: Extract the cores count from the board revision hw/arm/bcm2836: Restrict BCM283XClass declaration to C source hw/arm/bcm2836: QOM'ify more by adding class_init() to each SoC type hw/arm/bcm2836: Introduce BCM283XClass::core_count hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs hw/arm/bcm2836: Split out common realize() code hw/arm/bcm2836: Introduce the BCM2835 SoC hw/arm/raspi: Add the Raspberry Pi Zero machine hw/arm/raspi: Add the Raspberry Pi B+ machine tests/acceptance/boot_linux_console: Use raspi console model as key tests/acceptance/boot_linux_console: Add raspi version=2 parameter tests/acceptance/boot_linux_console: Test the raspi1 console tests/acceptance/boot_linux_console: Test the raspi0 console python/qemu/machine: Allow to use other serial consoles than default tests/acceptance/boot_linux_console: Test the raspi1 AUX console tests/acceptance: Count Raspberry Pi logos displayed on framebuffer hw/arm/bcm2836: Add the ARMv8 BCM2838 hw/arm/raspi: Add the Raspberry Pi 4 include/hw/arm/bcm2836.h | 16 +- hw/arm/bcm2836.c | 396 +++++++++++++++++++++---- hw/arm/raspi.c | 204 ++++++++++--- python/qemu/machine.py | 10 +- tests/acceptance/boot_linux_console.py | 154 +++++++++- 5 files changed, 645 insertions(+), 135 deletions(-)