/* IRQ handling */ int cpu_get_pic_interrupt(CPUState *env) { int intno; intno = apic_get_interrupt(env->apic_state); if (intno >= 0) { /* set irq request if a PIC irq is still pending */ /* XXX: improve that */ pic_update_irq(isa_pic); return intno; } /* read the irq from the PIC */ if (!apic_accept_pic_intr(env->apic_state)) { return -1; } intno = pic_read_irq(isa_pic); return intno; }
static uint64_t iack_read(void *opaque, target_phys_addr_t addr, unsigned size) { return pic_read_irq(isa_pic); }
static uint64_t ppc_intack_read(void *opaque, hwaddr addr, unsigned int size) { return pic_read_irq(isa_pic); }