PS/2 Keyboard driver. Routines that interacts with callers,\r
conforming to EFI driver model\r
\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
);\r
\r
/**\r
- Stop this driver on ControllerHandle. Support stoping any child handles\r
+ Stop this driver on ControllerHandle. Support stopping any child handles\r
created by this driver.\r
\r
@param This Protocol instance pointer.\r
\r
//\r
// Fix for random hangs in System waiting for the Key if no KBC is present in BIOS.\r
+ // When KBC decode (IO port 0x60/0x64 decode) is not enabled, \r
+ // KeyboardRead will read back as 0xFF and return status is EFI_SUCCESS.\r
+ // So instead we read status register to detect after read if KBC decode is enabled.\r
//\r
- KeyboardRead (ConsoleIn, &Data);\r
- if ((KeyReadStatusRegister (ConsoleIn) & (KBC_PARE | KBC_TIM)) == (KBC_PARE | KBC_TIM)) {\r
- //\r
- // If nobody decodes KBC I/O port, it will read back as 0xFF.\r
- // Check the Time-Out and Parity bit to see if it has an active KBC in system\r
- //\r
- Status = EFI_DEVICE_ERROR;\r
- StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED;\r
- goto ErrorExit;\r
+ \r
+ //\r
+ // Return code is ignored on purpose.\r
+ //\r
+ if (!PcdGetBool (PcdFastPS2Detection)) {\r
+ KeyboardRead (ConsoleIn, &Data);\r
+ if ((KeyReadStatusRegister (ConsoleIn) & (KBC_PARE | KBC_TIM)) == (KBC_PARE | KBC_TIM)) {\r
+ //\r
+ // If nobody decodes KBC I/O port, it will read back as 0xFF.\r
+ // Check the Time-Out and Parity bit to see if it has an active KBC in system\r
+ //\r
+ Status = EFI_DEVICE_ERROR;\r
+ StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED;\r
+ goto ErrorExit;\r
+ }\r
}\r
\r
//\r
//\r
// Reset the keyboard device\r
//\r
- Status = ConsoleIn->ConInEx.Reset (&ConsoleIn->ConInEx, TRUE);\r
+ Status = ConsoleIn->ConInEx.Reset (&ConsoleIn->ConInEx, FeaturePcdGet (PcdPs2KbdExtendedVerification));\r
if (EFI_ERROR (Status)) {\r
Status = EFI_DEVICE_ERROR;\r
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED;\r
goto ErrorExit;\r
}\r
\r
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
+ EFI_PROGRESS_CODE,\r
+ EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_DETECTED,\r
+ ParentDevicePath\r
+ );\r
+\r
ConsoleIn->ControllerNameTable = NULL;\r
AddUnicodeString2 (\r
"eng",\r
}\r
\r
/**\r
- Stop this driver on ControllerHandle. Support stoping any child handles\r
+ Stop this driver on ControllerHandle. Support stopping any child handles\r
created by this driver.\r
\r
@param This Protocol instance pointer.\r