mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
target-alpha: Disable interrupts properly.
Interrupts are disabled in PALmode, and when the PS IL is high enough. Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
a18ad89351
commit
6a80e088c7
3 changed files with 46 additions and 4 deletions
33
cpu-exec.c
33
cpu-exec.c
|
@ -488,9 +488,36 @@ int cpu_exec(CPUState *env1)
|
|||
next_tb = 0;
|
||||
}
|
||||
#elif defined(TARGET_ALPHA)
|
||||
if (interrupt_request & CPU_INTERRUPT_HARD) {
|
||||
do_interrupt(env);
|
||||
next_tb = 0;
|
||||
{
|
||||
int idx = -1;
|
||||
/* ??? This hard-codes the OSF/1 interrupt levels. */
|
||||
switch (env->pal_mode ? 7 : env->ps & PS_INT_MASK) {
|
||||
case 0 ... 3:
|
||||
if (interrupt_request & CPU_INTERRUPT_HARD) {
|
||||
idx = EXCP_DEV_INTERRUPT;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
case 4:
|
||||
if (interrupt_request & CPU_INTERRUPT_TIMER) {
|
||||
idx = EXCP_CLK_INTERRUPT;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
case 5:
|
||||
if (interrupt_request & CPU_INTERRUPT_SMP) {
|
||||
idx = EXCP_SMP_INTERRUPT;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
case 6:
|
||||
if (interrupt_request & CPU_INTERRUPT_MCHK) {
|
||||
idx = EXCP_MCHK;
|
||||
}
|
||||
}
|
||||
if (idx >= 0) {
|
||||
env->exception_index = idx;
|
||||
env->error_code = 0;
|
||||
do_interrupt(env);
|
||||
next_tb = 0;
|
||||
}
|
||||
}
|
||||
#elif defined(TARGET_CRIS)
|
||||
if (interrupt_request & CPU_INTERRUPT_HARD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue