From nobody Fri Dec 19 17:10:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1583427159; cv=none; d=zohomail.com; s=zohoarc; b=b/OPrJWmzHz/scdrwEve9S2FAEyRtnYAJZLONxu1w8+igyURtxHH+e0N7Ol9tOnoYEJFalX+AlbK2yr107fUIojjwpTVyq6VaZSMqL562ysXmDPvqI3rw9ZOaNTxsTs/YIFlnC7THSJLKpcnAiPf0CiCbRKv0it1bpI39FK8hKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583427159; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+/QONm9mCjYrTI58R499ADlTKWCo0qILa5h+DSFHsjY=; b=XNdR3nGKC4Vpi7d6/k3jMKTii3ktzADPLqDmuQWZgCfKgUjUyFd+FcacCKPHpDrD62L/fJLsaA3bT6ZkxUlW9LV04BJcbMDPbaqjadxZGGdgdLuLz2xxcVyGH64krrEvRzwbnpp9MjWcxzAiGZ/irnTnn30N/eRuIa4ojE19JQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583427159660949.7919112921622; Thu, 5 Mar 2020 08:52:39 -0800 (PST) Received: from localhost ([::1]:52950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9tji-0004gu-GX for importer@patchew.org; Thu, 05 Mar 2020 11:52:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59434) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9tPL-0003mu-Rz for qemu-devel@nongnu.org; Thu, 05 Mar 2020 11:31:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9tPK-0002kY-BJ for qemu-devel@nongnu.org; Thu, 05 Mar 2020 11:31:35 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:53126) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9tPK-0002jx-5J for qemu-devel@nongnu.org; Thu, 05 Mar 2020 11:31:34 -0500 Received: by mail-wm1-x32e.google.com with SMTP id p9so7065739wmc.2 for ; Thu, 05 Mar 2020 08:31:34 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id w22sm10310729wmk.34.2020.03.05.08.31.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 08:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+/QONm9mCjYrTI58R499ADlTKWCo0qILa5h+DSFHsjY=; b=wZJAZ4vqdfbQhPQG6XzKi/ENSFRlc15CuB3vgz+eO999AlEUyvARG79aNATz3044Z8 /MJYe8vXUi8ZxyUdRvpuFbW5mcVwDRuMuw/4NDrpgwVPowCHRfzPWrnXEkDDAVJX558I w0YPFCLnHpAhlsow9uBXIZi4wlOcejCOBGv5i+ZdyxaRWkDNz5vvNys6CQFBSpowLaKQ 0fGUkt4buzYgZbNOxwgzmBYbemwh7uVHWzyfFuZpiKvsMuKe0twTYJGtsE5DcjemJdQW gGuHP7vrKX0PAwel8950WJYnd+zmBKWaHlwIXZ3GnSCU+P09ZyQkyn3R2nwybEOkXXWj ZNcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+/QONm9mCjYrTI58R499ADlTKWCo0qILa5h+DSFHsjY=; b=dSVn/ODNtA6fo1N7SiesUuDC8+d7ir20kIkz3VjQE43NqE2tqEsY259+pCh+X7b6pJ aLin5LnIaLEsGQ5yE3gUvngbN9C1Fqajsklrr8R93x9sySrm4leMXCddIi5jJASf8oe6 pepx9owCnP1Q6yrVe8Tf5BPTF2ZrXFI8Pcpt0mTyzpbhwvQWgThU4fM2NYVn9Ld0fC2q MRrWaz5wu9FxOoVFID0UZlGmHMkR6MI2ordiWNq6Tyo1myZJwxCwm439D0uTEfUwNBcV N2FHYpNgwfnGyuG2Scg7FTItPKG+ZLgq+ImLs2WWGt633IAHmDyXxqMjHrEbgOJ8iLyy fH1A== X-Gm-Message-State: ANhLgQ1oVBtphM6U2Rjoq/18zZr8fEuTfiA1F9lqJmvdiFokPuqgxILT Goj2sWzc+meNRvb0Eq0Ue8plyrQRgUJB5Q== X-Google-Smtp-Source: ADFU+vvU61SHWOjAXsG3W+q9wvScGyUTkOTbjEoxYZgZfxZ7Om+Aw+i6zH6xLIUzMaHQwuQNhVg1Yg== X-Received: by 2002:a1c:9a45:: with SMTP id c66mr6240139wme.115.1583425892951; Thu, 05 Mar 2020 08:31:32 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 28/37] hw/arm/cubieboard: restrict allowed CPU type to ARM Cortex-A8 Date: Thu, 5 Mar 2020 16:30:51 +0000 Message-Id: <20200305163100.22912-29-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200305163100.22912-1-peter.maydell@linaro.org> References: <20200305163100.22912-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: 2a00:1450:4864:20::32e 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Niek Linnenbank The Cubieboard has an ARM Cortex-A8. Instead of simply ignoring a bogus -cpu option provided by the user, give them an error message so they know their command line is wrong. Signed-off-by: Niek Linnenbank Message-id: 20200227220149.6845-3-nieklinnenbank@gmail.com Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell [PMM: tweaked commit message] Signed-off-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 0195925c73d..010375f0a8d 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -30,9 +30,17 @@ static struct arm_boot_info cubieboard_binfo =3D { =20 static void cubieboard_init(MachineState *machine) { - AwA10State *a10 =3D AW_A10(object_new(TYPE_AW_A10)); + AwA10State *a10; Error *err =3D NULL; =20 + /* Only allow Cortex-A8 for this board */ + if (strcmp(machine->cpu_type, ARM_CPU_TYPE_NAME("cortex-a8")) !=3D 0) { + error_report("This board can only be used with cortex-a8 CPU"); + exit(1); + } + + a10 =3D AW_A10(object_new(TYPE_AW_A10)); + object_property_set_int(OBJECT(&a10->emac), 1, "phy-addr", &err); if (err !=3D NULL) { error_reportf_err(err, "Couldn't set phy address: "); --=20 2.20.1