aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc.c')
-rw-r--r--hw/ppc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/hw/ppc.c b/hw/ppc.c
index 273c75f026..44555bd634 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -31,8 +31,7 @@ extern int loglevel;
/* PowerPC internal fake IRQ controller
* used to manage multiple sources hardware events
*/
-/* XXX: should be protected */
-void ppc_set_irq (void *opaque, int n_IRQ, int level)
+static void ppc_set_irq (void *opaque, int n_IRQ, int level)
{
CPUState *env;
@@ -51,6 +50,17 @@ void ppc_set_irq (void *opaque, int n_IRQ, int level)
#endif
}
+void cpu_ppc_irq_init_cpu(CPUState *env)
+{
+ qemu_irq *qi;
+ int i;
+
+ qi = qemu_allocate_irqs(ppc_set_irq, env, 32);
+ for (i = 0; i < 32; i++) {
+ env->irq[i] = qi[i];
+ }
+}
+
/* External IRQ callback from OpenPIC IRQ controller */
void ppc_openpic_irq (void *opaque, int n_IRQ, int level)
{