diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-07-23 19:05:37 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-07-23 19:05:37 +0000 |
commit | d592d3033d7bc41db6159e9387591a216e3c46e0 (patch) | |
tree | 8f06d19fb1c8d94005c991d8523e62a2d71f145f /hw/i8259.c | |
parent | 1ff5c1a68e2784722b66ecc40e30908e87e28a3b (diff) | |
download | qemu-d592d3033d7bc41db6159e9387591a216e3c46e0.zip qemu-d592d3033d7bc41db6159e9387591a216e3c46e0.tar.gz qemu-d592d3033d7bc41db6159e9387591a216e3c46e0.tar.bz2 |
IOAPIC support (initial patch by Filip Navara)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1520 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/i8259.c')
-rw-r--r-- | hw/i8259.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -55,6 +55,9 @@ struct PicState2 { PicState pics[2]; IRQRequestFunc *irq_request; void *irq_request_opaque; + /* IOAPIC callback support */ + SetIRQFunc *alt_irq_func; + void *alt_irq_opaque; }; #if defined(DEBUG_PIC) || defined (DEBUG_IRQ_COUNT) @@ -186,6 +189,9 @@ void pic_set_irq_new(void *opaque, int irq, int level) } #endif pic_set_irq1(&s->pics[irq >> 3], irq & 7, level); + /* used for IOAPIC irqs */ + if (s->alt_irq_func) + s->alt_irq_func(s->alt_irq_opaque, irq, level); pic_update_irq(s); } @@ -546,3 +552,10 @@ PicState2 *pic_init(IRQRequestFunc *irq_request, void *irq_request_opaque) s->pics[1].pics_state = s; return s; } + +void pic_set_alt_irq_func(PicState2 *s, SetIRQFunc *alt_irq_func, + void *alt_irq_opaque) +{ + s->alt_irq_func = alt_irq_func; + s->alt_irq_opaque = alt_irq_opaque; +} |