From 55d4edfbb39e200fe2caf494a5ee5a6a9707f7a0 Mon Sep 17 00:00:00 2001 From: niruiyu Date: Wed, 19 Oct 2011 03:21:15 +0000 Subject: 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 --- .../Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c | 46 ++++++++-------------- .../Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h | 1 - 2 files changed, 16 insertions(+), 31 deletions(-) (limited to 'IntelFrameworkModulePkg/Csm') diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c index 2729d0b441..2f732c7407 100644 --- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c @@ -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; } diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h index 5e9fdabaa8..8c40d11ef8 100644 --- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h @@ -219,7 +219,6 @@ typedef struct { UINT16 StatusRegisterAddress; UINT16 CommandRegisterAddress; BOOLEAN ExtendedKeyboard; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; // // Buffer storing EFI_KEY_DATA -- cgit v1.2.3