From nobody Wed Apr 24 21:03:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1566028194; cv=none; d=zoho.com; s=zohoarc; b=SHy4ciEzeh5n8By6/nzCRHaUQIwuhwob5yCfsM6vZwTwpYiOhGBOmuXITHhX3Q1ltt+NQQZCa0UErxfuWqBL7JfU+2O3RY/AMNQWcS5XGHAk7vpYJ4snZ8gW5Np3avuM8KweV3MJyWCGTHPDsq9qLoL+pMRXkyh1FSBHJIaRGug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566028194; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=gZjlYFO6fwDuoUZHhW/5ttyyQTiHUBNPqjV599Gzz2A=; b=ITWkRsPgxejpQQgIlTgKp7BdCkdu3IZZeTle/uFJESX8wgQB/mAzmA68kE3CUfFEO/jIRBKnky65GQN9/X5UE1oIyhg+U0wsQjB+P3RVjyCQv5gmJnB793SHH/P/pgqvBv/4wo3tWkj2PfDyXbom1qTzfgXsH9q2e9TDws97b2s= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566028194172515.9490932295139; Sat, 17 Aug 2019 00:49:54 -0700 (PDT) Received: from localhost ([::1]:34750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hytTC-0006yc-Cy for importer@patchew.org; Sat, 17 Aug 2019 03:49:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41182) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hytGe-000747-CE for qemu-devel@nongnu.org; Sat, 17 Aug 2019 03:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hytGd-0006kj-AC for qemu-devel@nongnu.org; Sat, 17 Aug 2019 03:36:52 -0400 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:47825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hytGd-0006Zt-1w for qemu-devel@nongnu.org; Sat, 17 Aug 2019 03:36:51 -0400 Received: from h61-195-96-97.vps.ablenet.jp (h61-195-96-97.ablenetvps.ne.jp [61.195.96.97]) (Authenticated sender: PQ4Y-STU) by mail03.asahi-net.or.jp (Postfix) with ESMTPA id 634A557298; Sat, 17 Aug 2019 16:36:40 +0900 (JST) Received: from yo-satoh-debian.localdomain (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by h61-195-96-97.vps.ablenet.jp (Postfix) with ESMTPSA id 1CF3D240085; Sat, 17 Aug 2019 16:36:40 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Sat, 17 Aug 2019 16:36:25 +0900 Message-Id: <20190817073628.94473-20-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190817073628.94473-1-ysato@users.sourceforge.jp> References: <20190817073628.94473-1-ysato@users.sourceforge.jp> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.224.55.15 Subject: [Qemu-devel] [PATCH v23 19/22] hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core 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@linaro.org, richard.henderson@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato , imammedo@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 While the VIRT machine can use different microcontrollers, the RX62N microcontroller is tied to the RX62N CPU core. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Yoshinori Sato --- hw/rx/rx-virt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/rx/rx-virt.c b/hw/rx/rx-virt.c index 4cfe2e3123..9676a5e7bf 100644 --- a/hw/rx/rx-virt.c +++ b/hw/rx/rx-virt.c @@ -17,6 +17,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "qapi/error.h" #include "qemu-common.h" #include "cpu.h" @@ -56,6 +57,7 @@ static void rx_load_image(RXCPU *cpu, const char *filenam= e, =20 static void rxvirt_init(MachineState *machine) { + MachineClass *mc =3D MACHINE_GET_CLASS(machine); RX62NState *s =3D g_new(RX62NState, 1); MemoryRegion *sysmem =3D get_system_memory(); MemoryRegion *sdram =3D g_new(MemoryRegion, 1); @@ -64,6 +66,12 @@ static void rxvirt_init(MachineState *machine) void *dtb =3D NULL; int dtb_size; =20 + if (strcmp(machine->cpu_type, mc->default_cpu_type) !=3D 0) { + error_report("This board can only be used with CPU %s", + mc->default_cpu_type); + exit(1); + } + /* Allocate memory space */ memory_region_init_ram(sdram, NULL, "sdram", 16 * MiB, &error_fatal); --=20 2.11.0