sun4m halt support (Blue Swirl)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 20 Sep 2006 20:30:57 +0000 (20:30 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 20 Sep 2006 20:30:57 +0000 (20:30 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2161 c046a42c-6fe2-441c-8c8c-71466251a162

cpu-exec.c
hw/slavio_misc.c

index eeeeb8f..6385639 100644 (file)
@@ -548,8 +548,10 @@ int cpu_exec(CPUState *env1)
                        //do_interrupt(0, 0, 0, 0, 0);
                        env->interrupt_request &= ~CPU_INTERRUPT_TIMER;
                    } else if (interrupt_request & CPU_INTERRUPT_HALT) {
-                        env1->halted = 1;
-                        return EXCP_HALTED;
+                       env->interrupt_request &= ~CPU_INTERRUPT_HALT;
+                       env->halted = 1;
+                       env->exception_index = EXCP_HLT;
+                       cpu_loop_exit();
                     }
 #elif defined(TARGET_ARM)
                     if (interrupt_request & CPU_INTERRUPT_FIQ
index 904f44e..a48a7af 100644 (file)
@@ -123,10 +123,7 @@ static void slavio_misc_mem_writeb(void *opaque, target_phys_addr_t addr, uint32
        break;
     case 0xa000000:
        MISC_DPRINTF("Write power management %2.2x\n", val & 0xff);
-#if 0
-        // XXX almost works
         cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HALT);
-#endif
        break;
     }
 }