> I wonder how much abstraction is living in the BIOS and hardware bits to make this work, vs those I/O ports literally being a direct interface to the PS/2 keyboard.
Depends on that Legacy USB flag. For a real PS/2 device that I/O port is a pretty direct line to a microcontroller living on the southbridge (or a Super I/O chip sitting off of an LPC bus) that babysits the PS/2 bus. But with that Legacy USB flag enabled it's a trap to System Management Mode to emulate it the same way an I/O port access in user space might trap into the kernel.
Depends on that Legacy USB flag. For a real PS/2 device that I/O port is a pretty direct line to a microcontroller living on the southbridge (or a Super I/O chip sitting off of an LPC bus) that babysits the PS/2 bus. But with that Legacy USB flag enabled it's a trap to System Management Mode to emulate it the same way an I/O port access in user space might trap into the kernel.