summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkModulePkg/Bus
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-08 03:36:58 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-08 03:36:58 +0000
commit8a30d785c3c4dbb37cea8f96fad2bb951e9f4cd2 (patch)
treea505fd30b3e07e7e364bf709104db018af5f8764 /IntelFrameworkModulePkg/Bus
parent16a48731fcbf658569571490cbcc46df8d254bb7 (diff)
downloadedk2-8a30d785c3c4dbb37cea8f96fad2bb951e9f4cd2.tar.gz
edk2-8a30d785c3c4dbb37cea8f96fad2bb951e9f4cd2.tar.bz2
edk2-8a30d785c3c4dbb37cea8f96fad2bb951e9f4cd2.zip
Fixed issue that addition LEFT CTRL key was detected when press PAUSE key. PS2 keyboard driver should consume all bytes of scan code for PAUSE key.
Signed-off-by: vanjeff Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12298 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Bus')
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c21
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h2
2 files changed, 9 insertions, 14 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
index 93fdf6d94f..1b6ed43bd3 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
@@ -551,7 +551,7 @@ ConvertKeyboardScanCodeToEfiKey[] = {
0x0000
},
{
- 0x1D45, //Pause key
+ SCANCODE_PAUSE_MAKE, //Pause key
SCAN_PAUSE,
0x0000,
0x0000
@@ -1166,9 +1166,9 @@ KeyGetchar (
LIST_ENTRY *Link;
KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
//
- // 4 bytes most
+ // 6 bytes most
//
- UINT8 ScancodeArr[4];
+ UINT8 ScancodeArr[6];
UINT32 ScancodeArrPos;
//
@@ -1201,16 +1201,11 @@ KeyGetchar (
//
if (ScancodeArr[ScancodeArrPos] == SCANCODE_EXTENDED1) {
Extended1 = TRUE;
- Status = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 2, ScancodeArr);
- ScancodeArrPos = 1;
-
- if (EFI_ERROR (Status)) {
- return ;
- }
-
- Status = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 3, ScancodeArr);
- ScancodeArrPos = 2;
-
+ //
+ // Try to read the whole bytes of scancode for PAUSE key
+ //
+ Status = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 6, ScancodeArr);
+ ScancodeArrPos = 5;
if (EFI_ERROR (Status)) {
return ;
}
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
index cb6abb5204..2313a643cb 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
@@ -183,7 +183,7 @@ InstallPs2KeyboardDriver (
#define SCANCODE_SYS_REQ_MAKE 0x37
#define SCANCODE_MAX_MAKE 0x60
-#define SCANCODE_PAUSE_MAKE 0x1D45
+#define SCANCODE_PAUSE_MAKE 0x9DC5 // The last two bytes of scancode for PAUSE key
#define KEYBOARD_STATUS_REGISTER_HAS_OUTPUT_DATA BIT0 ///< 0 - Output register has no data; 1 - Output register has data
#define KEYBOARD_STATUS_REGISTER_HAS_INPUT_DATA BIT1 ///< 0 - Input register has no data; 1 - Input register has data