ps2kb intr fix missed key presses by sending early EOI
This commit is contained in:
@ -215,6 +215,7 @@ void intr_handleintr(IntrStackFrame *frame) {
|
|||||||
break;
|
break;
|
||||||
case INTR_IRQBASE+1:
|
case INTR_IRQBASE+1:
|
||||||
int32_t c = ps2kb_intr();
|
int32_t c = ps2kb_intr();
|
||||||
|
intr_eoi(frame->trapnum - INTR_IRQBASE);
|
||||||
if (c >= 0) {
|
if (c >= 0) {
|
||||||
uint8_t *bytes = (uint8_t *)&c;
|
uint8_t *bytes = (uint8_t *)&c;
|
||||||
spinlock_acquire(&PS2KB_BUF.spinlock);
|
spinlock_acquire(&PS2KB_BUF.spinlock);
|
||||||
@ -223,7 +224,6 @@ void intr_handleintr(IntrStackFrame *frame) {
|
|||||||
}
|
}
|
||||||
spinlock_release(&PS2KB_BUF.spinlock);
|
spinlock_release(&PS2KB_BUF.spinlock);
|
||||||
}
|
}
|
||||||
intr_eoi(frame->trapnum - INTR_IRQBASE);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (frame->trapnum == 0x80) {
|
} else if (frame->trapnum == 0x80) {
|
||||||
|
Reference in New Issue
Block a user