The PIC now correctly processes slave interrupts in XT mode as well, fixes PS/2 mouse on the Xi8088, fixes #2045.
This commit is contained in:
15
src/pic.c
15
src/pic.c
@@ -724,10 +724,25 @@ pic_irq_ack(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Needed for Xi8088. */
|
||||
if ((pic.ack_bytes == 0) && pic.int_pending && pic_slave_on(&pic, pic.interrupt)) {
|
||||
if (!pic.slaves[pic.interrupt]->int_pending) {
|
||||
/* If we are on AT, IRQ 2 is pending, and we cannot find a pending IRQ on PIC 2, fatal out. */
|
||||
fatal("IRQ %i pending on AT without a pending IRQ on PIC %i (normal)\n", pic.interrupt, pic.interrupt);
|
||||
exit(-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
pic.interrupt |= 0x40; /* Mark slave pending. */
|
||||
}
|
||||
|
||||
ret = pic_irq_ack_read(&pic, pic.ack_bytes);
|
||||
pic.ack_bytes = (pic.ack_bytes + 1) % (pic_i86_mode(&pic) ? 2 : 3);
|
||||
|
||||
if (pic.ack_bytes == 0) {
|
||||
/* Needed for Xi8088. */
|
||||
if (pic.interrupt & 0x40)
|
||||
pic2.interrupt = 0x17;
|
||||
pic.interrupt = 0x17;
|
||||
update_pending();
|
||||
}
|
||||
|
Reference in New Issue
Block a user