diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-29 15:54:52 -0700 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-29 15:59:16 -0700 |
commit | d0b482eb3e8cb699a2090bc773364d3a7d369a25 (patch) | |
tree | 1cf7d757ec81b83c463d489b087f3436940b9e92 /hw/i8259.c | |
parent | 6e93697bf74fe127356e98bceabf67597c0e1084 (diff) | |
download | external_qemu-d0b482eb3e8cb699a2090bc773364d3a7d369a25.zip external_qemu-d0b482eb3e8cb699a2090bc773364d3a7d369a25.tar.gz external_qemu-d0b482eb3e8cb699a2090bc773364d3a7d369a25.tar.bz2 |
Fix IRQ allocation for goldfish devices.
There were two issues fixed here:
1. IRQ allocation (for a device) has never been checked on going out of bounds.
2. In x86 platform some IRQs were reserved (for kbd, mouse, and exception), but IRQ allocation
for goldfish devices didn't check for those reserved IRQs being assigned to a device.
Change-Id: I9d48485d973bcc8fd8a3dd1b78fbfa6a05aeea22
Diffstat (limited to 'hw/i8259.c')
-rw-r--r-- | hw/i8259.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -25,6 +25,7 @@ #include "pc.h" #include "isa.h" #include "monitor.h" +#include "goldfish_device.h" /* debug PIC */ //#define DEBUG_PIC @@ -559,7 +560,7 @@ qemu_irq *i8259_init(qemu_irq parent_irq) s->pics[0].pics_state = s; s->pics[1].pics_state = s; isa_pic = s; - return qemu_allocate_irqs(i8259_set_irq, s, 16); + return qemu_allocate_irqs(i8259_set_irq, s, GFD_MAX_IRQ); } void pic_set_alt_irq_func(PicState2 *s, SetIRQFunc *alt_irq_func, |