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