IntelFrameworkModulePkg Ps2KbDxe: Execute key notify func at TPL_CALLBACK

Current implementation executes key notify function in TimerHandler
at TPL_NOTIFY. The code change is to make key notify function
executed at TPL_CALLBACK to reduce the time occupied at TPL_NOTIFY.

The code will signal KeyNotify process event if the key pressed
matches any key registered and insert the KeyData to the EFI Key
queue for notify, then the KeyNotify process handler will invoke
key notify functions at TPL_CALLBACK.

Cc: Ruiyu Ni <Ruiyu.ni@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
This commit is contained in:
Star Zeng
2016-12-16 18:07:12 +08:00
parent 35dadd7c54
commit 7863d11c00
4 changed files with 98 additions and 5 deletions

View File

@ -104,6 +104,7 @@ typedef struct {
//
SCAN_CODE_QUEUE ScancodeQueue;
EFI_KEY_QUEUE EfiKeyQueue;
EFI_KEY_QUEUE EfiKeyQueueForNotify;
//
// Error state
@ -117,6 +118,7 @@ typedef struct {
// Notification Function List
//
LIST_ENTRY NotifyList;
EFI_EVENT KeyNotifyProcessEvent;
} KEYBOARD_CONSOLE_IN_DEV;
#define KEYBOARD_CONSOLE_IN_DEV_FROM_THIS(a) CR (a, KEYBOARD_CONSOLE_IN_DEV, ConIn, KEYBOARD_CONSOLE_IN_DEV_SIGNATURE)
@ -267,6 +269,19 @@ KeyGetchar (
IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
);
/**
Process key notify.
@param Event Indicates the event that invoke this function.
@param Context Indicates the calling context.
**/
VOID
EFIAPI
KeyNotifyProcessHandler (
IN EFI_EVENT Event,
IN VOID *Context
);
/**
Perform 8042 controller and keyboard Initialization.
If ExtendedVerification is TRUE, do additional test for