Author: blueswirl Date: 2008-08-09 14:52:34 +0200 (Sat, 09 Aug 2008) New Revision: 224
Modified: openbios-devel/arch/sparc64/console.c Log: Switch keyboard controller to translated mode so it works as expected
Modified: openbios-devel/arch/sparc64/console.c =================================================================== --- openbios-devel/arch/sparc64/console.c 2008-08-06 23:24:48 UTC (rev 223) +++ openbios-devel/arch/sparc64/console.c 2008-08-09 12:52:34 UTC (rev 224) @@ -309,6 +309,15 @@ while (inb(0x64) & 2); }
+static void keyboard_controller_cmd(unsigned char cmd, unsigned char val) +{ + outb(cmd, 0x64); + /* wait until keyboard controller accepts cmds: */ + while (inb(0x64) & 2); + outb(val, 0x60); + while (inb(0x64) & 2); +} + static char keyboard_poll(void) { unsigned int c; @@ -575,4 +584,6 @@ fword("encode-int"); push_str("stdout"); fword("property"); + + keyboard_controller_cmd(0x60, 0x40); // Write mode command, translated mode }