Reputation: 48
I've read in an article from OSDev Wiki than the IRQ #1 matches keyboard. But how does PIC know a keyboard is a keyboard, and then it should be mapped to IRQ #1?
Upvotes: 3
Views: 259
Reputation: 3675
On systems with BIOS and USB the BIOS contains a USB keyboard driver that runs in System Management Mode and feeds keyboard events to the keyboard interface thereby simulating a physical PS2 keyboard.
Upvotes: -1
Reputation: 92976
The PIC doesn't know about this at all. It just triggers an IRQ 1 if it gets a signal on its IRQ 1 pin. This pin is connected to the keyboard controller on the mainboard, so when the keyboard controller issues an interrupt it is received by the PIC. Of course in modern PC compatibles, all these wires are part of a highly integrated super IO chip and not actually visible to the naked eye.
So to answer your question: the PIC knows because there is a wire from the keyboard controller to the PIC.
Upvotes: 8