From nobody Tue Nov 18 02:54:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.66 as permitted sender) client-ip=209.85.128.66; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f66.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1606829312; cv=none; d=zohomail.com; s=zohoarc; b=XzXESXyKTIx6D1ejbCU9/VzdTHCy8N+pk1+h3ks67CcleW6eoGySc4yorgbAL8K71DEC0ILQBRoF41L+YBGXFDjZLFEI7FmZE6g17gA4jwbEzO8Y+O398E5zvsnuRp2dAnnZaemkzkYeBNn4tpnSny7gb7M7hCHo1bpBxedymEE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606829312; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rp4xnUJtd5sl4NVBjhV9Hzwn0rVDspRr7Rk8qpU8HFs=; b=dRRGNDtXiv6DN8c+PFDU07VTsxzuHhQR0eoS88oX6fmPS2+h47oTKWC+XoT0mWNIo8VUn20HuMYV579pms/IAW/QzSnGrfy1oi94g/nMm4hOaGdGTGhQuzathWUa7f/ale2HpsikpxaeWDAdmilv90J5RtqpjGyf/mFadHYwDQU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.zohomail.com with SMTPS id 16068293123905.876168722302623; Tue, 1 Dec 2020 05:28:32 -0800 (PST) Received: by mail-wm1-f66.google.com with SMTP id 3so4928687wmg.4 for ; Tue, 01 Dec 2020 05:28:31 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (111.red-88-21-205.staticip.rima-tde.net. [88.21.205.111]) by smtp.gmail.com with ESMTPSA id i11sm3253089wrm.1.2020.12.01.05.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2020 05:28:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rp4xnUJtd5sl4NVBjhV9Hzwn0rVDspRr7Rk8qpU8HFs=; b=jsrnKPHGJrSbQU9I/pKISqEwGFA2aC9mJ1msXv+esIjKWWclVOQQ48/i+eZH3Jm/qV yZHCIB/0W0KnwrrTGPDbP/cfQHo5Ku9JLF/MvU6FrQ2tXD/0wA5M9w8EIdn499AkWpcU Zi9/+MhF9QZuZPYhrTleB+tA27KU31b8OS4qTx2x0k04+UId34w1Ase+rIMqKI1Bdj9I EKlH9dlXTX2vUasHmSE3kuNXAdgYtHP4OxdtlrTGslD0RsD1pKiL+2evk4seJdqzdbe3 nJCaNU4+ZCkMibl3dLqJWjzdilElhDgA+dc/MSjOF1z8Z27dz1JKH/2RyvXkrCaw9g0G qWSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rp4xnUJtd5sl4NVBjhV9Hzwn0rVDspRr7Rk8qpU8HFs=; b=Ek46WLh9K+84QPr/WBP3Fjxs38NBUJDgsKtcggcf/lhghynBjO5tC/JwNS95d1+IwW Y2GJIL4Kp5IvzTdKMaKMBiRFiGO8vnwetTc7YIckzXv2tEeR6z/bQulmUM2s4RPBs1Xn ROqNWQcoA3OFRvAr8X64BUfBFpANUCdaF2D4qhr2LEs4Z1V10V0spNcYm3i94fguiNHf o6SVDjpZjwDVQFw9bxXC9Fr5GNSeVY9Wg5EI3Frjx+GFe127RgS0oZsR2gzHb808m+1M tjCPIRImaPZEWj298GSMvDUnCbkN7P5EfJw7CJUgYhKaAGT1zzI/aV6RaP2bRhm80C3k CJ4A== X-Gm-Message-State: AOAM532ydBfJLEefjKgmHxEj/r55q7qlkB52YbAZKeJtc2eyAX5n52cF TOMaXEXIinhQHaWhE0IHtwM= X-Google-Smtp-Source: ABdhPJyAkn2+wfBkeqakUxJj80cczQukKxaQAsXINRBFWBKDZuWOOLxa2AlmpNUa9jPzDLbEZp5Vcg== X-Received: by 2002:a1c:4e0a:: with SMTP id g10mr2696362wmh.51.1606829310366; Tue, 01 Dec 2020 05:28:30 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Huacai Chen , qemu-devel@nongnu.org, Jiaxun Yang Cc: Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno Subject: [PATCH 2/3] target/mips: Replace CP0_Config0 magic values by proper definitions Date: Tue, 1 Dec 2020 14:28:16 +0100 Message-Id: <20201201132817.2863301-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201201132817.2863301-1-f4bug@amsat.org> References: <20201201132817.2863301-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/translate_init.c.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target/mips/translate_init.c.inc b/target/mips/translate_init.= c.inc index ea85d5c6a79..4206d8f0859 100644 --- a/target/mips/translate_init.c.inc +++ b/target/mips/translate_init.c.inc @@ -495,7 +495,8 @@ const mips_def_t mips_defs[] =3D .name =3D "R4000", .CP0_PRid =3D 0x00000400, /* No L2 cache, icache size 8k, dcache size 8k, uncached coherency= . */ - .CP0_Config0 =3D (1 << 17) | (0x1 << 9) | (0x1 << 6) | (0x2 << CP0= C0_K0), + .CP0_Config0 =3D (2 << CP0C0_Impl) | (1 << CP0C0_IC) | (1 << CP0C0= _DC) | + (2 << CP0C0_K0), /* Note: Config1 is only used internally, the R4000 has only Confi= g0. */ .CP0_Config1 =3D (1 << CP0C1_FP) | (47 << CP0C1_MMU), .CP0_LLAddr_rw_bitmask =3D 0xFFFFFFFF, @@ -516,7 +517,8 @@ const mips_def_t mips_defs[] =3D .name =3D "VR5432", .CP0_PRid =3D 0x00005400, /* No L2 cache, icache size 8k, dcache size 8k, uncached coherency= . */ - .CP0_Config0 =3D (1 << 17) | (0x1 << 9) | (0x1 << 6) | (0x2 << CP0= C0_K0), + .CP0_Config0 =3D (2 << CP0C0_Impl) | (1 << CP0C0_IC) | (1 << CP0C0= _DC) | + (2 << CP0C0_K0), .CP0_Config1 =3D (1 << CP0C1_FP) | (47 << CP0C1_MMU), .CP0_LLAddr_rw_bitmask =3D 0xFFFFFFFFL, .CP0_LLAddr_shift =3D 4, @@ -766,8 +768,8 @@ const mips_def_t mips_defs[] =3D .name =3D "Loongson-2E", .CP0_PRid =3D 0x6302, /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ - .CP0_Config0 =3D (0x1<<17) | (0x1<<16) | (0x1<<11) | (0x1<<8) | - (0x1<<5) | (0x1<<4) | (0x1<<1), + .CP0_Config0 =3D (3 << CP0C0_Impl) | (4 << CP0C0_IC) | (4 << CP0C0= _DC) | + (1 << CP0C0_IB) | (1 << CP0C0_DB) | (0x2 << CP0C0_K= 0), /* Note: Config1 is only used internally, Loongson-2E has only Config0. */ .CP0_Config1 =3D (1 << CP0C1_FP) | (47 << CP0C1_MMU), @@ -786,8 +788,8 @@ const mips_def_t mips_defs[] =3D .name =3D "Loongson-2F", .CP0_PRid =3D 0x6303, /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ - .CP0_Config0 =3D (0x1<<17) | (0x1<<16) | (0x1<<11) | (0x1<<8) | - (0x1<<5) | (0x1<<4) | (0x1<<1), + .CP0_Config0 =3D (3 << CP0C0_Impl) | (4 << CP0C0_IC) | (4 << CP0C0= _DC) | + (1 << CP0C0_IB) | (1 << CP0C0_DB) | (0x2 << CP0C0_K= 0), /* Note: Config1 is only used internally, Loongson-2F has only Config0. */ .CP0_Config1 =3D (1 << CP0C1_FP) | (47 << CP0C1_MMU), --=20 2.26.2