Install default keyboard layout package in USB keyboard driver.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8056 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2009-04-10 04:28:13 +00:00
parent 7b06dc8a91
commit c41c3e55d5
5 changed files with 231 additions and 143 deletions

View File

@@ -256,7 +256,7 @@ USBKeyboardDriverBindingStart (
UsbKeyboardDevice->SimpleInputEx.ReadKeyStrokeEx = USBKeyboardReadKeyStrokeEx;
UsbKeyboardDevice->SimpleInputEx.SetState = USBKeyboardSetState;
UsbKeyboardDevice->SimpleInputEx.RegisterKeyNotify = USBKeyboardRegisterKeyNotify;
UsbKeyboardDevice->SimpleInputEx.UnregisterKeyNotify = USBKeyboardUnregisterKeyNotify;
UsbKeyboardDevice->SimpleInputEx.UnregisterKeyNotify = USBKeyboardUnregisterKeyNotify;
InitializeListHead (&UsbKeyboardDevice->NotifyList);
@@ -279,12 +279,6 @@ USBKeyboardDriverBindingStart (
UsbKeyboardDevice,
&(UsbKeyboardDevice->SimpleInput.WaitForKey)
);
if (EFI_ERROR (Status)) {
goto ErrorExit;
}
Status = InitKeyboardLayout (UsbKeyboardDevice);
if (EFI_ERROR (Status)) {
goto ErrorExit;
}
@@ -308,6 +302,21 @@ USBKeyboardDriverBindingStart (
goto ErrorExit;
}
UsbKeyboardDevice->ControllerHandle = Controller;
Status = InitKeyboardLayout (UsbKeyboardDevice);
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
Controller,
&gEfiSimpleTextInProtocolGuid,
&UsbKeyboardDevice->SimpleInput,
&gEfiSimpleTextInputExProtocolGuid,
&UsbKeyboardDevice->SimpleInputEx,
NULL
);
goto ErrorExit;
}
//
// Reset USB Keyboard Device exhaustively.
//