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:
@ -1519,16 +1519,18 @@ InitKeyboard (
|
|||||||
// Perform a read to cleanup the Status Register's
|
// Perform a read to cleanup the Status Register's
|
||||||
// output buffer full bits within MAX TRY times
|
// output buffer full bits within MAX TRY times
|
||||||
//
|
//
|
||||||
while (!EFI_ERROR (Status) && TryTime < KEYBOARD_MAX_TRY) {
|
if ((KeyReadStatusRegister (ConsoleIn) & KEYBOARD_STATUS_REGISTER_HAS_OUTPUT_DATA)) {
|
||||||
Status = KeyboardRead (ConsoleIn, &CommandByte);
|
while (!EFI_ERROR (Status) && TryTime < KEYBOARD_MAX_TRY) {
|
||||||
TryTime ++;
|
Status = KeyboardRead (ConsoleIn, &CommandByte);
|
||||||
}
|
TryTime ++;
|
||||||
//
|
}
|
||||||
// Exceed the max try times. The device may be error.
|
//
|
||||||
//
|
// Exceed the max try times. The device may be error.
|
||||||
if (TryTime == KEYBOARD_MAX_TRY) {
|
//
|
||||||
Status = EFI_DEVICE_ERROR;
|
if (TryTime == KEYBOARD_MAX_TRY) {
|
||||||
goto Done;
|
Status = EFI_DEVICE_ERROR;
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// We should disable mouse interface during the initialization process
|
// We should disable mouse interface during the initialization process
|
||||||
@ -1543,34 +1545,37 @@ InitKeyboard (
|
|||||||
// time initialization
|
// time initialization
|
||||||
//
|
//
|
||||||
if ((KeyReadStatusRegister (ConsoleIn) & KEYBOARD_STATUS_REGISTER_SYSTEM_FLAG) != 0) {
|
if ((KeyReadStatusRegister (ConsoleIn) & KEYBOARD_STATUS_REGISTER_SYSTEM_FLAG) != 0) {
|
||||||
//
|
if (!PcdGetBool (PcdFastPS2Detection)) {
|
||||||
// 8042 controller is already setup (by myself or by mouse driver):
|
//
|
||||||
// See whether mouse interface is already enabled
|
// 8042 controller is already setup (by myself or by mouse driver):
|
||||||
// which determines whether we should enable it later
|
// See whether mouse interface is already enabled
|
||||||
//
|
// which determines whether we should enable it later
|
||||||
//
|
//
|
||||||
// Read the command byte of 8042 controller
|
//
|
||||||
//
|
// Read the command byte of 8042 controller
|
||||||
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_READ);
|
//
|
||||||
if (EFI_ERROR (Status)) {
|
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_READ);
|
||||||
KeyboardError (ConsoleIn, L"\n\r");
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
KeyboardError (ConsoleIn, L"\n\r");
|
||||||
}
|
goto Done;
|
||||||
|
}
|
||||||
Status = KeyboardRead (ConsoleIn, &CommandByte);
|
|
||||||
if (EFI_ERROR (Status)) {
|
Status = KeyboardRead (ConsoleIn, &CommandByte);
|
||||||
KeyboardError (ConsoleIn, L"\n\r");
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
KeyboardError (ConsoleIn, L"\n\r");
|
||||||
}
|
goto Done;
|
||||||
//
|
}
|
||||||
// Test the mouse enabling bit
|
//
|
||||||
//
|
// Test the mouse enabling bit
|
||||||
if ((CommandByte & 0x20) != 0) {
|
//
|
||||||
mEnableMouseInterface = FALSE;
|
if ((CommandByte & 0x20) != 0) {
|
||||||
|
mEnableMouseInterface = FALSE;
|
||||||
|
} else {
|
||||||
|
mEnableMouseInterface = TRUE;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mEnableMouseInterface = TRUE;
|
mEnableMouseInterface = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// 8042 controller is not setup yet:
|
// 8042 controller is not setup yet:
|
||||||
@ -1580,36 +1585,38 @@ InitKeyboard (
|
|||||||
//
|
//
|
||||||
// Disable keyboard and mouse interfaces
|
// Disable keyboard and mouse interfaces
|
||||||
//
|
//
|
||||||
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_DISABLE_KEYBOARD_INTERFACE);
|
if (!PcdGetBool (PcdFastPS2Detection)) {
|
||||||
if (EFI_ERROR (Status)) {
|
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_DISABLE_KEYBOARD_INTERFACE);
|
||||||
KeyboardError (ConsoleIn, L"\n\r");
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
KeyboardError (ConsoleIn, L"\n\r");
|
||||||
}
|
goto Done;
|
||||||
|
}
|
||||||
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_DISABLE_MOUSE_INTERFACE);
|
|
||||||
if (EFI_ERROR (Status)) {
|
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_DISABLE_MOUSE_INTERFACE);
|
||||||
KeyboardError (ConsoleIn, L"\n\r");
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
KeyboardError (ConsoleIn, L"\n\r");
|
||||||
}
|
goto Done;
|
||||||
|
}
|
||||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
|
||||||
EFI_PROGRESS_CODE,
|
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||||
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST,
|
EFI_PROGRESS_CODE,
|
||||||
ConsoleIn->DevicePath
|
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST,
|
||||||
);
|
ConsoleIn->DevicePath
|
||||||
//
|
);
|
||||||
// 8042 Controller Self Test
|
//
|
||||||
//
|
// 8042 Controller Self Test
|
||||||
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_CONTROLLER_SELF_TEST);
|
//
|
||||||
if (EFI_ERROR (Status)) {
|
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_CONTROLLER_SELF_TEST);
|
||||||
KeyboardError (ConsoleIn, L"8042 controller command write error!\n\r");
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
KeyboardError (ConsoleIn, L"8042 controller command write error!\n\r");
|
||||||
}
|
goto Done;
|
||||||
|
}
|
||||||
Status = KeyboardWaitForValue (ConsoleIn, 0x55);
|
|
||||||
if (EFI_ERROR (Status)) {
|
Status = KeyboardWaitForValue (ConsoleIn, 0x55);
|
||||||
KeyboardError (ConsoleIn, L"8042 controller self test failed!\n\r");
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
KeyboardError (ConsoleIn, L"8042 controller self test failed!\n\r");
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Don't enable mouse interface later
|
// Don't enable mouse interface later
|
||||||
@ -1865,34 +1872,37 @@ CheckKeyboardConnect (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN WaitForValueTimeOutBcakup;
|
UINTN WaitForValueTimeOutBcakup;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
|
||||||
//
|
//
|
||||||
// enable keyboard itself and wait for its ack
|
// enable keyboard itself and wait for its ack
|
||||||
// If can't receive ack, Keyboard should not be connected.
|
// If can't receive ack, Keyboard should not be connected.
|
||||||
//
|
//
|
||||||
Status = KeyboardWrite (
|
if (!PcdGetBool (PcdFastPS2Detection)) {
|
||||||
ConsoleIn,
|
Status = KeyboardWrite (
|
||||||
KEYBOARD_KBEN
|
ConsoleIn,
|
||||||
);
|
KEYBOARD_KBEN
|
||||||
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return FALSE;
|
if (EFI_ERROR (Status)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// wait for 1s
|
||||||
|
//
|
||||||
|
WaitForValueTimeOutBcakup = mWaitForValueTimeOut;
|
||||||
|
mWaitForValueTimeOut = KEYBOARD_WAITFORVALUE_TIMEOUT;
|
||||||
|
Status = KeyboardWaitForValue (
|
||||||
|
ConsoleIn,
|
||||||
|
KEYBOARD_CMDECHO_ACK
|
||||||
|
);
|
||||||
|
mWaitForValueTimeOut = WaitForValueTimeOutBcakup;
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// wait for 1s
|
|
||||||
//
|
|
||||||
WaitForValueTimeOutBcakup = mWaitForValueTimeOut;
|
|
||||||
mWaitForValueTimeOut = KEYBOARD_WAITFORVALUE_TIMEOUT;
|
|
||||||
Status = KeyboardWaitForValue (
|
|
||||||
ConsoleIn,
|
|
||||||
KEYBOARD_CMDECHO_ACK
|
|
||||||
);
|
|
||||||
mWaitForValueTimeOut = WaitForValueTimeOutBcakup;
|
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,15 +263,17 @@ KbdControllerDriverStart (
|
|||||||
//
|
//
|
||||||
// Return code is ignored on purpose.
|
// Return code is ignored on purpose.
|
||||||
//
|
//
|
||||||
KeyboardRead (ConsoleIn, &Data);
|
if (!PcdGetBool (PcdFastPS2Detection)) {
|
||||||
if ((KeyReadStatusRegister (ConsoleIn) & (KBC_PARE | KBC_TIM)) == (KBC_PARE | KBC_TIM)) {
|
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
|
// 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;
|
Status = EFI_DEVICE_ERROR;
|
||||||
goto ErrorExit;
|
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED;
|
||||||
|
goto ErrorExit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -68,6 +68,9 @@
|
|||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdFastPS2Detection
|
||||||
|
|
||||||
# [Event]
|
# [Event]
|
||||||
# ##
|
# ##
|
||||||
# # Event will be signaled for WaitForKey event.
|
# # Event will be signaled for WaitForKey event.
|
||||||
|
@ -1037,95 +1037,96 @@ BiosKeyboardReset (
|
|||||||
// if not skip step 4&5 and jump to step 6 to selftest KBC and report this
|
// if not skip step 4&5 and jump to step 6 to selftest KBC and report this
|
||||||
// else go step 4
|
// else go step 4
|
||||||
//
|
//
|
||||||
if ((KeyReadStatusRegister (BiosKeyboardPrivate) & KBC_STSREG_VIA64_SYSF) != 0) {
|
if (!PcdGetBool (PcdFastPS2Detection)) {
|
||||||
//
|
if ((KeyReadStatusRegister (BiosKeyboardPrivate) & KBC_STSREG_VIA64_SYSF) != 0) {
|
||||||
// 4
|
//
|
||||||
// CheckMouseStatus to decide enable it later or not
|
// 4
|
||||||
//
|
// CheckMouseStatus to decide enable it later or not
|
||||||
//
|
//
|
||||||
// Read the command byte of KBC
|
//
|
||||||
//
|
// Read the command byte of KBC
|
||||||
Status = KeyboardCommand (
|
//
|
||||||
BiosKeyboardPrivate,
|
Status = KeyboardCommand (
|
||||||
KBC_CMDREG_VIA64_CMDBYTE_R
|
BiosKeyboardPrivate,
|
||||||
);
|
KBC_CMDREG_VIA64_CMDBYTE_R
|
||||||
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
Status = EFI_DEVICE_ERROR;
|
||||||
}
|
goto Exit;
|
||||||
|
}
|
||||||
Status = KeyboardRead (
|
|
||||||
BiosKeyboardPrivate,
|
Status = KeyboardRead (
|
||||||
&CommandByte
|
BiosKeyboardPrivate,
|
||||||
);
|
&CommandByte
|
||||||
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
Status = EFI_DEVICE_ERROR;
|
||||||
}
|
goto Exit;
|
||||||
//
|
}
|
||||||
// Check mouse enabled or not before
|
//
|
||||||
//
|
// Check mouse enabled or not before
|
||||||
if ((CommandByte & KB_CMMBYTE_DISABLE_AUX) != 0) {
|
//
|
||||||
MouseEnable = FALSE;
|
if ((CommandByte & KB_CMMBYTE_DISABLE_AUX) != 0) {
|
||||||
|
MouseEnable = FALSE;
|
||||||
|
} else {
|
||||||
|
MouseEnable = TRUE;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// 5
|
||||||
|
// disable mouse (via KBC) and Keyborad device
|
||||||
|
//
|
||||||
|
Status = KeyboardCommand (
|
||||||
|
BiosKeyboardPrivate,
|
||||||
|
KBC_CMDREG_VIA64_AUX_DISABLE
|
||||||
|
);
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
Status = EFI_DEVICE_ERROR;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = KeyboardCommand (
|
||||||
|
BiosKeyboardPrivate,
|
||||||
|
KBC_CMDREG_VIA64_KB_DISABLE
|
||||||
|
);
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
Status = EFI_DEVICE_ERROR;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
MouseEnable = TRUE;
|
//
|
||||||
}
|
// 6
|
||||||
//
|
// KBC Self Test
|
||||||
// 5
|
//
|
||||||
// disable mouse (via KBC) and Keyborad device
|
//
|
||||||
//
|
// Report a Progress Code for performing a self test on the keyboard controller
|
||||||
Status = KeyboardCommand (
|
//
|
||||||
BiosKeyboardPrivate,
|
REPORT_STATUS_CODE (
|
||||||
KBC_CMDREG_VIA64_AUX_DISABLE
|
EFI_PROGRESS_CODE,
|
||||||
);
|
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST
|
||||||
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
Status = KeyboardCommand (
|
||||||
goto Exit;
|
BiosKeyboardPrivate,
|
||||||
}
|
KBC_CMDREG_VIA64_KBC_SLFTEST
|
||||||
|
);
|
||||||
Status = KeyboardCommand (
|
if (EFI_ERROR (Status)) {
|
||||||
BiosKeyboardPrivate,
|
Status = EFI_DEVICE_ERROR;
|
||||||
KBC_CMDREG_VIA64_KB_DISABLE
|
goto Exit;
|
||||||
);
|
}
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
Status = KeyboardWaitForValue (
|
||||||
Status = EFI_DEVICE_ERROR;
|
BiosKeyboardPrivate,
|
||||||
goto Exit;
|
KBC_CMDECHO_KBCSLFTEST_OK,
|
||||||
}
|
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||||
|
);
|
||||||
} else {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
Status = EFI_DEVICE_ERROR;
|
||||||
// 6
|
goto Exit;
|
||||||
// KBC Self Test
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// Report a Progress Code for performing a self test on the keyboard controller
|
|
||||||
//
|
|
||||||
REPORT_STATUS_CODE (
|
|
||||||
EFI_PROGRESS_CODE,
|
|
||||||
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST
|
|
||||||
);
|
|
||||||
|
|
||||||
Status = KeyboardCommand (
|
|
||||||
BiosKeyboardPrivate,
|
|
||||||
KBC_CMDREG_VIA64_KBC_SLFTEST
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = KeyboardWaitForValue (
|
|
||||||
BiosKeyboardPrivate,
|
|
||||||
KBC_CMDECHO_KBCSLFTEST_OK,
|
|
||||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
goto Exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -1321,14 +1322,16 @@ BiosKeyboardReset (
|
|||||||
// Done for validating keyboard. Enable keyboard (via KBC)
|
// Done for validating keyboard. Enable keyboard (via KBC)
|
||||||
// and recover the command byte to proper value
|
// and recover the command byte to proper value
|
||||||
//
|
//
|
||||||
Status = KeyboardCommand (
|
if (!PcdGetBool (PcdFastPS2Detection)) {
|
||||||
BiosKeyboardPrivate,
|
Status = KeyboardCommand (
|
||||||
KBC_CMDREG_VIA64_KB_ENABLE
|
BiosKeyboardPrivate,
|
||||||
);
|
KBC_CMDREG_VIA64_KB_ENABLE
|
||||||
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
Status = EFI_DEVICE_ERROR;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1674,35 +1677,38 @@ CheckKeyboardConnect (
|
|||||||
// enable keyboard itself and wait for its ack
|
// enable keyboard itself and wait for its ack
|
||||||
// If can't receive ack, Keyboard should not be connected.
|
// If can't receive ack, Keyboard should not be connected.
|
||||||
//
|
//
|
||||||
Status = KeyboardWrite (
|
if (!PcdGetBool (PcdFastPS2Detection)) {
|
||||||
BiosKeyboardPrivate,
|
Status = KeyboardWrite (
|
||||||
KBC_INPBUF_VIA60_KBEN
|
BiosKeyboardPrivate,
|
||||||
);
|
KBC_INPBUF_VIA60_KBEN
|
||||||
if (EFI_ERROR (Status)) {
|
);
|
||||||
DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Keyboard enable failed!\n"));
|
if (EFI_ERROR (Status)) {
|
||||||
REPORT_STATUS_CODE (
|
DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Keyboard enable failed!\n"));
|
||||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
REPORT_STATUS_CODE (
|
||||||
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR
|
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||||
);
|
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR
|
||||||
return FALSE;
|
);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = KeyboardWaitForValue (
|
||||||
|
BiosKeyboardPrivate,
|
||||||
|
KBC_CMDECHO_ACK,
|
||||||
|
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||||
|
);
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Timeout!\n"));
|
||||||
|
REPORT_STATUS_CODE (
|
||||||
|
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||||
|
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR
|
||||||
|
);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = KeyboardWaitForValue (
|
|
||||||
BiosKeyboardPrivate,
|
|
||||||
KBC_CMDECHO_ACK,
|
|
||||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
|
||||||
);
|
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Timeout!\n"));
|
|
||||||
REPORT_STATUS_CODE (
|
|
||||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
|
||||||
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR
|
|
||||||
);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,4 +68,7 @@
|
|||||||
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification|FALSE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification|FALSE
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdFastPS2Detection
|
@ -219,4 +219,7 @@
|
|||||||
## The PCD is used to specify the high PMM (Post Memory Manager) size with bytes above 1MB.
|
## The PCD is used to specify the high PMM (Post Memory Manager) size with bytes above 1MB.
|
||||||
# The value should be a multiple of 4KB.
|
# The value should be a multiple of 4KB.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdHighPmmMemorySize|0x400000|UINT32|0x3000000a
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdHighPmmMemorySize|0x400000|UINT32|0x3000000a
|
||||||
|
|
||||||
|
## This PCD specifies whether to use the optimized timing for best PS2 detection performance.
|
||||||
|
# Note this PCD could be set to TRUE for best boot performance and set to FALSE for best device compatibility.
|
||||||
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdFastPS2Detection|FALSE|BOOLEAN|0x3000000b
|
Reference in New Issue
Block a user