From nobody Thu Nov 6 12:33:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540914457839937.4801096379475; Tue, 30 Oct 2018 08:47:37 -0700 (PDT) Received: from localhost ([::1]:54015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHWEv-0004BF-BB for importer@patchew.org; Tue, 30 Oct 2018 11:47:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHWCH-0002cH-Uj for qemu-devel@nongnu.org; Tue, 30 Oct 2018 11:44:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHWCF-0001yN-SD for qemu-devel@nongnu.org; Tue, 30 Oct 2018 11:44:49 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:55997 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gHWCF-0001m6-BT for qemu-devel@nongnu.org; Tue, 30 Oct 2018 11:44:47 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 424601A241B; Tue, 30 Oct 2018 16:44:18 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 1745A1A23F8; Tue, 30 Oct 2018 16:44:18 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Tue, 30 Oct 2018 16:44:09 +0100 Message-Id: <1540914249-3392-6-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540914249-3392-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1540914249-3392-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v3 5/5] target/mips: Enable only tested modes for R5900 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: smarkovic@wavecomp.com, pjovanovic@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Enable MIPS 032 user mode for R5900. Expose to end-user only features that make sense and are appropriately tested. In this case, enable only MIPS 032 user mode for R5900. About defined(CONFIG_USER_ONLY), it is just because a reasonable testing was not provided for system mode. Some reasonable ("acceptance") testing should be done, and made available to others. A system image, kernel, and command line + plus some relatively mild testing of system mode should suffice. About !defined(TARGET_MIPS64), this is because O32 is the only supported user-mode ABI for this CPU. Reviewed-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- target/mips/translate_init.inc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/mips/translate_init.inc.c b/target/mips/translate_init.= inc.c index cab2003..d84c58e 100644 --- a/target/mips/translate_init.inc.c +++ b/target/mips/translate_init.inc.c @@ -410,6 +410,8 @@ const mips_def_t mips_defs[] =3D .insn_flags =3D CPU_MIPS32R5 | ASE_MSA, .mmu_type =3D MMU_TYPE_R4000, }, +#if defined(CONFIG_USER_ONLY) +#if !defined(TARGET_MIPS64) { .name =3D "R5900", .CP0_PRid =3D 0x00002E00, @@ -457,6 +459,8 @@ const mips_def_t mips_defs[] =3D .insn_flags =3D CPU_R5900 | ASE_MMI, .mmu_type =3D MMU_TYPE_R4000, }, +#endif +#endif { /* A generic CPU supporting MIPS32 Release 6 ISA. FIXME: Support IEEE 754-2008 FP. --=20 2.7.4