3 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions
7 of the BSD License which accompanies this distribution. The
8 full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _BIOS_KEYBOARD_H_
17 #define _BIOS_KEYBOARD_H_
20 #include <FrameworkDxe.h>
22 #include <Guid/StatusCodeDataTypeId.h>
23 #include <Protocol/SimpleTextIn.h>
24 #include <Protocol/SimpleTextInEx.h>
25 #include <Protocol/LegacyBios.h>
26 #include <Protocol/IsaIo.h>
27 #include <Protocol/DevicePath.h>
28 #include <Protocol/Ps2Policy.h>
30 #include <Library/DebugLib.h>
31 #include <Library/UefiLib.h>
32 #include <Library/BaseMemoryLib.h>
33 #include <Library/ReportStatusCodeLib.h>
34 #include <Library/UefiDriverEntryPoint.h>
35 #include <Library/UefiBootServicesTableLib.h>
36 #include <Library/MemoryAllocationLib.h>
37 #include <Library/BaseLib.h>
38 #include <Library/PcdLib.h>
41 // Driver Binding Externs
43 extern EFI_DRIVER_BINDING_PROTOCOL gBiosKeyboardDriverBinding
;
44 extern EFI_COMPONENT_NAME_PROTOCOL gBiosKeyboardComponentName
;
45 extern EFI_COMPONENT_NAME2_PROTOCOL gBiosKeyboardComponentName2
;
48 #include <IndustryStandard/Pci.h>
51 // BISO Keyboard Defines
53 #define CHAR_SCANCODE 0xe0
56 #define KEYBOARD_8042_DATA_REGISTER 0x60
57 #define KEYBOARD_8042_STATUS_REGISTER 0x64
58 #define KEYBOARD_8042_COMMAND_REGISTER 0x64
60 #define KEYBOARD_TIMEOUT 65536 // 0.07s
61 #define KEYBOARD_WAITFORVALUE_TIMEOUT 1000000 // 1s
62 #define KEYBOARD_BAT_TIMEOUT 4000000 // 4s
63 #define KEYBOARD_TIMER_INTERVAL 200000 // 0.02s
64 // KEYBOARD COMMAND BYTE -- read by writing command KBC_CMDREG_VIA64_CMDBYTE_R to 64H, then read from 60H
65 // write by wrting command KBC_CMDREG_VIA64_CMDBYTE_W to 64H, then write to 60H
67 // 6: PC/XT translation mode convert
68 // 5: Disable Auxiliary device interface
69 // 4: Disable keyboard interface
71 // 2: System Flag: selftest successful
72 // 1: Enable Auxiliary device interrupt
73 // 0: Enable Keyboard interrupt )
75 #define KB_CMMBYTE_KSCAN2UNI_COV (0x1 << 6)
76 #define KB_CMMBYTE_DISABLE_AUX (0x1 << 5)
77 #define KB_CMMBYTE_DISABLE_KB (0x1 << 4)
78 #define KB_CMMBYTE_SLFTEST_SUCC (0x1 << 2)
79 #define KB_CMMBYTE_ENABLE_AUXINT (0x1 << 1)
80 #define KB_CMMBYTE_ENABLE_KBINT (0x1 << 0)
83 // KEYBOARD CONTROLLER STATUS REGISTER - read from 64h
85 // 6: General time out
86 // 5: Output buffer holds data for AUX
87 // 4: Keyboard is not locked
88 // 3: Command written via 64h / Data written via 60h
89 // 2: KBC self-test successful / Power-on reset
90 // 1: Input buffer holds CPU data / empty
91 // 0: Output buffer holds keyboard data / empty
93 #define KBC_STSREG_VIA64_PARE (0x1 << 7)
94 #define KBC_STSREG_VIA64_TIM (0x1 << 6)
95 #define KBC_STSREG_VIA64_AUXB (0x1 << 5)
96 #define KBC_STSREG_VIA64_KEYL (0x1 << 4)
97 #define KBC_STSREG_VIA64_C_D (0x1 << 3)
98 #define KBC_STSREG_VIA64_SYSF (0x1 << 2)
99 #define KBC_STSREG_VIA64_INPB (0x1 << 1)
100 #define KBC_STSREG_VIA64_OUTB (0x1 << 0)
103 // COMMANDs of KEYBOARD CONTROLLER COMMAND REGISTER - write to 64h
105 #define KBC_CMDREG_VIA64_CMDBYTE_R 0x20
106 #define KBC_CMDREG_VIA64_CMDBYTE_W 0x60
107 #define KBC_CMDREG_VIA64_AUX_DISABLE 0xA7
108 #define KBC_CMDREG_VIA64_AUX_ENABLE 0xA8
109 #define KBC_CMDREG_VIA64_KBC_SLFTEST 0xAA
110 #define KBC_CMDREG_VIA64_KB_CKECK 0xAB
111 #define KBC_CMDREG_VIA64_KB_DISABLE 0xAD
112 #define KBC_CMDREG_VIA64_KB_ENABLE 0xAE
113 #define KBC_CMDREG_VIA64_INTP_LOW_R 0xC0
114 #define KBC_CMDREG_VIA64_INTP_HIGH_R 0xC2
115 #define KBC_CMDREG_VIA64_OUTP_R 0xD0
116 #define KBC_CMDREG_VIA64_OUTP_W 0xD1
117 #define KBC_CMDREG_VIA64_OUTB_KB_W 0xD2
118 #define KBC_CMDREG_VIA64_OUTB_AUX_W 0xD3
119 #define KBC_CMDREG_VIA64_AUX_W 0xD4
122 // echos of KEYBOARD CONTROLLER COMMAND - read from 60h
124 #define KBC_CMDECHO_KBCSLFTEST_OK 0x55
125 #define KBC_CMDECHO_KBCHECK_OK 0x00
126 #define KBC_CMDECHO_ACK 0xFA
127 #define KBC_CMDECHO_BATTEST_OK 0xAA
128 #define KBC_CMDECHO_BATTEST_FAILE 0xFC
131 // OUTPUT PORT COMMANDs - write port by writing KBC_CMDREG_VIA64_OUTP_W via 64H, then write the command to 60H
132 // drive data and clock of KB to high for at least 500us for BAT needs
134 #define KBC_OUTPORT_DCHIGH_BAT 0xC0
136 // scan code set type
138 #define KBC_INPBUF_VIA60_SCODESET1 0x01
139 #define KBC_INPBUF_VIA60_SCODESET2 0x02
140 #define KBC_INPBUF_VIA60_SCODESET3 0x03
143 // COMMANDs written to INPUT BUFFER - write to 60h
145 #define KBC_INPBUF_VIA60_KBECHO 0xEE
146 #define KBC_INPBUF_VIA60_KBSCODE 0xF0
147 #define KBC_INPBUF_VIA60_KBTYPE 0xF2
148 #define KBC_INPBUF_VIA60_KBDELAY 0xF3
149 #define KBC_INPBUF_VIA60_KBEN 0xF4
150 #define KBC_INPBUF_VIA60_KBSTDDIS 0xF5
151 #define KBC_INPBUF_VIA60_KBSTDEN 0xF6
152 #define KBC_INPBUF_VIA60_KBRESEND 0xFE
153 #define KBC_INPBUF_VIA60_KBRESET 0xFF
156 // 0040h:0017h - KEYBOARD - STATUS FLAGS 1
158 // 6 Caps Lock active
160 // 4 Scroll Lock active
161 // 3 either Alt pressed
162 // 2 either Ctrl pressed
163 // 1 Left Shift pressed
164 // 0 Right Shift pressed
166 // 0040h:0018h - KEYBOARD - STATUS FLAGS 2
167 // 7: insert key is depressed
168 // 6: caps-lock key is depressed (does not work well)
169 // 5: num-lock key is depressed (does not work well)
170 // 4: scroll lock key is depressed (does not work well)
171 // 3: suspend key has been toggled (does not work well)
172 // 2: system key is pressed and held (does not work well)
173 // 1: left ALT key is pressed
174 // 0: left CTRL key is pressed
176 #define KB_INSERT_BIT (0x1 << 7)
177 #define KB_CAPS_LOCK_BIT (0x1 << 6)
178 #define KB_NUM_LOCK_BIT (0x1 << 5)
179 #define KB_SCROLL_LOCK_BIT (0x1 << 4)
180 #define KB_ALT_PRESSED (0x1 << 3)
181 #define KB_CTRL_PRESSED (0x1 << 2)
182 #define KB_LEFT_SHIFT_PRESSED (0x1 << 1)
183 #define KB_RIGHT_SHIFT_PRESSED (0x1 << 0)
185 #define KB_SUSPEND_PRESSED (0x1 << 3)
186 #define KB_SYSREQ_PRESSED (0x1 << 2)
187 #define KB_LEFT_ALT_PRESSED (0x1 << 1)
188 #define KB_LEFT_CTRL_PRESSED (0x1 << 0)
191 // BIOS Keyboard Device Structure
193 #define BIOS_KEYBOARD_DEV_SIGNATURE SIGNATURE_32 ('B', 'K', 'B', 'D')
194 #define BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('c', 'b', 'k', 'h')
196 typedef struct _BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY
{
198 EFI_KEY_DATA KeyData
;
199 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
200 LIST_ENTRY NotifyEntry
;
201 } BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY
;
203 #define QUEUE_MAX_COUNT 32
207 EFI_KEY_DATA Buffer
[QUEUE_MAX_COUNT
];
213 EFI_LEGACY_BIOS_PROTOCOL
*LegacyBios
;
214 EFI_ISA_IO_PROTOCOL
*IsaIo
;
215 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn
;
216 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInputEx
;
217 UINT16 DataRegisterAddress
;
218 UINT16 StatusRegisterAddress
;
219 UINT16 CommandRegisterAddress
;
220 BOOLEAN ExtendedKeyboard
;
223 // Buffer storing EFI_KEY_DATA
228 // Notification Function List
230 LIST_ENTRY NotifyList
;
231 EFI_EVENT TimerEvent
;
235 #define BIOS_KEYBOARD_DEV_FROM_THIS(a) CR (a, BIOS_KEYBOARD_DEV, SimpleTextIn, BIOS_KEYBOARD_DEV_SIGNATURE)
236 #define TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS(a) \
240 BIOS_KEYBOARD_DEV_SIGNATURE \
246 extern EFI_DRIVER_BINDING_PROTOCOL gBiosKeyboardDriverBinding
;
249 // Driver Binding Protocol functions
253 Check whether the driver supports this device.
255 @param This The Udriver binding protocol.
256 @param Controller The controller handle to check.
257 @param RemainingDevicePath The remaining device path.
259 @retval EFI_SUCCESS The driver supports this controller.
260 @retval other This device isn't supported.
265 BiosKeyboardDriverBindingSupported (
266 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
267 IN EFI_HANDLE Controller
,
268 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
272 Starts the device with this driver.
274 @param This The driver binding instance.
275 @param Controller Handle of device to bind driver to.
276 @param RemainingDevicePath Optional parameter use to pick a specific child
279 @retval EFI_SUCCESS The controller is controlled by the driver.
280 @retval Other This controller cannot be started.
285 BiosKeyboardDriverBindingStart (
286 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
287 IN EFI_HANDLE Controller
,
288 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
292 Stop the device handled by this driver.
294 @param This The driver binding protocol.
295 @param Controller The controller to release.
296 @param NumberOfChildren The number of handles in ChildHandleBuffer.
297 @param ChildHandleBuffer The array of child handle.
299 @retval EFI_SUCCESS The device was stopped.
300 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
301 @retval Others Fail to uninstall protocols attached on the device.
306 BiosKeyboardDriverBindingStop (
307 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
308 IN EFI_HANDLE Controller
,
309 IN UINTN NumberOfChildren
,
310 IN EFI_HANDLE
*ChildHandleBuffer
314 Retrieves a Unicode string that is the user readable name of the driver.
316 This function retrieves the user readable name of a driver in the form of a
317 Unicode string. If the driver specified by This has a user readable name in
318 the language specified by Language, then a pointer to the driver name is
319 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
320 by This does not support the language specified by Language,
321 then EFI_UNSUPPORTED is returned.
323 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
324 EFI_COMPONENT_NAME_PROTOCOL instance.
326 @param Language[in] A pointer to a Null-terminated ASCII string
327 array indicating the language. This is the
328 language of the driver name that the caller is
329 requesting, and it must match one of the
330 languages specified in SupportedLanguages. The
331 number of languages supported by a driver is up
332 to the driver writer. Language is specified
333 in RFC 4646 or ISO 639-2 language code format.
335 @param DriverName[out] A pointer to the Unicode string to return.
336 This Unicode string is the name of the
337 driver specified by This in the language
338 specified by Language.
340 @retval EFI_SUCCESS The Unicode string for the Driver specified by
341 This and the language specified by Language was
342 returned in DriverName.
344 @retval EFI_INVALID_PARAMETER Language is NULL.
346 @retval EFI_INVALID_PARAMETER DriverName is NULL.
348 @retval EFI_UNSUPPORTED The driver specified by This does not support
349 the language specified by Language.
354 BiosKeyboardComponentNameGetDriverName (
355 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
357 OUT CHAR16
**DriverName
362 Retrieves a Unicode string that is the user readable name of the controller
363 that is being managed by a driver.
365 This function retrieves the user readable name of the controller specified by
366 ControllerHandle and ChildHandle in the form of a Unicode string. If the
367 driver specified by This has a user readable name in the language specified by
368 Language, then a pointer to the controller name is returned in ControllerName,
369 and EFI_SUCCESS is returned. If the driver specified by This is not currently
370 managing the controller specified by ControllerHandle and ChildHandle,
371 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
372 support the language specified by Language, then EFI_UNSUPPORTED is returned.
374 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
375 EFI_COMPONENT_NAME_PROTOCOL instance.
377 @param ControllerHandle[in] The handle of a controller that the driver
378 specified by This is managing. This handle
379 specifies the controller whose name is to be
382 @param ChildHandle[in] The handle of the child controller to retrieve
383 the name of. This is an optional parameter that
384 may be NULL. It will be NULL for device
385 drivers. It will also be NULL for a bus drivers
386 that wish to retrieve the name of the bus
387 controller. It will not be NULL for a bus
388 driver that wishes to retrieve the name of a
391 @param Language[in] A pointer to a Null-terminated ASCII string
392 array indicating the language. This is the
393 language of the driver name that the caller is
394 requesting, and it must match one of the
395 languages specified in SupportedLanguages. The
396 number of languages supported by a driver is up
397 to the driver writer. Language is specified in
398 RFC 4646 or ISO 639-2 language code format.
400 @param ControllerName[out] A pointer to the Unicode string to return.
401 This Unicode string is the name of the
402 controller specified by ControllerHandle and
403 ChildHandle in the language specified by
404 Language from the point of view of the driver
407 @retval EFI_SUCCESS The Unicode string for the user readable name in
408 the language specified by Language for the
409 driver specified by This was returned in
412 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
414 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
417 @retval EFI_INVALID_PARAMETER Language is NULL.
419 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
421 @retval EFI_UNSUPPORTED The driver specified by This is not currently
422 managing the controller specified by
423 ControllerHandle and ChildHandle.
425 @retval EFI_UNSUPPORTED The driver specified by This does not support
426 the language specified by Language.
431 BiosKeyboardComponentNameGetControllerName (
432 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
433 IN EFI_HANDLE ControllerHandle
,
434 IN EFI_HANDLE ChildHandle OPTIONAL
,
436 OUT CHAR16
**ControllerName
441 // Simple Text Input Protocol functions
444 Reset the Keyboard and do BAT test for it, if (ExtendedVerification == TRUE) then do some extra keyboard validations.
446 @param This Pointer of simple text Protocol.
447 @param ExtendedVerification Whether perform the extra validation of keyboard. True: perform; FALSE: skip.
449 @retval EFI_SUCCESS The command byte is written successfully.
450 @retval EFI_DEVICE_ERROR Errors occurred during resetting keyboard.
456 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
457 IN BOOLEAN ExtendedVerification
461 Read out the scan code of the key that has just been stroked.
463 @param This Pointer of simple text Protocol.
464 @param Key Pointer for store the key that read out.
466 @retval EFI_SUCCESS The key is read out successfully.
467 @retval other The key reading failed.
472 BiosKeyboardReadKeyStroke (
473 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
474 OUT EFI_INPUT_KEY
*Key
478 // Private worker functions
481 Waiting on the keyboard event, if there's any key pressed by the user, signal the event
483 @param Event The event that be siganlled when any key has been stroked.
484 @param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_PROTOCOL.
489 BiosKeyboardWaitForKey (
495 Check key buffer to get the key stroke status.
497 @param This Pointer of the protocol EFI_SIMPLE_TEXT_IN_PROTOCOL.
499 @retval EFI_SUCCESS A key is being pressed now.
500 @retval Other No key is now pressed.
505 BiosKeyboardCheckForKey (
506 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
510 Convert unicode combined with scan code of key to the counterpart of EFIScancode of it.
512 @param KeyChar Unicode of key.
513 @param ScanCode Scan code of key.
515 @return The value of EFI Scancode for the key.
516 @retval SCAN_NULL No corresponding value in the EFI convert table is found for the key.
520 ConvertToEFIScanCode (
526 Check whether there is Ps/2 Keyboard device in system by 0xF4 Keyboard Command
527 If Keyboard receives 0xF4, it will respond with 'ACK'. If it doesn't respond, the device
528 should not be in system.
530 @param BiosKeyboardPrivate Keyboard Private Data Struture
532 @retval TRUE Keyboard in System.
533 @retval FALSE Keyboard not in System.
537 CheckKeyboardConnect (
538 IN BIOS_KEYBOARD_DEV
*BiosKeyboardPrivate
542 Timer event handler: read a series of key stroke from 8042
543 and put them into memory key buffer.
544 It is registered as running under TPL_NOTIFY
546 @param Event The timer event
547 @param Context A BIOS_KEYBOARD_DEV pointer
552 BiosKeyboardTimerHandler (
558 Reset the input device and optionaly run diagnostics
560 @param This Protocol instance pointer.
561 @param ExtendedVerification Driver may perform diagnostics on reset.
563 @retval EFI_SUCCESS The device was reset.
564 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
570 BiosKeyboardResetEx (
571 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
572 IN BOOLEAN ExtendedVerification
576 Reads the next keystroke from the input device. The WaitForKey Event can
577 be used to test for existance of a keystroke via WaitForEvent () call.
579 @param This Protocol instance pointer.
580 @param KeyData A pointer to a buffer that is filled in with the keystroke
581 state data for the key that was pressed.
583 @retval EFI_SUCCESS The keystroke information was returned.
584 @retval EFI_NOT_READY There was no keystroke data availiable.
585 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
587 @retval EFI_INVALID_PARAMETER KeyData is NULL.
592 BiosKeyboardReadKeyStrokeEx (
593 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
594 OUT EFI_KEY_DATA
*KeyData
598 Set certain state for the input device.
600 @param This Protocol instance pointer.
601 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
602 state for the input device.
604 @retval EFI_SUCCESS The device state was set successfully.
605 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could
606 not have the setting adjusted.
607 @retval EFI_UNSUPPORTED The device does not have the ability to set its state.
608 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
613 BiosKeyboardSetState (
614 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
615 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
619 Register a notification function for a particular keystroke for the input device.
621 @param This Protocol instance pointer.
622 @param KeyData A pointer to a buffer that is filled in with the keystroke
623 information data for the key that was pressed.
624 @param KeyNotificationFunction Points to the function to be called when the key
625 sequence is typed specified by KeyData.
626 @param NotifyHandle Points to the unique handle assigned to the registered notification.
629 @retval EFI_SUCCESS The notification function was registered successfully.
630 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures.
631 @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.
636 BiosKeyboardRegisterKeyNotify (
637 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
638 IN EFI_KEY_DATA
*KeyData
,
639 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
640 OUT VOID
**NotifyHandle
644 Remove a registered notification function from a particular keystroke.
646 @param This Protocol instance pointer.
647 @param NotificationHandle The handle of the notification function being unregistered.
649 @retval EFI_SUCCESS The notification function was unregistered successfully.
650 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
655 BiosKeyboardUnregisterKeyNotify (
656 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
657 IN VOID
*NotificationHandle
661 Wait for a specific value to be presented in
662 Data register of Keyboard Controller by keyboard and then read it,
663 used in keyboard commands ack
665 @param BiosKeyboardPrivate Keyboard instance pointer.
666 @param Value The value to be waited for
667 @param WaitForValueTimeOut The limit of microseconds for timeout
669 @retval EFI_SUCCESS The command byte is written successfully.
670 @retval EFI_TIMEOUT Timeout occurred during writing.
674 KeyboardWaitForValue (
675 IN BIOS_KEYBOARD_DEV
*BiosKeyboardPrivate
,
677 IN UINTN WaitForValueTimeOut
681 Write data byte to input buffer or input/output ports of Keyboard Controller with delay and waiting for buffer-empty state.
683 @param BiosKeyboardPrivate Keyboard instance pointer.
684 @param Data Data byte to write.
686 @retval EFI_SUCCESS The data byte is written successfully.
687 @retval EFI_TIMEOUT Timeout occurred during writing.
692 IN BIOS_KEYBOARD_DEV
*BiosKeyboardPrivate
,
697 Free keyboard notify list.
699 @param ListHead The list head
701 @retval EFI_SUCCESS Free the notify list successfully
702 @retval EFI_INVALID_PARAMETER ListHead is invalid.
706 BiosKeyboardFreeNotifyList (
707 IN OUT LIST_ENTRY
*ListHead
711 Check if key is registered.
713 @param RegsiteredData A pointer to a buffer that is filled in with the keystroke
714 state data for the key that was registered.
715 @param InputData A pointer to a buffer that is filled in with the keystroke
716 state data for the key that was pressed.
718 @retval TRUE Key be pressed matches a registered key.
719 @retval FLASE Match failed.
724 IN EFI_KEY_DATA
*RegsiteredData
,
725 IN EFI_KEY_DATA
*InputData
729 Waiting on the keyboard event, if there's any key pressed by the user, signal the event
731 @param Event The event that be siganlled when any key has been stroked.
732 @param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.
737 BiosKeyboardWaitForKeyEx (