From f92b8ee3b7a621d0db8708ec05ee13639436b4a9 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Sun, 9 Sep 2018 22:29:56 +0800 Subject: IntelFrameworkModulePkg: Avoid key notification called more than once REF: https://bugzilla.tianocore.org/show_bug.cgi?id=996 Issue: In current code logic, when a key is pressed, it will search the whole NotifyList to find whether a notification has been registered with the keystroke. if yes, it will en-queue the key for notification execution later. And now if different notification functions have been registered with the same key, then the key will be en-queued more than once. Then it will cause the notification executed more than once. This patch is to enhance the code logic to fix this issue. Cc: Ruiyu Ni Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi Reviewed-by: Ruiyu Ni --- IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c | 1 + IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c | 1 + 2 files changed, 2 insertions(+) (limited to 'IntelFrameworkModulePkg') diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c index 202588191e..fddb0b21fb 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c @@ -1487,6 +1487,7 @@ KeyGetchar ( // PushEfikeyBufTail (&ConsoleIn->EfiKeyQueueForNotify, &KeyData); gBS->SignalEvent (ConsoleIn->KeyNotifyProcessEvent); + break; } } diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c index 63f6303995..bee5f8f5e5 100644 --- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c @@ -1986,6 +1986,7 @@ BiosKeyboardTimerHandler ( // Enqueue (&BiosKeyboardPrivate->QueueForNotify, &KeyData); gBS->SignalEvent (BiosKeyboardPrivate->KeyNotifyProcessEvent); + break; } } -- cgit v1.2.3