Reviewed-by: Ruiyu Ni <ruiyu...@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Bi, Dandan
> Sent: Monday, September 10, 2018 3:12 PM
> To: edk2-devel@lists.01.org
> Cc: Bi, Dandan <dandan...@intel.com>; Ni, Ruiyu <ruiyu...@intel.com>; Gao,
> Liming <liming....@intel.com>
> Subject: [patch 2/3] IntelFrameworkModulePkg: Avoid key notification called
> more than once
> 
> From: Dandan Bi <dandan...@intel.com>
> 
> 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...@intel.com>
> Cc: Liming Gao <liming....@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan...@intel.com>
> ---
>  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c   | 1 +
>  IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
> | 1 +
>  2 files changed, 2 insertions(+)
> 
> 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
> @@ -1485,10 +1485,11 @@ KeyGetchar (
>        // while current TPL is TPL_NOTIFY. It will be invoked in
>        // KeyNotifyProcessHandler() which runs at TPL_CALLBACK.
>        //
>        PushEfikeyBufTail (&ConsoleIn->EfiKeyQueueForNotify, &KeyData);
>        gBS->SignalEvent (ConsoleIn->KeyNotifyProcessEvent);
> +      break;
>      }
>    }
> 
>    PushEfikeyBufTail (&ConsoleIn->EfiKeyQueue, &KeyData);  } 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
> @@ -1984,10 +1984,11 @@ BiosKeyboardTimerHandler (
>        // while current TPL is TPL_NOTIFY. It will be invoked in
>        // KeyNotifyProcessHandler() which runs at TPL_CALLBACK.
>        //
>        Enqueue (&BiosKeyboardPrivate->QueueForNotify, &KeyData);
>        gBS->SignalEvent (BiosKeyboardPrivate->KeyNotifyProcessEvent);
> +      break;
>      }
>    }
> 
>    Enqueue (&BiosKeyboardPrivate->Queue, &KeyData);
> 
> --
> 2.14.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to