| 213 |
|
|
| 214 |
static void slavio_check_interrupts(void *opaque) |
static void slavio_check_interrupts(void *opaque) |
| 215 |
{ |
{ |
| 216 |
|
CPUState *env; |
| 217 |
SLAVIO_INTCTLState *s = opaque; |
SLAVIO_INTCTLState *s = opaque; |
| 218 |
uint32_t pending = s->intregm_pending; |
uint32_t pending = s->intregm_pending; |
| 219 |
unsigned int i, max = 0; |
unsigned int i, max = 0; |
| 227 |
max = intbit_to_level[i]; |
max = intbit_to_level[i]; |
| 228 |
} |
} |
| 229 |
} |
} |
| 230 |
if (cpu_single_env->interrupt_index == 0) { |
env = first_cpu; |
| 231 |
|
if (env->interrupt_index == 0) { |
| 232 |
DPRINTF("Triggered pil %d\n", max); |
DPRINTF("Triggered pil %d\n", max); |
| 233 |
#ifdef DEBUG_IRQ_COUNT |
#ifdef DEBUG_IRQ_COUNT |
| 234 |
s->irq_count[max]++; |
s->irq_count[max]++; |
| 235 |
#endif |
#endif |
| 236 |
cpu_single_env->interrupt_index = TT_EXTINT | max; |
env->interrupt_index = TT_EXTINT | max; |
| 237 |
cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HARD); |
cpu_interrupt(env, CPU_INTERRUPT_HARD); |
| 238 |
} |
} |
| 239 |
else |
else |
| 240 |
DPRINTF("Not triggered (pending %x), pending exception %x\n", pending, cpu_single_env->interrupt_index); |
DPRINTF("Not triggered (pending %x), pending exception %x\n", pending, env->interrupt_index); |
| 241 |
} |
} |
| 242 |
else |
else |
| 243 |
DPRINTF("Not triggered (pending %x), disabled %x\n", pending, s->intregm_disabled); |
DPRINTF("Not triggered (pending %x), disabled %x\n", pending, s->intregm_disabled); |