From nobody Sun Feb 8 06:00:20 2026 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=1571054994; cv=none; d=zoho.com; s=zohoarc; b=WXf+dkvZc7+xeJoig3gNU8xYLI2HrtMG3RT1Cc+jDBR7lwC7yADggfrCxl2O+MAWDSXzPJ4m0MibaVuGkufuwb4BJACmtSxt6u6xmSpqTXeoGj1zcZI6/QFGWQnRE0iC8gKqXd1IkBaC2FGPyHse8TbxUNGcw8t0JN9QB8JO+wI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571054994; 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; bh=y+3EEHltQVjU+bWx0X7ZJMNNMyd2AtpK698kzZOiINc=; b=iIvAgWHNeWtInoQ3CC3iHayRh8q0ZoI1St4VxRXGnNvw9InxDX7rlX/riGS5pT6dlsKi9GEuH1MbaW/lq+lfHC98BeXzc7tvMPgQX6mvo1F/wL94CETNT1h1hidEahC2NhwXebNC6OeST57bc7AnJtj3pBgkGyLxMimbPSXQfRI= 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 1571054994264185.7031059798395; Mon, 14 Oct 2019 05:09:54 -0700 (PDT) Received: from localhost ([::1]:48476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJzAe-0000gC-VV for importer@patchew.org; Mon, 14 Oct 2019 08:09:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53500) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJyzN-0005Sw-6E for qemu-devel@nongnu.org; Mon, 14 Oct 2019 07:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJyzL-0003ah-Fu for qemu-devel@nongnu.org; Mon, 14 Oct 2019 07:58:13 -0400 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:35694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJyzL-0003V5-5b for qemu-devel@nongnu.org; Mon, 14 Oct 2019 07:58:11 -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 CAEDD75CBC; Mon, 14 Oct 2019 20:58:10 +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 803B324008F; Mon, 14 Oct 2019 20:58:10 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Subject: [PATCH v26 19/21] hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core Date: Mon, 14 Oct 2019 20:57:55 +0900 Message-Id: <20191014115757.51866-20-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191014115757.51866-1-ysato@users.sourceforge.jp> References: <20191014115757.51866-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 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato 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.20.1