]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c
1. Import UsbKbDxe and UsbMouseDxe into MdeModulePkg
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbKbDxe / efikey.c
1 /** @file
2
3 Copyright (c) 2004 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 EfiKey.c
15
16 Abstract:
17
18 USB Keyboard Driver
19
20 Revision History
21
22
23 **/
24
25 #include "efikey.h"
26 #include "keyboard.h"
27
28 //
29 // Prototypes
30 // Driver model protocol interface
31 //
32 EFI_STATUS
33 EFIAPI
34 USBKeyboardDriverBindingEntryPoint (
35 IN EFI_HANDLE ImageHandle,
36 IN EFI_SYSTEM_TABLE *SystemTable
37 );
38
39 EFI_STATUS
40 EFIAPI
41 USBKeyboardDriverBindingSupported (
42 IN EFI_DRIVER_BINDING_PROTOCOL *This,
43 IN EFI_HANDLE Controller,
44 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
45 );
46
47 EFI_STATUS
48 EFIAPI
49 USBKeyboardDriverBindingStart (
50 IN EFI_DRIVER_BINDING_PROTOCOL *This,
51 IN EFI_HANDLE Controller,
52 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
53 );
54
55 EFI_STATUS
56 EFIAPI
57 USBKeyboardDriverBindingStop (
58 IN EFI_DRIVER_BINDING_PROTOCOL *This,
59 IN EFI_HANDLE Controller,
60 IN UINTN NumberOfChildren,
61 IN EFI_HANDLE *ChildHandleBuffer
62 );
63
64 //
65 // Simple Text In Protocol Interface
66 //
67 STATIC
68 EFI_STATUS
69 EFIAPI
70 USBKeyboardReset (
71 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
72 IN BOOLEAN ExtendedVerification
73 );
74
75 STATIC
76 EFI_STATUS
77 EFIAPI
78 USBKeyboardReadKeyStroke (
79 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
80 OUT EFI_INPUT_KEY *Key
81 );
82
83 STATIC
84 VOID
85 EFIAPI
86 USBKeyboardWaitForKey (
87 IN EFI_EVENT Event,
88 IN VOID *Context
89 );
90
91 //
92 // Helper functions
93 //
94 STATIC
95 EFI_STATUS
96 USBKeyboardCheckForKey (
97 IN USB_KB_DEV *UsbKeyboardDevice
98 );
99
100 EFI_GUID gEfiUsbKeyboardDriverGuid = {
101 0xa05f5f78, 0xfb3, 0x4d10, 0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c
102 };
103
104 //
105 // USB Keyboard Driver Global Variables
106 //
107 EFI_DRIVER_BINDING_PROTOCOL gUsbKeyboardDriverBinding = {
108 USBKeyboardDriverBindingSupported,
109 USBKeyboardDriverBindingStart,
110 USBKeyboardDriverBindingStop,
111 0xa,
112 NULL,
113 NULL
114 };
115
116 //@MT: EFI_DRIVER_ENTRY_POINT (USBKeyboardDriverBindingEntryPoint)
117
118 EFI_STATUS
119 EFIAPI
120 USBKeyboardDriverBindingEntryPoint (
121 IN EFI_HANDLE ImageHandle,
122 IN EFI_SYSTEM_TABLE *SystemTable
123 )
124 /*++
125
126 Routine Description:
127 Driver Entry Point.
128
129 Arguments:
130 ImageHandle - EFI_HANDLE
131 SystemTable - EFI_SYSTEM_TABLE
132 Returns:
133 EFI_STATUS
134
135 --*/
136 {
137 return EfiLibInstallAllDriverProtocols (
138 ImageHandle,
139 SystemTable,
140 &gUsbKeyboardDriverBinding,
141 ImageHandle,
142 &gUsbKeyboardComponentName,
143 NULL,
144 NULL
145 );
146 }
147
148
149
150 /**
151 Supported.
152
153 @param This EFI_DRIVER_BINDING_PROTOCOL
154 @param Controller Controller handle
155 @param RemainingDevicePath EFI_DEVICE_PATH_PROTOCOL
156 EFI_STATUS
157
158 **/
159 EFI_STATUS
160 EFIAPI
161 USBKeyboardDriverBindingSupported (
162 IN EFI_DRIVER_BINDING_PROTOCOL *This,
163 IN EFI_HANDLE Controller,
164 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
165 )
166 {
167 EFI_STATUS OpenStatus;
168 EFI_USB_IO_PROTOCOL *UsbIo;
169 EFI_STATUS Status;
170
171 //
172 // Check if USB_IO protocol is attached on the controller handle.
173 //
174 OpenStatus = gBS->OpenProtocol (
175 Controller,
176 &gEfiUsbIoProtocolGuid,
177 &UsbIo,
178 This->DriverBindingHandle,
179 Controller,
180 EFI_OPEN_PROTOCOL_BY_DRIVER
181 );
182 if (EFI_ERROR (OpenStatus)) {
183 return OpenStatus;
184 }
185
186 //
187 // Use the USB I/O protocol interface to check whether the Controller is
188 // the Keyboard controller that can be managed by this driver.
189 //
190 Status = EFI_SUCCESS;
191
192 if (!IsUSBKeyboard (UsbIo)) {
193 Status = EFI_UNSUPPORTED;
194 }
195
196 gBS->CloseProtocol (
197 Controller,
198 &gEfiUsbIoProtocolGuid,
199 This->DriverBindingHandle,
200 Controller
201 );
202
203 return Status;
204 }
205
206
207 /**
208 Start.
209
210 @param This EFI_DRIVER_BINDING_PROTOCOL
211 @param Controller Controller handle
212 @param RemainingDevicePath EFI_DEVICE_PATH_PROTOCOL
213
214 @retval EFI_SUCCESS Success
215 @retval EFI_OUT_OF_RESOURCES Can't allocate memory
216 @retval EFI_UNSUPPORTED The Start routine fail
217
218 **/
219 EFI_STATUS
220 EFIAPI
221 USBKeyboardDriverBindingStart (
222 IN EFI_DRIVER_BINDING_PROTOCOL *This,
223 IN EFI_HANDLE Controller,
224 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
225 )
226 {
227 EFI_STATUS Status;
228 EFI_USB_IO_PROTOCOL *UsbIo;
229 USB_KB_DEV *UsbKeyboardDevice;
230 UINT8 EndpointNumber;
231 EFI_USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
232 UINT8 Index;
233 UINT8 EndpointAddr;
234 UINT8 PollingInterval;
235 UINT8 PacketSize;
236 BOOLEAN Found;
237
238 UsbKeyboardDevice = NULL;
239 Found = FALSE;
240
241 //
242 // Open USB_IO Protocol
243 //
244 Status = gBS->OpenProtocol (
245 Controller,
246 &gEfiUsbIoProtocolGuid,
247 &UsbIo,
248 This->DriverBindingHandle,
249 Controller,
250 EFI_OPEN_PROTOCOL_BY_DRIVER
251 );
252 if (EFI_ERROR (Status)) {
253 return Status;
254 }
255
256 UsbKeyboardDevice = AllocateZeroPool (sizeof (USB_KB_DEV));
257 if (UsbKeyboardDevice == NULL) {
258 gBS->CloseProtocol (
259 Controller,
260 &gEfiUsbIoProtocolGuid,
261 This->DriverBindingHandle,
262 Controller
263 );
264 return EFI_OUT_OF_RESOURCES;
265 }
266 //
267 // Get the Device Path Protocol on Controller's handle
268 //
269 Status = gBS->OpenProtocol (
270 Controller,
271 &gEfiDevicePathProtocolGuid,
272 (VOID **) &UsbKeyboardDevice->DevicePath,
273 This->DriverBindingHandle,
274 Controller,
275 EFI_OPEN_PROTOCOL_GET_PROTOCOL
276 );
277
278 if (EFI_ERROR (Status)) {
279 gBS->FreePool (UsbKeyboardDevice);
280 gBS->CloseProtocol (
281 Controller,
282 &gEfiUsbIoProtocolGuid,
283 This->DriverBindingHandle,
284 Controller
285 );
286 return Status;
287 }
288 //
289 // Report that the usb keyboard is being enabled
290 //
291 KbdReportStatusCode (
292 UsbKeyboardDevice->DevicePath,
293 EFI_PROGRESS_CODE,
294 PcdGet32 (PcdStatusCodeValueKeyboardEnable)
295 );
296
297 //
298 // This is pretty close to keyboard detection, so log progress
299 //
300 KbdReportStatusCode (
301 UsbKeyboardDevice->DevicePath,
302 EFI_PROGRESS_CODE,
303 PcdGet32 (PcdStatusCodeValueKeyboardPresenceDetect)
304 );
305
306 //
307 // Initialize UsbKeyboardDevice
308 //
309 UsbKeyboardDevice->UsbIo = UsbIo;
310
311 //
312 // Get interface & endpoint descriptor
313 //
314 UsbIo->UsbGetInterfaceDescriptor (
315 UsbIo,
316 &UsbKeyboardDevice->InterfaceDescriptor
317 );
318
319 EndpointNumber = UsbKeyboardDevice->InterfaceDescriptor.NumEndpoints;
320
321 for (Index = 0; Index < EndpointNumber; Index++) {
322
323 UsbIo->UsbGetEndpointDescriptor (
324 UsbIo,
325 Index,
326 &EndpointDescriptor
327 );
328
329 if ((EndpointDescriptor.Attributes & 0x03) == 0x03) {
330 //
331 // We only care interrupt endpoint here
332 //
333 UsbKeyboardDevice->IntEndpointDescriptor = EndpointDescriptor;
334 Found = TRUE;
335 }
336 }
337
338 if (!Found) {
339 //
340 // No interrupt endpoint found, then return unsupported.
341 //
342 gBS->FreePool (UsbKeyboardDevice);
343 gBS->CloseProtocol (
344 Controller,
345 &gEfiUsbIoProtocolGuid,
346 This->DriverBindingHandle,
347 Controller
348 );
349 return EFI_UNSUPPORTED;
350 }
351
352 UsbKeyboardDevice->Signature = USB_KB_DEV_SIGNATURE;
353 UsbKeyboardDevice->SimpleInput.Reset = USBKeyboardReset;
354 UsbKeyboardDevice->SimpleInput.ReadKeyStroke = USBKeyboardReadKeyStroke;
355 Status = gBS->CreateEvent (
356 EVT_NOTIFY_WAIT,
357 TPL_NOTIFY,
358 USBKeyboardWaitForKey,
359 UsbKeyboardDevice,
360 &(UsbKeyboardDevice->SimpleInput.WaitForKey)
361 );
362
363 if (EFI_ERROR (Status)) {
364 gBS->FreePool (UsbKeyboardDevice);
365 gBS->CloseProtocol (
366 Controller,
367 &gEfiUsbIoProtocolGuid,
368 This->DriverBindingHandle,
369 Controller
370 );
371 return Status;
372 }
373
374 //
375 // Install simple txt in protocol interface
376 // for the usb keyboard device.
377 // Usb keyboard is a hot plug device, and expected to work immediately
378 // when plugging into system, so a HotPlugDeviceGuid is installed onto
379 // the usb keyboard device handle, to distinguish it from other conventional
380 // console devices.
381 //
382 Status = gBS->InstallMultipleProtocolInterfaces (
383 &Controller,
384 &gEfiSimpleTextInProtocolGuid,
385 &UsbKeyboardDevice->SimpleInput,
386 &gEfiHotPlugDeviceGuid,
387 NULL,
388 NULL
389 );
390 if (EFI_ERROR (Status)) {
391 gBS->CloseEvent (UsbKeyboardDevice->SimpleInput.WaitForKey);
392 gBS->FreePool (UsbKeyboardDevice);
393 gBS->CloseProtocol (
394 Controller,
395 &gEfiUsbIoProtocolGuid,
396 This->DriverBindingHandle,
397 Controller
398 );
399 return Status;
400 }
401
402 //
403 // Reset USB Keyboard Device
404 //
405 Status = UsbKeyboardDevice->SimpleInput.Reset (
406 &UsbKeyboardDevice->SimpleInput,
407 TRUE
408 );
409 if (EFI_ERROR (Status)) {
410 gBS->UninstallMultipleProtocolInterfaces (
411 Controller,
412 &gEfiSimpleTextInProtocolGuid,
413 &UsbKeyboardDevice->SimpleInput,
414 &gEfiHotPlugDeviceGuid,
415 NULL,
416 NULL
417 );
418 gBS->CloseEvent (UsbKeyboardDevice->SimpleInput.WaitForKey);
419 gBS->FreePool (UsbKeyboardDevice);
420 gBS->CloseProtocol (
421 Controller,
422 &gEfiUsbIoProtocolGuid,
423 This->DriverBindingHandle,
424 Controller
425 );
426 return Status;
427 }
428 //
429 // submit async interrupt transfer
430 //
431 EndpointAddr = UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress;
432 PollingInterval = UsbKeyboardDevice->IntEndpointDescriptor.Interval;
433 PacketSize = (UINT8) (UsbKeyboardDevice->IntEndpointDescriptor.MaxPacketSize);
434
435 Status = UsbIo->UsbAsyncInterruptTransfer (
436 UsbIo,
437 EndpointAddr,
438 TRUE,
439 PollingInterval,
440 PacketSize,
441 KeyboardHandler,
442 UsbKeyboardDevice
443 );
444
445 if (EFI_ERROR (Status)) {
446
447 gBS->UninstallMultipleProtocolInterfaces (
448 Controller,
449 &gEfiSimpleTextInProtocolGuid,
450 &UsbKeyboardDevice->SimpleInput,
451 &gEfiHotPlugDeviceGuid,
452 NULL,
453 NULL
454 );
455 gBS->CloseEvent (UsbKeyboardDevice->SimpleInput.WaitForKey);
456 gBS->FreePool (UsbKeyboardDevice);
457 gBS->CloseProtocol (
458 Controller,
459 &gEfiUsbIoProtocolGuid,
460 This->DriverBindingHandle,
461 Controller
462 );
463 return Status;
464 }
465
466 UsbKeyboardDevice->ControllerNameTable = NULL;
467 AddUnicodeString (
468 "eng",
469 gUsbKeyboardComponentName.SupportedLanguages,
470 &UsbKeyboardDevice->ControllerNameTable,
471 L"Generic Usb Keyboard"
472 );
473
474 return EFI_SUCCESS;
475 }
476
477
478
479 /**
480 Stop.
481
482 @param This EFI_DRIVER_BINDING_PROTOCOL
483 @param Controller Controller handle
484 @param NumberOfChildren Child handle number
485 @param ChildHandleBuffer Child handle buffer
486
487 @retval EFI_SUCCESS Success
488 @retval EFI_UNSUPPORTED Can't support
489
490 **/
491 EFI_STATUS
492 EFIAPI
493 USBKeyboardDriverBindingStop (
494 IN EFI_DRIVER_BINDING_PROTOCOL *This,
495 IN EFI_HANDLE Controller,
496 IN UINTN NumberOfChildren,
497 IN EFI_HANDLE *ChildHandleBuffer
498 )
499 {
500 EFI_STATUS Status;
501 EFI_SIMPLE_TEXT_INPUT_PROTOCOL *SimpleInput;
502 USB_KB_DEV *UsbKeyboardDevice;
503 EFI_USB_IO_PROTOCOL *UsbIo;
504
505 Status = gBS->OpenProtocol (
506 Controller,
507 &gEfiSimpleTextInProtocolGuid,
508 &SimpleInput,
509 This->DriverBindingHandle,
510 Controller,
511 EFI_OPEN_PROTOCOL_BY_DRIVER
512 );
513 if (EFI_ERROR (Status)) {
514 return EFI_UNSUPPORTED;
515 }
516
517 //
518 // Get USB_KB_DEV instance.
519 //
520 UsbKeyboardDevice = USB_KB_DEV_FROM_THIS (SimpleInput);
521
522 gBS->CloseProtocol (
523 Controller,
524 &gEfiSimpleTextInProtocolGuid,
525 This->DriverBindingHandle,
526 Controller
527 );
528
529 UsbIo = UsbKeyboardDevice->UsbIo;
530 //
531 // Uninstall the Asyn Interrupt Transfer from this device
532 // will disable the key data input from this device
533 //
534 KbdReportStatusCode (
535 UsbKeyboardDevice->DevicePath,
536 EFI_PROGRESS_CODE,
537 PcdGet32 (PcdStatusCodeValueKeyboardDisable)
538 );
539
540 //
541 // Destroy asynchronous interrupt transfer
542 //
543 UsbKeyboardDevice->UsbIo->UsbAsyncInterruptTransfer (
544 UsbKeyboardDevice->UsbIo,
545 UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
546 FALSE,
547 UsbKeyboardDevice->IntEndpointDescriptor.Interval,
548 0,
549 NULL,
550 NULL
551 );
552
553 gBS->CloseProtocol (
554 Controller,
555 &gEfiUsbIoProtocolGuid,
556 This->DriverBindingHandle,
557 Controller
558 );
559
560 Status = gBS->UninstallMultipleProtocolInterfaces (
561 Controller,
562 &gEfiSimpleTextInProtocolGuid,
563 &UsbKeyboardDevice->SimpleInput,
564 &gEfiHotPlugDeviceGuid,
565 NULL,
566 NULL
567 );
568 //
569 // free all the resources.
570 //
571 gBS->CloseEvent (UsbKeyboardDevice->RepeatTimer);
572 gBS->CloseEvent (UsbKeyboardDevice->DelayedRecoveryEvent);
573 gBS->CloseEvent ((UsbKeyboardDevice->SimpleInput).WaitForKey);
574
575 if (UsbKeyboardDevice->ControllerNameTable != NULL) {
576 FreeUnicodeStringTable (UsbKeyboardDevice->ControllerNameTable);
577 }
578
579 gBS->FreePool (UsbKeyboardDevice);
580
581 return Status;
582
583 }
584
585
586
587 /**
588 Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset() function.
589
590 This The EFI_SIMPLE_TEXT_INPUT_PROTOCOL instance.
591 ExtendedVerification
592 Indicates that the driver may perform a more exhaustive
593 verification operation of the device during reset.
594
595 @retval EFI_SUCCESS Success
596 @retval EFI_DEVICE_ERROR Hardware Error
597
598 **/
599 EFI_STATUS
600 EFIAPI
601 USBKeyboardReset (
602 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
603 IN BOOLEAN ExtendedVerification
604 )
605 {
606 EFI_STATUS Status;
607 USB_KB_DEV *UsbKeyboardDevice;
608 EFI_USB_IO_PROTOCOL *UsbIo;
609
610 UsbKeyboardDevice = USB_KB_DEV_FROM_THIS (This);
611
612 UsbIo = UsbKeyboardDevice->UsbIo;
613
614 KbdReportStatusCode (
615 UsbKeyboardDevice->DevicePath,
616 EFI_PROGRESS_CODE,
617 PcdGet32 (PcdStatusCodeValueKeyboardReset)
618 );
619
620 //
621 // Non Exhaustive reset:
622 // only reset private data structures.
623 //
624 if (!ExtendedVerification) {
625 //
626 // Clear the key buffer of this Usb keyboard
627 //
628 KbdReportStatusCode (
629 UsbKeyboardDevice->DevicePath,
630 EFI_PROGRESS_CODE,
631 PcdGet32 (PcdStatusCodeValueKeyboardClearBuffer)
632 );
633
634 InitUSBKeyBuffer (&(UsbKeyboardDevice->KeyboardBuffer));
635 UsbKeyboardDevice->CurKeyChar = 0;
636 return EFI_SUCCESS;
637 }
638
639 //
640 // Exhaustive reset
641 //
642 Status = InitUSBKeyboard (UsbKeyboardDevice);
643 UsbKeyboardDevice->CurKeyChar = 0;
644 if (EFI_ERROR (Status)) {
645 return EFI_DEVICE_ERROR;
646 }
647
648 return EFI_SUCCESS;
649 }
650
651
652 /**
653 Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke() function.
654
655 This The EFI_SIMPLE_TEXT_INPUT_PROTOCOL instance.
656 Key A pointer to a buffer that is filled in with the keystroke
657 information for the key that was pressed.
658
659 @retval EFI_SUCCESS Success
660
661 **/
662 STATIC
663 EFI_STATUS
664 EFIAPI
665 USBKeyboardReadKeyStroke (
666 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
667 OUT EFI_INPUT_KEY *Key
668 )
669 {
670 USB_KB_DEV *UsbKeyboardDevice;
671 EFI_STATUS Status;
672 UINT8 KeyChar;
673
674 UsbKeyboardDevice = USB_KB_DEV_FROM_THIS (This);
675
676 //
677 // if there is no saved ASCII byte, fetch it
678 // by calling USBKeyboardCheckForKey().
679 //
680 if (UsbKeyboardDevice->CurKeyChar == 0) {
681 Status = USBKeyboardCheckForKey (UsbKeyboardDevice);
682 if (EFI_ERROR (Status)) {
683 return Status;
684 }
685 }
686
687 Key->UnicodeChar = 0;
688 Key->ScanCode = SCAN_NULL;
689
690 KeyChar = UsbKeyboardDevice->CurKeyChar;
691
692 UsbKeyboardDevice->CurKeyChar = 0;
693
694 //
695 // Translate saved ASCII byte into EFI_INPUT_KEY
696 //
697 Status = USBKeyCodeToEFIScanCode (UsbKeyboardDevice, KeyChar, Key);
698
699 return Status;
700
701 }
702
703
704 /**
705 Handler function for WaitForKey event.
706
707 Event Event to be signaled when a key is pressed.
708 Context Points to USB_KB_DEV instance.
709
710 @return VOID
711
712 **/
713 STATIC
714 VOID
715 EFIAPI
716 USBKeyboardWaitForKey (
717 IN EFI_EVENT Event,
718 IN VOID *Context
719 )
720 {
721 USB_KB_DEV *UsbKeyboardDevice;
722
723 UsbKeyboardDevice = (USB_KB_DEV *) Context;
724
725 if (UsbKeyboardDevice->CurKeyChar == 0) {
726
727 if (EFI_ERROR (USBKeyboardCheckForKey (UsbKeyboardDevice))) {
728 return ;
729 }
730 }
731 //
732 // If has key pending, signal the event.
733 //
734 gBS->SignalEvent (Event);
735 }
736
737
738
739 /**
740 Check whether there is key pending.
741
742 UsbKeyboardDevice The USB_KB_DEV instance.
743
744 @retval EFI_SUCCESS Success
745
746 **/
747 STATIC
748 EFI_STATUS
749 USBKeyboardCheckForKey (
750 IN USB_KB_DEV *UsbKeyboardDevice
751 )
752 {
753 EFI_STATUS Status;
754 UINT8 KeyChar;
755
756 //
757 // Fetch raw data from the USB keyboard input,
758 // and translate it into ASCII data.
759 //
760 Status = USBParseKey (UsbKeyboardDevice, &KeyChar);
761 if (EFI_ERROR (Status)) {
762 return Status;
763 }
764
765 UsbKeyboardDevice->CurKeyChar = KeyChar;
766 return EFI_SUCCESS;
767 }
768
769
770 /**
771 Report Status Code in Usb Bot Driver
772
773 @param DevicePath Use this to get Device Path
774 @param CodeType Status Code Type
775 @param CodeValue Status Code Value
776
777 @return None
778
779 **/
780 VOID
781 KbdReportStatusCode (
782 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
783 IN EFI_STATUS_CODE_TYPE CodeType,
784 IN EFI_STATUS_CODE_VALUE Value
785 )
786 {
787
788 REPORT_STATUS_CODE_WITH_DEVICE_PATH (
789 CodeType,
790 Value,
791 DevicePath
792 );
793 }