Received: from [140.186.70.92] (port=40989 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Of9Jl-0001YJ-R2 for qemu-devel@nongnu.org; Sat, 31 Jul 2010 06:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Of9Jj-0006x6-40 for qemu-devel@nongnu.org; Sat, 31 Jul 2010 06:29:24 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:48862) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Of9Ji-0006w7-BG for qemu-devel@nongnu.org; Sat, 31 Jul 2010 06:29:23 -0400 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 31 Jul 2010 12:29:03 +0200 Message-Id: <1280572143-7474-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] [MIPS] Correctly identify multiple cpus in SMP systems List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Signed-off-by: Herv=C3=A9 Poussineau --- target-mips/op_helper.c | 3 +-- target-mips/translate.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index a619b72..50c65bd 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -1359,8 +1359,7 @@ void helper_mtc0_cause (target_ulong arg1) void helper_mtc0_ebase (target_ulong arg1) { /* vectored interrupts not implemented */ - /* Multi-CPU not implemented */ - env->CP0_EBase =3D 0x80000000 | (arg1 & 0x3FFFF000); + env->CP0_EBase =3D (env->CP0_EBase & ~0x3FFFF000) | (arg1 & 0x3FFFF0= 00); } =20 void helper_mtc0_config0 (target_ulong arg1) diff --git a/target-mips/translate.c b/target-mips/translate.c index 6c72dee..20b66a8 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -12679,8 +12679,7 @@ void cpu_reset (CPUMIPSState *env) env->CP0_Random =3D env->tlb->nb_tlb - 1; env->tlb->tlb_in_use =3D env->tlb->nb_tlb; env->CP0_Wired =3D 0; - /* SMP not implemented */ - env->CP0_EBase =3D 0x80000000; + env->CP0_EBase =3D 0x80000000 | (env->cpu_index & 0x3FF); env->CP0_Status =3D (1 << CP0St_BEV) | (1 << CP0St_ERL); /* vectored interrupts not implemented, timer on int 7, no performance counters. */ --=20 1.7.1.GIT