2 * Generic ARM Programmable Interrupt Controller support.
4 * Copyright (c) 2006 CodeSourcery.
5 * Written by Paul Brook
7 * This code is licensed under the LGPL
13 /* Input 0 is IRQ and input 1 is FIQ. */
14 static void arm_pic_cpu_handler(void *opaque
, int irq
, int level
)
16 CPUARMState
*env
= (CPUARMState
*)opaque
;
20 cpu_interrupt(env
, CPU_INTERRUPT_HARD
);
22 cpu_reset_interrupt(env
, CPU_INTERRUPT_HARD
);
26 cpu_interrupt(env
, CPU_INTERRUPT_FIQ
);
28 cpu_reset_interrupt(env
, CPU_INTERRUPT_FIQ
);
31 hw_error("arm_pic_cpu_handler: Bad interrupt line %d\n", irq
);
35 qemu_irq
*arm_pic_init_cpu(CPUARMState
*env
)
37 return qemu_allocate_irqs(arm_pic_cpu_handler
, env
, 2);