Add PcdFastPS2Detection to improve PS2 keyboard driver start performance.

Signed-off-by: Li Elvin <elvin.li@intel.com>
Reviewed-by: Yao Jiewen<jiewen.yao@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13820 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin
2012-10-11 07:01:22 +00:00
parent e8c758dc92
commit 4ccfd30544
6 changed files with 253 additions and 226 deletions

View File

@ -263,15 +263,17 @@ KbdControllerDriverStart (
//
// Return code is ignored on purpose.
//
KeyboardRead (ConsoleIn, &Data);
if ((KeyReadStatusRegister (ConsoleIn) & (KBC_PARE | KBC_TIM)) == (KBC_PARE | KBC_TIM)) {
//
// If nobody decodes KBC I/O port, it will read back as 0xFF.
// Check the Time-Out and Parity bit to see if it has an active KBC in system
//
Status = EFI_DEVICE_ERROR;
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED;
goto ErrorExit;
if (!PcdGetBool (PcdFastPS2Detection)) {
KeyboardRead (ConsoleIn, &Data);
if ((KeyReadStatusRegister (ConsoleIn) & (KBC_PARE | KBC_TIM)) == (KBC_PARE | KBC_TIM)) {
//
// If nobody decodes KBC I/O port, it will read back as 0xFF.
// Check the Time-Out and Parity bit to see if it has an active KBC in system
//
Status = EFI_DEVICE_ERROR;
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED;
goto ErrorExit;
}
}
//