"8042" PS/2 Controller: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
m (Added explanation to words about controller initialization)
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
(One intermediate revision by one other user not shown)
Line 321:
Some people assume the PS/2 controller exists and was configured correctly by firmware. This approach can work, but isn't very robust and doesn't correctly support "less simple" scenarios. Examples of why this approach may not work well include:
* Something (e.g. a Boot Manager) left the PS/2 Controller in a dodgy state
* The PS/2 Controller has hardware faults and your OS did no testing ([https://wiki.osdev.org/Boot_Sequence#POST POST])
* There's a USB keyboard and a PS/2 mouse, and the BIOS didn't bother initialising the PS/2 controller because it was using USB Legacy Support and not using the mouse
* You want to reliably send data to the second PS/2 device on older hardware and have to know the second PS/2 port exists (see the warning for "Sending Bytes To The Second PS/2 Port" below).
Line 513:
== CPU Reset ==
To trigger a CPU Reset, regardless of what state the CPU is in, write the value 0xFE to the Output port.
<sourcesyntaxhighlight lang="asm">
;Wait for a empty Input Buffer
wait1:
Line 523:
mov al, 0xFE
out 0x64, al
</syntaxhighlight>
</source>
 
==See Also==