3 Copyright (c) 2006 - 2011, 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_HANDLE NotifyHandle
;
199 EFI_KEY_DATA KeyData
;
200 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
201 LIST_ENTRY NotifyEntry
;
202 } BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY
;
204 #define QUEUE_MAX_COUNT 32
208 EFI_KEY_DATA Buffer
[QUEUE_MAX_COUNT
];
214 EFI_LEGACY_BIOS_PROTOCOL
*LegacyBios
;
215 EFI_ISA_IO_PROTOCOL
*IsaIo
;
216 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn
;
217 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInputEx
;
218 UINT16 DataRegisterAddress
;
219 UINT16 StatusRegisterAddress
;
220 UINT16 CommandRegisterAddress
;
221 BOOLEAN ExtendedKeyboard
;
224 // Buffer storing EFI_KEY_DATA
229 // Notification Function List
231 LIST_ENTRY NotifyList
;
232 EFI_EVENT TimerEvent
;
236 #define BIOS_KEYBOARD_DEV_FROM_THIS(a) CR (a, BIOS_KEYBOARD_DEV, SimpleTextIn, BIOS_KEYBOARD_DEV_SIGNATURE)
237 #define TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS(a) \
241 BIOS_KEYBOARD_DEV_SIGNATURE \
247 extern EFI_DRIVER_BINDING_PROTOCOL gBiosKeyboardDriverBinding
;
250 // Driver Binding Protocol functions
254 Check whether the driver supports this device.
256 @param This The Udriver binding protocol.
257 @param Controller The controller handle to check.
258 @param RemainingDevicePath The remaining device path.
260 @retval EFI_SUCCESS The driver supports this controller.
261 @retval other This device isn't supported.
266 BiosKeyboardDriverBindingSupported (
267 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
268 IN EFI_HANDLE Controller
,
269 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
273 Starts the device with this driver.
275 @param This The driver binding instance.
276 @param Controller Handle of device to bind driver to.
277 @param RemainingDevicePath Optional parameter use to pick a specific child
280 @retval EFI_SUCCESS The controller is controlled by the driver.
281 @retval Other This controller cannot be started.
286 BiosKeyboardDriverBindingStart (
287 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
288 IN EFI_HANDLE Controller
,
289 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
293 Stop the device handled by this driver.
295 @param This The driver binding protocol.
296 @param Controller The controller to release.
297 @param NumberOfChildren The number of handles in ChildHandleBuffer.
298 @param ChildHandleBuffer The array of child handle.
300 @retval EFI_SUCCESS The device was stopped.
301 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
302 @retval Others Fail to uninstall protocols attached on the device.
307 BiosKeyboardDriverBindingStop (
308 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
309 IN EFI_HANDLE Controller
,
310 IN UINTN NumberOfChildren
,
311 IN EFI_HANDLE
*ChildHandleBuffer
315 Retrieves a Unicode string that is the user readable name of the driver.
317 This function retrieves the user readable name of a driver in the form of a
318 Unicode string. If the driver specified by This has a user readable name in
319 the language specified by Language, then a pointer to the driver name is
320 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
321 by This does not support the language specified by Language,
322 then EFI_UNSUPPORTED is returned.
324 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
325 EFI_COMPONENT_NAME_PROTOCOL instance.
327 @param Language[in] A pointer to a Null-terminated ASCII string
328 array indicating the language. This is the
329 language of the driver name that the caller is
330 requesting, and it must match one of the
331 languages specified in SupportedLanguages. The
332 number of languages supported by a driver is up
333 to the driver writer. Language is specified
334 in RFC 4646 or ISO 639-2 language code format.
336 @param DriverName[out] A pointer to the Unicode string to return.
337 This Unicode string is the name of the
338 driver specified by This in the language
339 specified by Language.
341 @retval EFI_SUCCESS The Unicode string for the Driver specified by
342 This and the language specified by Language was
343 returned in DriverName.
345 @retval EFI_INVALID_PARAMETER Language is NULL.
347 @retval EFI_INVALID_PARAMETER DriverName is NULL.
349 @retval EFI_UNSUPPORTED The driver specified by This does not support
350 the language specified by Language.
355 BiosKeyboardComponentNameGetDriverName (
356 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
358 OUT CHAR16
**DriverName
363 Retrieves a Unicode string that is the user readable name of the controller
364 that is being managed by a driver.
366 This function retrieves the user readable name of the controller specified by
367 ControllerHandle and ChildHandle in the form of a Unicode string. If the
368 driver specified by This has a user readable name in the language specified by
369 Language, then a pointer to the controller name is returned in ControllerName,
370 and EFI_SUCCESS is returned. If the driver specified by This is not currently
371 managing the controller specified by ControllerHandle and ChildHandle,
372 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
373 support the language specified by Language, then EFI_UNSUPPORTED is returned.
375 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
376 EFI_COMPONENT_NAME_PROTOCOL instance.
378 @param ControllerHandle[in] The handle of a controller that the driver
379 specified by This is managing. This handle
380 specifies the controller whose name is to be
383 @param ChildHandle[in] The handle of the child controller to retrieve
384 the name of. This is an optional parameter that
385 may be NULL. It will be NULL for device
386 drivers. It will also be NULL for a bus drivers
387 that wish to retrieve the name of the bus
388 controller. It will not be NULL for a bus
389 driver that wishes to retrieve the name of a
392 @param Language[in] A pointer to a Null-terminated ASCII string
393 array indicating the language. This is the
394 language of the driver name that the caller is
395 requesting, and it must match one of the
396 languages specified in SupportedLanguages. The
397 number of languages supported by a driver is up
398 to the driver writer. Language is specified in
399 RFC 4646 or ISO 639-2 language code format.
401 @param ControllerName[out] A pointer to the Unicode string to return.
402 This Unicode string is the name of the
403 controller specified by ControllerHandle and
404 ChildHandle in the language specified by
405 Language from the point of view of the driver
408 @retval EFI_SUCCESS The Unicode string for the user readable name in
409 the language specified by Language for the
410 driver specified by This was returned in
413 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
415 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
418 @retval EFI_INVALID_PARAMETER Language is NULL.
420 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
422 @retval EFI_UNSUPPORTED The driver specified by This is not currently
423 managing the controller specified by
424 ControllerHandle and ChildHandle.
426 @retval EFI_UNSUPPORTED The driver specified by This does not support
427 the language specified by Language.
432 BiosKeyboardComponentNameGetControllerName (
433 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
434 IN EFI_HANDLE ControllerHandle
,
435 IN EFI_HANDLE ChildHandle OPTIONAL
,
437 OUT CHAR16
**ControllerName
442 // Simple Text Input Protocol functions
445 Reset the Keyboard and do BAT test for it, if (ExtendedVerification == TRUE) then do some extra keyboard validations.
447 @param This Pointer of simple text Protocol.
448 @param ExtendedVerification Whether perform the extra validation of keyboard. True: perform; FALSE: skip.
450 @retval EFI_SUCCESS The command byte is written successfully.
451 @retval EFI_DEVICE_ERROR Errors occurred during reseting keyboard.
457 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
458 IN BOOLEAN ExtendedVerification
462 Read out the scan code of the key that has just been stroked.
464 @param This Pointer of simple text Protocol.
465 @param Key Pointer for store the key that read out.
467 @retval EFI_SUCCESS The key is read out successfully.
468 @retval other The key reading failed.
473 BiosKeyboardReadKeyStroke (
474 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
475 OUT EFI_INPUT_KEY
*Key
479 // Private worker functions
482 Waiting on the keyboard event, if there's any key pressed by the user, signal the event
484 @param Event The event that be siganlled when any key has been stroked.
485 @param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_PROTOCOL.
490 BiosKeyboardWaitForKey (
496 Check key buffer to get the key stroke status.
498 @param This Pointer of the protocol EFI_SIMPLE_TEXT_IN_PROTOCOL.
500 @retval EFI_SUCCESS A key is being pressed now.
501 @retval Other No key is now pressed.
506 BiosKeyboardCheckForKey (
507 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
511 Convert unicode combined with scan code of key to the counterpart of EFIScancode of it.
513 @param KeyChar Unicode of key.
514 @param ScanCode Scan code of key.
516 @return The value of EFI Scancode for the key.
517 @retval SCAN_NULL No corresponding value in the EFI convert table is found for the key.
521 ConvertToEFIScanCode (
527 Check whether there is Ps/2 Keyboard device in system by 0xF4 Keyboard Command
528 If Keyboard receives 0xF4, it will respond with 'ACK'. If it doesn't respond, the device
529 should not be in system.
531 @param BiosKeyboardPrivate Keyboard Private Data Struture
533 @retval TRUE Keyboard in System.
534 @retval FALSE Keyboard not in System.
538 CheckKeyboardConnect (
539 IN BIOS_KEYBOARD_DEV
*BiosKeyboardPrivate
543 Timer event handler: read a series of key stroke from 8042
544 and put them into memory key buffer.
545 It is registered as running under TPL_NOTIFY
547 @param Event The timer event
548 @param Context A BIOS_KEYBOARD_DEV pointer
553 BiosKeyboardTimerHandler (
559 Reset the input device and optionaly run diagnostics
561 @param This Protocol instance pointer.
562 @param ExtendedVerification Driver may perform diagnostics on reset.
564 @retval EFI_SUCCESS The device was reset.
565 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
571 BiosKeyboardResetEx (
572 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
573 IN BOOLEAN ExtendedVerification
577 Reads the next keystroke from the input device. The WaitForKey Event can
578 be used to test for existance of a keystroke via WaitForEvent () call.
580 @param This Protocol instance pointer.
581 @param KeyData A pointer to a buffer that is filled in with the keystroke
582 state data for the key that was pressed.
584 @retval EFI_SUCCESS The keystroke information was returned.
585 @retval EFI_NOT_READY There was no keystroke data availiable.
586 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
588 @retval EFI_INVALID_PARAMETER KeyData is NULL.
593 BiosKeyboardReadKeyStrokeEx (
594 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
595 OUT EFI_KEY_DATA
*KeyData
599 Set certain state for the input device.
601 @param This Protocol instance pointer.
602 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
603 state for the input device.
605 @retval EFI_SUCCESS The device state was set successfully.
606 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could
607 not have the setting adjusted.
608 @retval EFI_UNSUPPORTED The device does not have the ability to set its state.
609 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
614 BiosKeyboardSetState (
615 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
616 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
620 Register a notification function for a particular keystroke for the input device.
622 @param This Protocol instance pointer.
623 @param KeyData A pointer to a buffer that is filled in with the keystroke
624 information data for the key that was pressed.
625 @param KeyNotificationFunction Points to the function to be called when the key
626 sequence is typed specified by KeyData.
627 @param NotifyHandle Points to the unique handle assigned to the registered notification.
630 @retval EFI_SUCCESS The notification function was registered successfully.
631 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures.
632 @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.
637 BiosKeyboardRegisterKeyNotify (
638 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
639 IN EFI_KEY_DATA
*KeyData
,
640 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
641 OUT EFI_HANDLE
*NotifyHandle
645 Remove a registered notification function from a particular keystroke.
647 @param This Protocol instance pointer.
648 @param NotificationHandle The handle of the notification function being unregistered.
650 @retval EFI_SUCCESS The notification function was unregistered successfully.
651 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
656 BiosKeyboardUnregisterKeyNotify (
657 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
658 IN EFI_HANDLE NotificationHandle
662 Wait for a specific value to be presented in
663 Data register of Keyboard Controller by keyboard and then read it,
664 used in keyboard commands ack
666 @param BiosKeyboardPrivate Keyboard instance pointer.
667 @param Value The value to be waited for
668 @param WaitForValueTimeOut The limit of microseconds for timeout
670 @retval EFI_SUCCESS The command byte is written successfully.
671 @retval EFI_TIMEOUT Timeout occurred during writing.
675 KeyboardWaitForValue (
676 IN BIOS_KEYBOARD_DEV
*BiosKeyboardPrivate
,
678 IN UINTN WaitForValueTimeOut
682 Write data byte to input buffer or input/output ports of Keyboard Controller with delay and waiting for buffer-empty state.
684 @param BiosKeyboardPrivate Keyboard instance pointer.
685 @param Data Data byte to write.
687 @retval EFI_SUCCESS The data byte is written successfully.
688 @retval EFI_TIMEOUT Timeout occurred during writing.
693 IN BIOS_KEYBOARD_DEV
*BiosKeyboardPrivate
,
698 Free keyboard notify list.
700 @param ListHead The list head
702 @retval EFI_SUCCESS Free the notify list successfully
703 @retval EFI_INVALID_PARAMETER ListHead is invalid.
707 BiosKeyboardFreeNotifyList (
708 IN OUT LIST_ENTRY
*ListHead
712 Check if key is registered.
714 @param RegsiteredData A pointer to a buffer that is filled in with the keystroke
715 state data for the key that was registered.
716 @param InputData A pointer to a buffer that is filled in with the keystroke
717 state data for the key that was pressed.
719 @retval TRUE Key be pressed matches a registered key.
720 @retval FLASE Match failed.
725 IN EFI_KEY_DATA
*RegsiteredData
,
726 IN EFI_KEY_DATA
*InputData
730 Waiting on the keyboard event, if there's any key pressed by the user, signal the event
732 @param Event The event that be siganlled when any key has been stroked.
733 @param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.
738 BiosKeyboardWaitForKeyEx (