2 * Generic ARM Programmable Interrupt Controller support.
4 * Copyright (c) 2006 CodeSourcery.
5 * Written by Paul Brook
7 * This code is licenced under the LGPL
13 /* Stub functions for hardware that doesn't exist. */
23 /* Input 0 is IRQ and input 1 is FIQ. */
24 static void arm_pic_cpu_handler(void *opaque
, int irq
, int level
)
26 CPUState
*env
= (CPUState
*)opaque
;
30 cpu_interrupt(env
, CPU_INTERRUPT_HARD
);
32 cpu_reset_interrupt(env
, CPU_INTERRUPT_HARD
);
36 cpu_interrupt(env
, CPU_INTERRUPT_FIQ
);
38 cpu_reset_interrupt(env
, CPU_INTERRUPT_FIQ
);
41 cpu_abort(env
, "arm_pic_cpu_handler: Bad interrput line %d\n", irq
);
45 qemu_irq
*arm_pic_init_cpu(CPUState
*env
)
47 return qemu_allocate_irqs(arm_pic_cpu_handler
, env
, 2);