]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg: Avoid key notification called more than once
authorDandan Bi <dandan.bi@intel.com>
Sun, 9 Sep 2018 14:29:56 +0000 (22:29 +0800)
committerEric Dong <eric.dong@intel.com>
Fri, 14 Sep 2018 02:18:31 +0000 (10:18 +0800)
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 <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c

index 202588191e3dd310fbcfe74f6ae8c57dfb70082b..fddb0b21fb3870fb707710007462e61f85cefd36 100644 (file)
@@ -1487,6 +1487,7 @@ KeyGetchar (
       //\r
       PushEfikeyBufTail (&ConsoleIn->EfiKeyQueueForNotify, &KeyData);\r
       gBS->SignalEvent (ConsoleIn->KeyNotifyProcessEvent);\r
+      break;\r
     }\r
   }\r
 \r
index 63f6303995c7c0ae139ef3bc24ef99d1905e86f7..bee5f8f5e5f241715a4957c0193c8e4bda7aa6ac 100644 (file)
@@ -1986,6 +1986,7 @@ BiosKeyboardTimerHandler (
       //\r
       Enqueue (&BiosKeyboardPrivate->QueueForNotify, &KeyData);\r
       gBS->SignalEvent (BiosKeyboardPrivate->KeyNotifyProcessEvent);\r
+      break;\r
     }\r
   }\r
 \r