From nobody Tue Feb 10 17:45:53 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail header.i=@wdc.com; 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=fail(p=none dis=none) header.from=wdc.com ARC-Seal: i=1; a=rsa-sha256; t=1588185921; cv=none; d=zohomail.com; s=zohoarc; b=i5DlvajKEjSojDdubmKmKGHn6IIahXnPmsSGmn/+TZns4nM5mRermqsA3BWfBrK9+aQX7SUzS/uNHobh1Ixzf/g7r+u7Oj1P8l0PyJV+ks9JUQLginU3FwQdXFhEXUW+KOMCBAw9Sc4nRPBn28Mn2rGdtVJemHiBQ81M7UVH9Vs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588185921; 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=+lyPpbjfSt/tnhgD71G9ed8Rl/BG7RiS4qywvh9DYhM=; b=Q5Hm9uvYE+ECZkxfKOQ38I5TT5pIFeCPDz5hu8NM40PNIGapS3ZRCbOUwSftymOgmPlpBtL70T0tfNTQm7oOBCV+dp5ez+BtVXdvMbRlcfrOiqVhABEflD7/u8RzFTkSXIWuLul5XEg25cbRxa10bpjnLi1Dc3YWBBFdcDXT4P4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail header.i=@wdc.com; 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=fail 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 1588185921631658.1607817311499; Wed, 29 Apr 2020 11:45:21 -0700 (PDT) Received: from localhost ([::1]:51974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTrhw-00045u-6Z for importer@patchew.org; Wed, 29 Apr 2020 14:45:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37454) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTraE-0008RT-PN for qemu-devel@nongnu.org; Wed, 29 Apr 2020 14:37:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTraB-0003VH-R8 for qemu-devel@nongnu.org; Wed, 29 Apr 2020 14:37:22 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:2035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jTra5-0003PL-F1; Wed, 29 Apr 2020 14:37:13 -0400 Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 Apr 2020 02:37:06 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 11:27:10 -0700 Received: from cnf007834.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.55.253]) by uls-op-cesaip01.wdc.com with ESMTP; 29 Apr 2020 11:37:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1588185434; x=1619721434; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uth3SOy7J70UXYgMlMkEumsDQFWDBmDIt0wImRmilQQ=; b=UY4GTyPgobkdf/2b5gmBg+q9tLK/Nz5thcHTOmObrWNCZoNAGx/5W7uI srVeR/BxkxoLFfiqalF7XHLBlacF1w2YfNeTklVLSCSN0MUVOCw4ANmhY NPBB3HNTh6hOg16XYjQQ+7xOvgjsU6Nr7gOX/ryC9pde27/JR+ESU7V6g LI4lHqfPtA/lMo6WQJH8gvMjk2WrdvVtW5LnGWT/Got4TUna2MBjN+FaL FTxwP0J06ua6OG94ufzX0K5XBzQvppM6EJNniHljpWS5UGyAN/06o9BZ/ 5P25jzY1luPcbFrgxs68b+nOhFYwu9aiQZJiR3YqK7yAIwZSwmI0kB9Jg w==; IronPort-SDR: 7wVa8qGSN35GJJM8a2kecfPF8uTylSr/EQX3+hGY4r19IUnabMXPS4rwFMQg+FWXkk6T4EmXG5 AJz30k31fN81ExhxcV7bvL6tuqDKHn/6DckS+PtMYO3QCPzwscQTK6GwO6sCr6y5/IPt16pwlx G7RnVgwKuVtGl6uISmQxwHtP9l43KShLaepbf0ECatpo9FvOvT56TXlvuxQsqoN8mU/wHpHlfd FzRlGutB32RiYx9aDH1GJMrFbHv/G2MJchyWOKD6kXW0EwjI7NIwnuFJIeNad/0cYPPHsV/1ZE YrY= X-IronPort-AV: E=Sophos;i="5.73,332,1583164800"; d="scan'208";a="137935146" IronPort-SDR: /zRL849gXteY/znLM78iVERjyJ5BR84DK/W9wRnq3LELcMgxIxfO8LtIPQv4JIlE0V/ZePf4kn adjDSV2vD9bqJ9NwkrWOCcTLEYXMk68ac= IronPort-SDR: 1dgaDGiAqqODlBTSFMFfNB6jSrEMkMF4WYn3AsXp+NkSV89OQFg9rGumJ1YBXM/8YaELiHUgFv ewwHpgjFyMuQ== WDCIronportException: Internal From: Alistair Francis To: peter.maydell@linaro.org Subject: [PULL 08/14] riscv: sifive_e: Support changing CPU type Date: Wed, 29 Apr 2020 11:28:50 -0700 Message-Id: <20200429182856.2588202-9-alistair.francis@wdc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200429182856.2588202-1-alistair.francis@wdc.com> References: <20200429182856.2588202-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=216.71.154.45; envelope-from=prvs=381fbd49e=alistair.francis@wdc.com; helo=esa6.hgst.iphmx.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/29 14:37:03 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Received-From: 216.71.154.45 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: qemu-riscv@nongnu.org, Corey Wharton , palmerdabbelt@google.com, qemu-devel@nongnu.org, Alistair Francis , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Corey Wharton Allows the CPU to be changed from the default via the -cpu command line option. Signed-off-by: Corey Wharton Reviewed-by: Bin Meng Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200313193429.8035-2-coreyw7@fb.com Message-Id: <20200313193429.8035-2-coreyw7@fb.com> [ Changes by AF: - Set "cpu-type" from the machine and not SoC ] Signed-off-by: Alistair Francis --- hw/riscv/sifive_e.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index 646553a7c3..b53109521e 100644 --- a/hw/riscv/sifive_e.c +++ b/hw/riscv/sifive_e.c @@ -123,8 +123,6 @@ static void riscv_sifive_e_soc_init(Object *obj) object_initialize_child(obj, "cpus", &s->cpus, sizeof(s->cpus), TYPE_RISCV_HART_ARRAY, &error_abort, NULL); - object_property_set_str(OBJECT(&s->cpus), SIFIVE_E_CPU, "cpu-type", - &error_abort); object_property_set_int(OBJECT(&s->cpus), ms->smp.cpus, "num-harts", &error_abort); sysbus_init_child_obj(obj, "riscv.sifive.e.gpio0", @@ -141,6 +139,8 @@ static void riscv_sifive_e_soc_realize(DeviceState *dev= , Error **errp) SiFiveESoCState *s =3D RISCV_E_SOC(dev); MemoryRegion *sys_mem =3D get_system_memory(); =20 + object_property_set_str(OBJECT(&s->cpus), ms->cpu_type, "cpu-type", + &error_abort); object_property_set_bool(OBJECT(&s->cpus), true, "realized", &error_abort); =20 @@ -219,6 +219,7 @@ static void riscv_sifive_e_machine_init(MachineClass *m= c) mc->desc =3D "RISC-V Board compatible with SiFive E SDK"; mc->init =3D riscv_sifive_e_init; mc->max_cpus =3D 1; + mc->default_cpu_type =3D SIFIVE_E_CPU; } =20 DEFINE_MACHINE("sifive_e", riscv_sifive_e_machine_init) --=20 2.26.2