Skip to contentSkip to conversation

Patch: PIC-i8259 mode transition wrong

Qemu-devel Bernhard Kauer 1 participant 1 message Jul 31, 2007

lore
Share & tools
lore
#0 lore raw

The PIC initilization should respect the fourth byte init bit in single mode.

Bernhard Kauer

Index: hw/i8259.c
===================================================================
RCS file: /sources/qemu/qemu/hw/i8259.c,v
retrieving revision 1.22

i8259.c +1 -1
diff -u -r1.22 i8259.c
@@ -351,7 +351,7 @@
             break;
         case 1:
             s->irq_base = val & 0xf8;
-            s->init_state = s->single_mode && s->init4 ? 3 : 2;
+            s->init_state = s->single_mode ? (s->init4 ? 3 : 0) : 2;
             break;
         case 2:
             if (s->init4) {