kernel command line support (Daniel Jacobowitz)
[qemu] / cpu-exec.c
index f411ecc..7c056d4 100644 (file)
@@ -192,7 +192,7 @@ static inline TranslationBlock *tb_find_fast(void)
     pc = env->nip;
 #elif defined(TARGET_MIPS)
     flags = env->hflags & MIPS_HFLAGS_TMASK;
-    cs_base = NULL;
+    cs_base = 0;
     pc = env->PC;
 #else
 #error unsupported CPU
@@ -265,11 +265,22 @@ int cpu_exec(CPUState *env1)
         }
     }
 #elif defined(TARGET_PPC)
-    if (env1->msr[MSR_POW]) {
+    if (env1->halted) {
         if (env1->msr[MSR_EE] && 
             (env1->interrupt_request & 
              (CPU_INTERRUPT_HARD | CPU_INTERRUPT_TIMER))) {
-            env1->msr[MSR_POW] = 0;
+            env1->halted = 0;
+        } else {
+            return EXCP_HALTED;
+        }
+    }
+#elif defined(TARGET_ARM)
+    if (env1->halted) {
+        /* An interrupt wakes the CPU even if the I and F CPSR bits are
+           set.  */
+        if (env1->interrupt_request
+            & (CPU_INTERRUPT_FIQ | CPU_INTERRUPT_HARD)) {
+            env1->halted = 0;
         } else {
             return EXCP_HALTED;
         }
@@ -893,7 +904,7 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address,
         /* we restore the process signal mask as the sigreturn should
            do it (XXX: use sigsetjmp) */
         sigprocmask(SIG_SETMASK, old_set, NULL);
-        raise_exception_err(EXCP0E_PAGE, env->error_code);
+        raise_exception_err(env->exception_index, env->error_code);
     } else {
         /* activate soft MMU for this block */
         env->hflags |= HF_SOFTMMU_MASK;
@@ -1045,7 +1056,7 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address,
     }
 
     /* see if it is an MMU fault */
-    ret = cpu_ppc_handle_mmu_fault(env, address, is_write, msr_pr, 0);
+    ret = cpu_mips_handle_mmu_fault(env, address, is_write, 1, 0);
     if (ret < 0)
         return 0; /* not an MMU fault */
     if (ret == 0)