Commit e63ecc6f68d5f9349683aef5d74e36137eafb72d
1 parent
22f8a8b3
Do not allow PowerPC CPU restart after entering checkstop mode.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3388 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
13 additions
and
12 deletions
hw/ppc.c
... | ... | @@ -103,6 +103,7 @@ static void ppc6xx_set_irq (void *opaque, int pin, int level) |
103 | 103 | case PPC6xx_INPUT_CKSTP_IN: |
104 | 104 | /* Level sensitive - active low */ |
105 | 105 | /* XXX: TODO: relay the signal to CKSTP_OUT pin */ |
106 | + /* XXX: Note that the only way to restart the CPU is to reset it */ | |
106 | 107 | if (level) { |
107 | 108 | #if defined(PPC_DEBUG_IRQ) |
108 | 109 | if (loglevel & CPU_LOG_INT) { |
... | ... | @@ -110,13 +111,6 @@ static void ppc6xx_set_irq (void *opaque, int pin, int level) |
110 | 111 | } |
111 | 112 | #endif |
112 | 113 | env->halted = 1; |
113 | - } else { | |
114 | -#if defined(PPC_DEBUG_IRQ) | |
115 | - if (loglevel & CPU_LOG_INT) { | |
116 | - fprintf(logfile, "%s: restart the CPU\n", __func__); | |
117 | - } | |
118 | -#endif | |
119 | - env->halted = 0; | |
120 | 114 | } |
121 | 115 | break; |
122 | 116 | case PPC6xx_INPUT_HRESET: | ... | ... |
target-ppc/helper.c
... | ... | @@ -2156,10 +2156,18 @@ static always_inline void powerpc_excp (CPUState *env, |
2156 | 2156 | goto store_next; |
2157 | 2157 | case POWERPC_EXCP_MCHECK: /* Machine check exception */ |
2158 | 2158 | if (msr_me == 0) { |
2159 | - /* Machine check exception is not enabled */ | |
2160 | - /* XXX: we may just stop the processor here, to allow debugging */ | |
2161 | - excp = POWERPC_EXCP_RESET; | |
2162 | - goto excp_reset; | |
2159 | + /* Machine check exception is not enabled. | |
2160 | + * Enter checkstop state. | |
2161 | + */ | |
2162 | + if (loglevel != 0) { | |
2163 | + fprintf(logfile, "Machine check while not allowed. " | |
2164 | + "Entering checkstop state\n"); | |
2165 | + } else { | |
2166 | + fprintf(stderr, "Machine check while not allowed. " | |
2167 | + "Entering checkstop state\n"); | |
2168 | + } | |
2169 | + env->halted = 1; | |
2170 | + env->interrupt_request |= CPU_INTERRUPT_EXITTB; | |
2163 | 2171 | } |
2164 | 2172 | msr_ri = 0; |
2165 | 2173 | msr_me = 0; |
... | ... | @@ -2413,7 +2421,6 @@ static always_inline void powerpc_excp (CPUState *env, |
2413 | 2421 | #if defined(TARGET_PPC64H) |
2414 | 2422 | msr_hv = 1; |
2415 | 2423 | #endif |
2416 | - excp_reset: | |
2417 | 2424 | goto store_next; |
2418 | 2425 | #if defined(TARGET_PPC64) |
2419 | 2426 | case POWERPC_EXCP_DSEG: /* Data segment exception */ | ... | ... |