mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Improve "ta 0" shutdown
This patch replace the previous implementation with this simplified and more complete version (no shutdown when psret == 1). Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
9643c25f8d
commit
96d922a654
4 changed files with 9 additions and 18 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "cpu.h"
|
||||
#include "trace.h"
|
||||
#include "sysemu.h"
|
||||
|
||||
//#define DEBUG_PCALL
|
||||
|
||||
|
@ -100,8 +101,13 @@ void do_interrupt(CPUState *env)
|
|||
#endif
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
if (env->psret == 0) {
|
||||
cpu_abort(env, "Trap 0x%02x while interrupts disabled, Error state",
|
||||
env->exception_index);
|
||||
if (env->exception_index == 0x80 &&
|
||||
env->def->features & CPU_FEATURE_TA0_SHUTDOWN) {
|
||||
qemu_system_shutdown_request();
|
||||
} else {
|
||||
cpu_abort(env, "Trap 0x%02x while interrupts disabled, Error state",
|
||||
env->exception_index);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue