ps2kb intr fix missed key presses by sending early EOI

This commit is contained in:
2025-09-18 11:45:56 +02:00
parent 9e9d2c5190
commit 024a5b2e21

View File

@ -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) {