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
This commit is contained in:
parent
22f8a8b31c
commit
e63ecc6f68
8
hw/ppc.c
8
hw/ppc.c
|
@ -103,6 +103,7 @@ static void ppc6xx_set_irq (void *opaque, int pin, int level)
|
||||||
case PPC6xx_INPUT_CKSTP_IN:
|
case PPC6xx_INPUT_CKSTP_IN:
|
||||||
/* Level sensitive - active low */
|
/* Level sensitive - active low */
|
||||||
/* XXX: TODO: relay the signal to CKSTP_OUT pin */
|
/* XXX: TODO: relay the signal to CKSTP_OUT pin */
|
||||||
|
/* XXX: Note that the only way to restart the CPU is to reset it */
|
||||||
if (level) {
|
if (level) {
|
||||||
#if defined(PPC_DEBUG_IRQ)
|
#if defined(PPC_DEBUG_IRQ)
|
||||||
if (loglevel & CPU_LOG_INT) {
|
if (loglevel & CPU_LOG_INT) {
|
||||||
|
@ -110,13 +111,6 @@ static void ppc6xx_set_irq (void *opaque, int pin, int level)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
env->halted = 1;
|
env->halted = 1;
|
||||||
} else {
|
|
||||||
#if defined(PPC_DEBUG_IRQ)
|
|
||||||
if (loglevel & CPU_LOG_INT) {
|
|
||||||
fprintf(logfile, "%s: restart the CPU\n", __func__);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
env->halted = 0;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PPC6xx_INPUT_HRESET:
|
case PPC6xx_INPUT_HRESET:
|
||||||
|
|
|
@ -2156,10 +2156,18 @@ static always_inline void powerpc_excp (CPUState *env,
|
||||||
goto store_next;
|
goto store_next;
|
||||||
case POWERPC_EXCP_MCHECK: /* Machine check exception */
|
case POWERPC_EXCP_MCHECK: /* Machine check exception */
|
||||||
if (msr_me == 0) {
|
if (msr_me == 0) {
|
||||||
/* Machine check exception is not enabled */
|
/* Machine check exception is not enabled.
|
||||||
/* XXX: we may just stop the processor here, to allow debugging */
|
* Enter checkstop state.
|
||||||
excp = POWERPC_EXCP_RESET;
|
*/
|
||||||
goto excp_reset;
|
if (loglevel != 0) {
|
||||||
|
fprintf(logfile, "Machine check while not allowed. "
|
||||||
|
"Entering checkstop state\n");
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Machine check while not allowed. "
|
||||||
|
"Entering checkstop state\n");
|
||||||
|
}
|
||||||
|
env->halted = 1;
|
||||||
|
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
|
||||||
}
|
}
|
||||||
msr_ri = 0;
|
msr_ri = 0;
|
||||||
msr_me = 0;
|
msr_me = 0;
|
||||||
|
@ -2413,7 +2421,6 @@ static always_inline void powerpc_excp (CPUState *env,
|
||||||
#if defined(TARGET_PPC64H)
|
#if defined(TARGET_PPC64H)
|
||||||
msr_hv = 1;
|
msr_hv = 1;
|
||||||
#endif
|
#endif
|
||||||
excp_reset:
|
|
||||||
goto store_next;
|
goto store_next;
|
||||||
#if defined(TARGET_PPC64)
|
#if defined(TARGET_PPC64)
|
||||||
case POWERPC_EXCP_DSEG: /* Data segment exception */
|
case POWERPC_EXCP_DSEG: /* Data segment exception */
|
||||||
|
|
Loading…
Reference in New Issue