Author: hbelusca Date: Thu Aug 13 16:51:40 2015 New Revision: 68707
URL: http://svn.reactos.org/svn/reactos?rev=68707&view=rev Log: [NTVDM] - Improve PS/2 keyboard initialization in BIOS POST. - Forgot two "breaks;" in error code paths.
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/moubios32.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios/... ============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] Thu Aug 13 16:51:40 2015 @@ -779,11 +779,13 @@ /* Initialize PS/2 keyboard port */ // Enable the port IOWriteB(PS2_CONTROL_PORT, 0xAE); - IOWriteB(PS2_CONTROL_PORT, 0x60); // Port interrupts and clock enabled, // enable keyboard scancode translation. // POST passed, force keyboard unlocking. - IOWriteB(PS2_DATA_PORT , 0x4D); + IOWriteB(PS2_CONTROL_PORT, 0x60); + IOWriteB(PS2_DATA_PORT , 0x6D); + // Enable data reporting + IOWriteB(PS2_DATA_PORT , 0xF4);
EnableHwIRQ(0, BiosTimerIrq); }
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/moubios32.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios/... ============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/moubios32.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/moubios32.c [iso-8859-1] Thu Aug 13 16:51:40 2015 @@ -223,7 +223,7 @@
SendMouseCommand(0xFF); Answer = ReadMouseData(); - /* A "Resend" (0xFE) signal is sent if no mouse is attached */ + /* A "Resend" signal (0xFE) is sent if no mouse is attached */ if (Answer == 0xFE) { /* Resend */ @@ -376,6 +376,7 @@ /* Failure */ setAH(0x03); Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF; + break; }
setBL(ReadMouseData()); // Status @@ -399,6 +400,7 @@ /* Failure */ setAH(0x03); Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF; + break; }
/* Success */ @@ -490,7 +492,7 @@ /* Detect mouse presence by attempting a reset */ SendMouseCommand(0xFF); Answer = ReadMouseData(); - /* If no mouse attached, it will return RESEND (0xFE) */ + /* A "Resend" signal (0xFE) is sent if no mouse is attached */ if (Answer == 0xFE) { DPRINT1("No mouse present!\n");