summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c')
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
index 76779553cd..401b0e8c20 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
@@ -2,7 +2,7 @@
Routines implements SIMPLE_TEXT_IN protocol's interfaces based on 8042 interfaces
provided by Ps2KbdCtrller.c.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -165,6 +165,10 @@ KeyboardReadKeyStrokeWorker (
Status = EFI_DEVICE_ERROR;
} else {
Status = PopEfikeyBufHead (&ConsoleInDev->EfiKeyQueue, KeyData);
+ if (Status == EFI_NOT_READY) {
+ ZeroMem (&KeyData->Key, sizeof (KeyData->Key));
+ InitializeKeyState (ConsoleInDev, &KeyData->KeyState);
+ }
}
gBS->RestoreTPL (OldTpl);