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