Change the Keyboard thunk driver to remove DevicePath reference.

Signed-off-by: niruiyu
Reviewed-by: jyao1

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12548 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu 2011-10-19 03:21:15 +00:00
parent 26a74a36c1
commit 55d4edfbb3
2 changed files with 16 additions and 31 deletions

View File

@ -279,19 +279,12 @@ BiosKeyboardDriverBindingStart (
BiosKeyboardPrivate->SimpleTextInputEx.UnregisterKeyNotify = BiosKeyboardUnregisterKeyNotify;
InitializeListHead (&BiosKeyboardPrivate->NotifyList);
Status = gBS->HandleProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
(VOID **) &BiosKeyboardPrivate->DevicePath
);
//
// Report that the keyboard is being enabled
//
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_ENABLE,
BiosKeyboardPrivate->DevicePath
EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_ENABLE
);
//
@ -350,10 +343,9 @@ BiosKeyboardDriverBindingStart (
//
// Report a Progress Code for an attempt to detect the precense of the keyboard device in the system
//
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_PRESENCE_DETECT,
BiosKeyboardPrivate->DevicePath
EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_PRESENCE_DETECT
);
//
@ -454,10 +446,9 @@ Done:
//
// Report an Error Code for failing to start the keyboard device
//
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
StatusCode,
BiosKeyboardPrivate->DevicePath
StatusCode
);
}
@ -1011,19 +1002,17 @@ BiosKeyboardReset (
// 1
// Report reset progress code
//
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_RESET,
BiosKeyboardPrivate->DevicePath
EFI_PERIPHERAL_KEYBOARD | EFI_P_PC_RESET
);
//
// Report a Progress Code for clearing the keyboard buffer
//
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_CLEAR_BUFFER,
BiosKeyboardPrivate->DevicePath
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_CLEAR_BUFFER
);
//
@ -1115,10 +1104,9 @@ BiosKeyboardReset (
//
// Report a Progress Code for performing a self test on the keyboard controller
//
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST,
BiosKeyboardPrivate->DevicePath
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST
);
Status = KeyboardCommand (
@ -1681,10 +1669,9 @@ CheckKeyboardConnect (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Keyboard enable failed!\n"));
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR,
BiosKeyboardPrivate->DevicePath
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR
);
return FALSE;
}
@ -1697,10 +1684,9 @@ CheckKeyboardConnect (
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Timeout!\n"));
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR,
BiosKeyboardPrivate->DevicePath
EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR
);
return FALSE;
}

View File

@ -219,7 +219,6 @@ typedef struct {
UINT16 StatusRegisterAddress;
UINT16 CommandRegisterAddress;
BOOLEAN ExtendedKeyboard;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
//
// Buffer storing EFI_KEY_DATA