mirror of https://gitee.com/openkylin/qemu.git
Temporary hack to avoid Qemu crash at PowerPC reset time.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3482 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c4781a51a5
commit
ef397e88e9
8
hw/ppc.c
8
hw/ppc.c
|
@ -131,13 +131,17 @@ static void ppc6xx_set_irq (void *opaque, int pin, int level)
|
||||||
case PPC6xx_INPUT_HRESET:
|
case PPC6xx_INPUT_HRESET:
|
||||||
/* Level sensitive - active low */
|
/* Level sensitive - active low */
|
||||||
if (level) {
|
if (level) {
|
||||||
#if 0 // XXX: TOFIX
|
|
||||||
#if defined(PPC_DEBUG_IRQ)
|
#if defined(PPC_DEBUG_IRQ)
|
||||||
if (loglevel & CPU_LOG_INT) {
|
if (loglevel & CPU_LOG_INT) {
|
||||||
fprintf(logfile, "%s: reset the CPU\n", __func__);
|
fprintf(logfile, "%s: reset the CPU\n", __func__);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
cpu_reset(env);
|
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
|
||||||
|
/* XXX: TOFIX */
|
||||||
|
#if 0
|
||||||
|
cpu_ppc_reset(env);
|
||||||
|
#else
|
||||||
|
qemu_system_reset_request();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2189,12 +2189,17 @@ void ppc40x_core_reset (CPUState *env)
|
||||||
target_ulong dbsr;
|
target_ulong dbsr;
|
||||||
|
|
||||||
printf("Reset PowerPC core\n");
|
printf("Reset PowerPC core\n");
|
||||||
|
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
|
||||||
|
/* XXX: TOFIX */
|
||||||
|
#if 0
|
||||||
cpu_ppc_reset(env);
|
cpu_ppc_reset(env);
|
||||||
|
#else
|
||||||
|
qemu_system_reset_request();
|
||||||
|
#endif
|
||||||
dbsr = env->spr[SPR_40x_DBSR];
|
dbsr = env->spr[SPR_40x_DBSR];
|
||||||
dbsr &= ~0x00000300;
|
dbsr &= ~0x00000300;
|
||||||
dbsr |= 0x00000100;
|
dbsr |= 0x00000100;
|
||||||
env->spr[SPR_40x_DBSR] = dbsr;
|
env->spr[SPR_40x_DBSR] = dbsr;
|
||||||
cpu_loop_exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ppc40x_chip_reset (CPUState *env)
|
void ppc40x_chip_reset (CPUState *env)
|
||||||
|
@ -2202,13 +2207,18 @@ void ppc40x_chip_reset (CPUState *env)
|
||||||
target_ulong dbsr;
|
target_ulong dbsr;
|
||||||
|
|
||||||
printf("Reset PowerPC chip\n");
|
printf("Reset PowerPC chip\n");
|
||||||
|
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
|
||||||
|
/* XXX: TOFIX */
|
||||||
|
#if 0
|
||||||
cpu_ppc_reset(env);
|
cpu_ppc_reset(env);
|
||||||
|
#else
|
||||||
|
qemu_system_reset_request();
|
||||||
|
#endif
|
||||||
/* XXX: TODO reset all internal peripherals */
|
/* XXX: TODO reset all internal peripherals */
|
||||||
dbsr = env->spr[SPR_40x_DBSR];
|
dbsr = env->spr[SPR_40x_DBSR];
|
||||||
dbsr &= ~0x00000300;
|
dbsr &= ~0x00000300;
|
||||||
dbsr |= 0x00000200;
|
dbsr |= 0x00000200;
|
||||||
env->spr[SPR_40x_DBSR] = dbsr;
|
env->spr[SPR_40x_DBSR] = dbsr;
|
||||||
cpu_loop_exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ppc40x_system_reset (CPUState *env)
|
void ppc40x_system_reset (CPUState *env)
|
||||||
|
|
Loading…
Reference in New Issue