From nobody Thu Nov 6 12:35:48 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 154092065863332.05622830812263; Tue, 30 Oct 2018 10:30:58 -0700 (PDT) Received: from localhost ([::1]:54630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHXqz-0002WO-Cz for importer@patchew.org; Tue, 30 Oct 2018 13:30:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHXp1-0001Cp-34 for qemu-devel@nongnu.org; Tue, 30 Oct 2018 13:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHXou-0002oe-Iy for qemu-devel@nongnu.org; Tue, 30 Oct 2018 13:28:54 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:44620 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 1gHXou-0002nd-An for qemu-devel@nongnu.org; Tue, 30 Oct 2018 13:28:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 136B81A44F7; Tue, 30 Oct 2018 18:28:37 +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 DFE8D1A4134; Tue, 30 Oct 2018 18:28:36 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Tue, 30 Oct 2018 18:28:18 +0100 Message-Id: <1540920498-5133-6-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540920498-5133-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1540920498-5133-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] [PULL 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: peter.maydell@linaro.org, amarkovic@wavecomp.com 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