]> git.proxmox.com Git - qemu.git/commitdiff
Correctly identify multiple cpus in SMP systems
authorHervé Poussineau <hpoussin@reactos.org>
Sat, 31 Jul 2010 10:29:03 +0000 (12:29 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 31 Jul 2010 15:14:52 +0000 (17:14 +0200)
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips/op_helper.c
target-mips/translate.c

index a619b72610ad725152442da63729549657fc6285..50c65bdc3b699894a029a8e7145939bede3cc455 100644 (file)
@@ -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 = 0x80000000 | (arg1 & 0x3FFFF000);
+    env->CP0_EBase = (env->CP0_EBase & ~0x3FFFF000) | (arg1 & 0x3FFFF000);
 }
 
 void helper_mtc0_config0 (target_ulong arg1)
index 6c72dee1ba7d0163f556eefdd7decb084b720cd9..20b66a8a51bd0ac97146d8758bbb46873b55e086 100644 (file)
@@ -12679,8 +12679,7 @@ void cpu_reset (CPUMIPSState *env)
     env->CP0_Random = env->tlb->nb_tlb - 1;
     env->tlb->tlb_in_use = env->tlb->nb_tlb;
     env->CP0_Wired = 0;
-    /* SMP not implemented */
-    env->CP0_EBase = 0x80000000;
+    env->CP0_EBase = 0x80000000 | (env->cpu_index & 0x3FF);
     env->CP0_Status = (1 << CP0St_BEV) | (1 << CP0St_ERL);
     /* vectored interrupts not implemented, timer on int 7,
        no performance counters. */