From patchwork Thu Feb 27 22:01:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niek Linnenbank X-Patchwork-Id: 1246128 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=gmail.com 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=LCG+xv0L; 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 48T6952jYFz9sPk for ; Fri, 28 Feb 2020 09:02:31 +1100 (AEDT) Received: from localhost ([::1]:39030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7REh-00019X-Tp for incoming@patchwork.ozlabs.org; Thu, 27 Feb 2020 17:02:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44905) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7REG-00018j-CM for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7REF-0003kQ-11 for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:00 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:38887) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7REE-0003jz-IY; Thu, 27 Feb 2020 17:01:58 -0500 Received: by mail-wm1-x344.google.com with SMTP id a9so1106670wmj.3; Thu, 27 Feb 2020 14:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zZS79vliNn3E7I89zlAY0tg2EKwBR1ZC6u6n1nsEkUU=; b=LCG+xv0LPzhtZK/Yv0BWy/bhOzHLYl7LC+6NEIni3/gV1ZbTowfSj8riwYKHqVDLnf RO7hRGDt+PeM/fGE5l/R/tnvMrWAs2fwTFY4S+DZO/GznZKAZGL/AIxnDRBI2LY4Myra /my2IHlvj05hAyF/0fF8P/0+5Fw8QJS9W9U3TWfnqR7d/9F2Qj5myYCtR+cTtJBE9UAa St+tPNtinqHGFPn8Mdx66NFQyphtW2dHaeHrjJwGVTZH68ccpWk4QOy/d30q85X91bhQ ZV46fZSGU+IUpkw+S7hFr1y0o0clHOr1hMX7pOot152EH24sGVWPiouHiyYfkN9Cr6gK PbOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zZS79vliNn3E7I89zlAY0tg2EKwBR1ZC6u6n1nsEkUU=; b=N7sU6RNk/xzxi8IzL4hy4dxInJqiUmD/5iN7Xa3gE2x2vpklV2lfXU+Oe7565WMx3p lOdrrVY+dHQ/apHF/Ueaaf9EsD8k9LPB9v936XHkohD3Lv70OlD2g7olESGE5TT5VkNV ZBTlr+1Qxy5aOTGXtSuu7xVursurufitZjRwohNsp+kLWWuxwRMdcuMkx9bvuTPZLMtq K2HY8lf0sVwNxvHV+CllACJlPr+pQnCTK+N1tm6/Gmtn1wVE2Kqvh5D2yfETuE0WUc9K hYD9DbOT9Xrw73si7Hzs7U9DGfD2PGu9xRkkyDc8pRCL3NFeGZ5pzl2Kfm3FDYMeyIVj sPRQ== X-Gm-Message-State: APjAAAW3WP+nuSJ3xNJtCAwbqLy2RWE0JiZNzpOoCXuUnB8m3hDyYAkM XlpPbZL0Fxg1fLAyYInt+k2nILOK X-Google-Smtp-Source: APXvYqxo7pymiWQ1eGs8PgI1nWqREn23qAtbKU/XFTdg/lLIJJwnp/1S/tnQghZUY+Ot5pYlezbgcQ== X-Received: by 2002:a7b:c392:: with SMTP id s18mr806466wmj.169.1582840916604; Thu, 27 Feb 2020 14:01:56 -0800 (PST) Received: from pavilion.home ([2a02:a456:6be8:1:8edc:d4ff:fe8b:18b7]) by smtp.gmail.com with ESMTPSA id z14sm6447040wrg.76.2020.02.27.14.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 14:01:55 -0800 (PST) From: Niek Linnenbank To: qemu-devel@nongnu.org Subject: [PATCH v1 1/4] hw/arm/cubieboard: use ARM Cortex-A8 as the default CPU in machine definition Date: Thu, 27 Feb 2020 23:01:46 +0100 Message-Id: <20200227220149.6845-2-nieklinnenbank@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200227220149.6845-1-nieklinnenbank@gmail.com> References: <20200227220149.6845-1-nieklinnenbank@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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: b.galvani@gmail.com, peter.maydell@linaro.org, Niek Linnenbank , qemu-arm@nongnu.org, philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The Cubieboard is a singleboard computer with an Allwinner A10 System-on-Chip [1]. As documented in the Allwinner A10 User Manual V1.5 [2], the SoC has an ARM Cortex-A8 processor. Currently the Cubieboard machine definition specifies the ARM Cortex-A9 in its description and as the default CPU. This patch corrects the Cubieboard machine definition to use the ARM Cortex-A8. [1] http://docs.cubieboard.org/products/start#cubieboard1 [2] https://linux-sunxi.org/File:Allwinner_A10_User_manual_V1.5.pdf Signed-off-by: Niek Linnenbank Reviewed-by: Peter Maydell --- hw/arm/cubieboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 089f9a30c1..0195925c73 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -68,8 +68,8 @@ static void cubieboard_init(MachineState *machine) static void cubieboard_machine_init(MachineClass *mc) { - mc->desc = "cubietech cubieboard (Cortex-A9)"; - mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9"); + mc->desc = "cubietech cubieboard (Cortex-A8)"; + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a8"); mc->init = cubieboard_init; mc->block_default_type = IF_IDE; mc->units_per_default_bus = 1; From patchwork Thu Feb 27 22:01:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niek Linnenbank X-Patchwork-Id: 1246129 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=gmail.com 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=SRxNIcER; 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 48T6953ZXqz9sR4 for ; Fri, 28 Feb 2020 09:02:32 +1100 (AEDT) Received: from localhost ([::1]:39036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7REk-0001CC-Ee for incoming@patchwork.ozlabs.org; Thu, 27 Feb 2020 17:02:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44928) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7REI-00018x-Qn for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7REG-0003ko-BZ for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:02 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:33450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7REF-0003k6-6T; Thu, 27 Feb 2020 17:01:59 -0500 Received: by mail-wm1-x342.google.com with SMTP id m10so7951003wmc.0; Thu, 27 Feb 2020 14:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w9GsmGdCeDlovWnkHL5RzV48eH16cTZY3b9rQUOLBwU=; b=SRxNIcERCgH0LrWsW75smZfdKOtL2lX4ZYJvUBFMq3CNSr7xgFGS6nqUbtW2O4hYm/ GncxLJVBpL1pkTQqU8Ms6BDHydE8t70w8rrXNv1KtRFDQCohKpTMKSjzCUYAu0SfI+aH xk/S51ufxF4CRMEUoJbPBdP69eXGP3oTEbPcrZsONtJHn6ClbTp5OUoR9/2h4kMwOts2 xEQAKmUfdydcOc1qEAPI0WPwSOnZEJaPu60E/gn3f5/YSBYKM4fmB0qnonn9nn3b+Im4 eN8enXMq/aPB8uhPknZPvPsVZ6ASYRbNL+L/mCztm/FKJmFrbvPw08D+uIwc4w+NNFwc nIcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w9GsmGdCeDlovWnkHL5RzV48eH16cTZY3b9rQUOLBwU=; b=mFTOPQCLexVe7IuRwzCC/Q00XlfyCH2NV1vSQVDL7gDJXaNEGdNJqD5US6RYvi/nYS Ls0Lk3TNuAFqRB4gbDoFkYf4NrMb0gnYdU04JPskb7aMHoF4Au8BAyB57TpV+Tt9bKNb M3RoecPaRtaIGYn1zu0uLoOELlzaR6pXjwCXsV7es0Aj1DjJafgbdVY9PeVJl4snOth9 tRtyjgUlvj9hZD36JErmiONi4zDH5zuKYU6X9KXBu63kVkcmPFaVGlcL5mOsHoz7Ev/w lRUitjPfQzlpPKUWnKg3GWqIgUJUyhqqfipbSvl1aZJ0Fl9FDFpLjBvZ9GqSM/S7b97/ Sj5g== X-Gm-Message-State: APjAAAXGUBGzpkm26xIJ8YQu9xHctiKxOILqfvrn3LPzkAYObj9X8sB0 GtY9/xz8seTTh5ustZroPrLvcrFA X-Google-Smtp-Source: APXvYqzkvXHwyxUWqTLeAnLIDGswJN6riHMajmUwLdI9F+97U8m/u2kjKFWg7oxvywN8fFgFurq0UA== X-Received: by 2002:a05:600c:2107:: with SMTP id u7mr884038wml.54.1582840917494; Thu, 27 Feb 2020 14:01:57 -0800 (PST) Received: from pavilion.home ([2a02:a456:6be8:1:8edc:d4ff:fe8b:18b7]) by smtp.gmail.com with ESMTPSA id z14sm6447040wrg.76.2020.02.27.14.01.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 14:01:56 -0800 (PST) From: Niek Linnenbank To: qemu-devel@nongnu.org Subject: [PATCH v1 2/4] hw/arm/cubieboard: restrict allowed CPU type to ARM Cortex-A8 Date: Thu, 27 Feb 2020 23:01:47 +0100 Message-Id: <20200227220149.6845-3-nieklinnenbank@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200227220149.6845-1-nieklinnenbank@gmail.com> References: <20200227220149.6845-1-nieklinnenbank@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 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: b.galvani@gmail.com, peter.maydell@linaro.org, Niek Linnenbank , qemu-arm@nongnu.org, philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The Cubieboard has an ARM Cortex-A8. Prevent changing the CPU to a different type which could break user programs. Signed-off-by: Niek Linnenbank Reviewed-by: Peter Maydell --- hw/arm/cubieboard.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 0195925c73..010375f0a8 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -30,9 +30,17 @@ static struct arm_boot_info cubieboard_binfo = { static void cubieboard_init(MachineState *machine) { - AwA10State *a10 = AW_A10(object_new(TYPE_AW_A10)); + AwA10State *a10; Error *err = NULL; + /* Only allow Cortex-A8 for this board */ + if (strcmp(machine->cpu_type, ARM_CPU_TYPE_NAME("cortex-a8")) != 0) { + error_report("This board can only be used with cortex-a8 CPU"); + exit(1); + } + + a10 = AW_A10(object_new(TYPE_AW_A10)); + object_property_set_int(OBJECT(&a10->emac), 1, "phy-addr", &err); if (err != NULL) { error_reportf_err(err, "Couldn't set phy address: "); From patchwork Thu Feb 27 22:01:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niek Linnenbank X-Patchwork-Id: 1246130 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=gmail.com 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=Od/fXhru; 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 48T6Bg5GGPz9sR4 for ; Fri, 28 Feb 2020 09:03:55 +1100 (AEDT) Received: from localhost ([::1]:39048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7RG5-0002xr-JS for incoming@patchwork.ozlabs.org; Thu, 27 Feb 2020 17:03:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44977) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7REL-00019M-Bx for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7REK-0003lo-CF for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:05 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:33450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7REI-0003l2-Qa; Thu, 27 Feb 2020 17:02:04 -0500 Received: by mail-wm1-x341.google.com with SMTP id m10so7951060wmc.0; Thu, 27 Feb 2020 14:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X9+GBaHNQ0BV0SNlMsqulSGS5MEkF+1c8Vya4T3i8EM=; b=Od/fXhruoZ+KNDek1dEp3DgjiZ7Jc8Rdwy868UZK4/3W9C7KW4Z0vVChI66+z8xEzv inwgiKQ8GNpwa1xhdTdI+kti2gFArlhqkymHnGoZ2xfKKTkYpv9YmYtQ8NEUkZ/rz9JG 9lUHgkhhuMFmNqq/C0rvzWiQsMYFLIdIFNbin9bbzdy/15o7R4dLP3PV6/2td21KkC6z Pg5z9p9Zb78iQpMNvTWyKlFVUEJ7u0GVriIUgD1z9OK5yVhHSS7jF+LAUyaAI7NGfcM8 f9d2mXgsOx/66upnquK0AADEMZQFcHxriKvs7jsWQZTXlNYtU0Im0O5aDBt3+iVI/mwQ A8hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X9+GBaHNQ0BV0SNlMsqulSGS5MEkF+1c8Vya4T3i8EM=; b=djHcLIDLHqu2zfjykHB/9YgwpvCm8/AvmtjPcEwa2Ef0CUmXFDSp5wiWUVS2cDyvZ+ hFPZujWi+s7jcWmFqVq+q+i7o+Rrtik1/swX9Sddzwbv2GIuc/TeBtebu812peoUDWZA 36IE2C/LEZ3SlzfPQYma2qQAUsS7iQjDS7sPmvPoMlSDkYlmhiyp6nfTunsIuXjQE37F I1wV10+AU8bWo+IQLJkGXLQNCm4IX27u5PQWVqyN1bEz4US3DJztNs839bJTqJcKkOpJ lg+8PjC+B/Pcw2RsEviXdMHOai8WybJmKMKQiE2m4hf4B77cLY+KpuGU9fCDqztfw11s s38A== X-Gm-Message-State: APjAAAWg5lAJJFupRRAfHiqo6tL7l2IxX+KzK90do5QqEzyMGQ5WAcg1 01WobWH0fahTh/nhf12n2IxWpgl9 X-Google-Smtp-Source: APXvYqwe42sb+ZKZGLY26XotBL8q4ddr8tW04GigjZILwequ+7KfPdW0F3YJHoEw8qMLIlSpkl70Jg== X-Received: by 2002:a1c:8197:: with SMTP id c145mr833224wmd.176.1582840918868; Thu, 27 Feb 2020 14:01:58 -0800 (PST) Received: from pavilion.home ([2a02:a456:6be8:1:8edc:d4ff:fe8b:18b7]) by smtp.gmail.com with ESMTPSA id z14sm6447040wrg.76.2020.02.27.14.01.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 14:01:57 -0800 (PST) From: Niek Linnenbank To: qemu-devel@nongnu.org Subject: [PATCH v1 3/4] hw/arm/cubieboard: restrict allowed RAM size to 512MiB and 1GiB Date: Thu, 27 Feb 2020 23:01:48 +0100 Message-Id: <20200227220149.6845-4-nieklinnenbank@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200227220149.6845-1-nieklinnenbank@gmail.com> References: <20200227220149.6845-1-nieklinnenbank@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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: b.galvani@gmail.com, peter.maydell@linaro.org, Niek Linnenbank , qemu-arm@nongnu.org, philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The Cubieboard contains either 512MiB or 1GiB of onboard RAM [1]. Prevent changing RAM to a different size which could break user programs. [1] http://linux-sunxi.org/Cubieboard Signed-off-by: Niek Linnenbank Reviewed-by: Peter Maydell --- hw/arm/cubieboard.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 010375f0a8..6c55d9056f 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -33,6 +33,13 @@ static void cubieboard_init(MachineState *machine) AwA10State *a10; Error *err = NULL; + /* This board has fixed size RAM (512MiB or 1GiB) */ + if (machine->ram_size != 512 * MiB && + machine->ram_size != 1 * GiB) { + error_report("This machine can only be used with 512MiB or 1GiB RAM"); + exit(1); + } + /* Only allow Cortex-A8 for this board */ if (strcmp(machine->cpu_type, ARM_CPU_TYPE_NAME("cortex-a8")) != 0) { error_report("This board can only be used with cortex-a8 CPU"); @@ -78,6 +85,7 @@ static void cubieboard_machine_init(MachineClass *mc) { mc->desc = "cubietech cubieboard (Cortex-A8)"; mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a8"); + mc->default_ram_size = 1 * GiB; mc->init = cubieboard_init; mc->block_default_type = IF_IDE; mc->units_per_default_bus = 1; From patchwork Thu Feb 27 22:01:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niek Linnenbank X-Patchwork-Id: 1246132 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=gmail.com 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=Hyd6ONjy; 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 48T6DB6QXDz9sP7 for ; Fri, 28 Feb 2020 09:05:14 +1100 (AEDT) Received: from localhost ([::1]:39080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7RHM-0004yI-Rz for incoming@patchwork.ozlabs.org; Thu, 27 Feb 2020 17:05:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44972) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7REL-00019K-Ad for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7REK-0003lu-CD for qemu-devel@nongnu.org; Thu, 27 Feb 2020 17:02:05 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:52848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7REI-0003l0-Q7; Thu, 27 Feb 2020 17:02:02 -0500 Received: by mail-wm1-x341.google.com with SMTP id p9so1147073wmc.2; Thu, 27 Feb 2020 14:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ct19YN8D477GfCKm2ge3aSrXHQgydJt2ZJDeu9sZUbE=; b=Hyd6ONjyl4QfpbJ65iDBNOqBwvbPE8A0YWtVVDBsD8MiHmHGeDY46lN9xn33I/Ix+j ST6ly4uqoMEtdlELPgotCGoz42Uidlg79pNHD5s6yJDx6DG4GcC8QIbQhQfpk4T+uxb/ eA57+0DgvgHDCKt7GCtoYONjtiJq7AMKzyQStfQd6UI3uK+hEnEcULAn0e3rIB2U2Ko4 gJGUjdmMk4ySHe/f0rMMpPHmxJtT4LBaZ3VGLZoIzQYnR1C9kCTw0bhteNUnvudmg9d9 vYlVxGAlgyb0YZz+6YaLeojPfNwQG4zxwV/t/Elz0TARc+xw3dk/qNlVWmdL4a0u8Xm0 FYlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ct19YN8D477GfCKm2ge3aSrXHQgydJt2ZJDeu9sZUbE=; b=a1HBAwO8Kjb6HJgpNZ0k6hKBwDV9RgbE+k3RPE1TGtdC7mezMai46FYMveeaxiXqBS GH4W4edbSxXMD6DOan08IYc6FdZ9xJXC5BQES5OM2WlbLhy1KHJo9B26lcnm0VMa3BC7 I8/FSYT4JdbcIG1FnNV3Bocf4WTm+mzpz1JkXV3h+W0jiZqxRfL3iUe8Ec0csgTe8GH+ 1R5DfILsxwU3F83oKeJBQ2mKn7+TPknNZjuW/ozxWjMhyKkMHctTKePXqk8Kwcd7zgFx il+60Ar3LISL4qloZhOAwdxSe/pSB0SDZe9GDFq6/q8olnt71jA5QrOBtaxZFBLabMo7 xHMA== X-Gm-Message-State: APjAAAWSEcpWsIKO/FU5GWSv/SFwnwYMK56/2l4UsyxPMu/7NG1DoIOZ XnOCHNkv6JMc36fiMIQqt0Qregz+ X-Google-Smtp-Source: APXvYqyZ2KIub6aOqVgPdQlXKHH5KQdCqjAlkwYMwCTeLlcMXI6g6aw+pt0bA16koXjV3TWJBkMVLQ== X-Received: by 2002:a7b:cc69:: with SMTP id n9mr856189wmj.163.1582840919861; Thu, 27 Feb 2020 14:01:59 -0800 (PST) Received: from pavilion.home ([2a02:a456:6be8:1:8edc:d4ff:fe8b:18b7]) by smtp.gmail.com with ESMTPSA id z14sm6447040wrg.76.2020.02.27.14.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 14:01:59 -0800 (PST) From: Niek Linnenbank To: qemu-devel@nongnu.org Subject: [PATCH v1 4/4] hw/arm/cubieboard: report error when using unsupported -bios argument Date: Thu, 27 Feb 2020 23:01:49 +0100 Message-Id: <20200227220149.6845-5-nieklinnenbank@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200227220149.6845-1-nieklinnenbank@gmail.com> References: <20200227220149.6845-1-nieklinnenbank@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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: b.galvani@gmail.com, peter.maydell@linaro.org, Niek Linnenbank , qemu-arm@nongnu.org, philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The Cubieboard machine does not support the -bios argument. Report an error when -bios is used and exit immediately. Signed-off-by: Niek Linnenbank Reviewed-by: Peter Maydell --- hw/arm/cubieboard.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 6c55d9056f..871b1beef4 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -19,6 +19,7 @@ #include "exec/address-spaces.h" #include "qapi/error.h" #include "cpu.h" +#include "sysemu/sysemu.h" #include "hw/sysbus.h" #include "hw/boards.h" #include "hw/arm/allwinner-a10.h" @@ -33,6 +34,12 @@ static void cubieboard_init(MachineState *machine) AwA10State *a10; Error *err = NULL; + /* BIOS is not supported by this board */ + if (bios_name) { + error_report("BIOS not supported for this machine"); + exit(1); + } + /* This board has fixed size RAM (512MiB or 1GiB) */ if (machine->ram_size != 512 * MiB && machine->ram_size != 1 * GiB) {