TianoCore EDK2 master
Loading...
Searching...
No Matches
Dh.c
Go to the documentation of this file.
1
12
13STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
14 { L"-p", TypeValue },
15 { L"-d", TypeFlag },
16 { L"-v", TypeFlag },
17 { L"-verbose", TypeFlag },
18 { L"-sfo", TypeFlag },
19 { L"-l", TypeValue },
20 { NULL, TypeMax }
21};
22
23STATIC CONST EFI_GUID *UefiDriverModelProtocolsGuidArray[] = {
24 &gEfiDriverBindingProtocolGuid,
25 &gEfiPlatformDriverOverrideProtocolGuid,
26 &gEfiBusSpecificDriverOverrideProtocolGuid,
27 &gEfiDriverDiagnosticsProtocolGuid,
28 &gEfiDriverDiagnostics2ProtocolGuid,
29 &gEfiComponentNameProtocolGuid,
30 &gEfiComponentName2ProtocolGuid,
31 &gEfiPlatformToDriverConfigurationProtocolGuid,
32 &gEfiDriverSupportedEfiVersionProtocolGuid,
33 &gEfiDriverFamilyOverrideProtocolGuid,
34 &gEfiDriverHealthProtocolGuid,
35 &gEfiLoadedImageProtocolGuid,
36 NULL
37};
38
39UINTN mGuidDataLen[] = { 8, 4, 4, 4, 12 };
40
50BOOLEAN
52 IN CONST CHAR16 *String
53 )
54{
55 CONST CHAR16 *Walker;
56 CONST CHAR16 *PrevWalker;
57 UINTN Index;
58
59 if (String == NULL) {
60 return FALSE;
61 }
62
63 Walker = String;
64 PrevWalker = String;
65 Index = 0;
66
67 while (Walker != NULL && *Walker != CHAR_NULL) {
68 if (((*Walker >= '0') && (*Walker <= '9')) ||
69 ((*Walker >= 'a') && (*Walker <= 'f')) ||
70 ((*Walker >= 'A') && (*Walker <= 'F'))
71 )
72 {
73 Walker++;
74 } else {
75 if ((*Walker == L'-') && ((((UINTN)Walker - (UINTN)PrevWalker) / sizeof (CHAR16)) == mGuidDataLen[Index])) {
76 Walker++;
77 PrevWalker = Walker;
78 Index++;
79 } else {
80 return FALSE;
81 }
82 }
83 }
84
85 if ((((UINTN)Walker - (UINTN)PrevWalker) / sizeof (CHAR16)) == mGuidDataLen[Index]) {
86 return TRUE;
87 } else {
88 return FALSE;
89 }
90}
91
104UINTN
106 IN CHAR16 Char
107 )
108{
109 if ((Char >= '0') && (Char <= '9')) {
110 return Char - L'0';
111 } else if ((Char >= 'a') && (Char <= 'f')) {
112 return Char - L'a' + 10;
113 } else {
114 return Char - L'A' + 10;
115 }
116}
117
129 IN CONST CHAR16 *String,
130 OUT GUID *Guid
131 )
132{
133 CONST CHAR16 *Walker;
134 UINT8 TempValue;
135 UINTN Index;
136
137 if ((String == NULL) || !IsValidGuidString (String)) {
138 return EFI_UNSUPPORTED;
139 }
140
141 Index = 0;
142
143 Walker = String;
144 Guid->Data1 = (UINT32)StrHexToUint64 (Walker);
145
146 Walker += 9;
147 Guid->Data2 = (UINT16)StrHexToUint64 (Walker);
148
149 Walker += 5;
150 Guid->Data3 = (UINT16)StrHexToUint64 (Walker);
151
152 Walker += 5;
153 while (Walker != NULL && *Walker != CHAR_NULL) {
154 if (*Walker == L'-') {
155 Walker++;
156 } else {
157 TempValue = (UINT8)HexCharToDecimal (*Walker);
158 TempValue = (UINT8)LShiftU64 (TempValue, 4);
159 Walker++;
160
161 TempValue += (UINT8)HexCharToDecimal (*Walker);
162 Walker++;
163
164 Guid->Data4[Index] = TempValue;
165 Index++;
166 }
167 }
168
169 return EFI_SUCCESS;
170}
171
185 IN EFI_HANDLE TheHandle,
186 IN CONST CHAR8 *Language,
187 IN CHAR16 **NameFound
188 )
189{
190 CHAR8 *Lang;
191 EFI_STATUS Status;
193 CHAR16 *NameToReturn;
194
195 //
196 // Go through those handles until we get one that passes for GetComponentName
197 //
198 Status = gBS->OpenProtocol (
199 TheHandle,
200 &gEfiComponentName2ProtocolGuid,
201 (VOID **)&CompName2,
203 NULL,
204 EFI_OPEN_PROTOCOL_GET_PROTOCOL
205 );
206 if (EFI_ERROR (Status)) {
207 Status = gBS->OpenProtocol (
208 TheHandle,
209 &gEfiComponentNameProtocolGuid,
210 (VOID **)&CompName2,
212 NULL,
213 EFI_OPEN_PROTOCOL_GET_PROTOCOL
214 );
215 }
216
217 if (EFI_ERROR (Status)) {
218 return (EFI_NOT_FOUND);
219 }
220
221 Lang = GetBestLanguageForDriver (CompName2->SupportedLanguages, Language, FALSE);
222 if (Lang == NULL) {
223 return (EFI_NOT_FOUND);
224 }
225
226 Status = CompName2->GetDriverName (CompName2, Lang, &NameToReturn);
227 FreePool (Lang);
228
229 if (!EFI_ERROR (Status) && (NameToReturn != NULL)) {
230 *NameFound = NULL;
231 StrnCatGrow (NameFound, NULL, NameToReturn, 0);
232 }
233
234 return (Status);
235}
236
245BOOLEAN
247 IN CONST EFI_GUID *Guid
248 )
249{
250 CONST EFI_GUID **GuidWalker;
251 BOOLEAN GuidFound;
252
253 GuidFound = FALSE;
254 for (GuidWalker = UefiDriverModelProtocolsGuidArray
255 ; GuidWalker != NULL && *GuidWalker != NULL
256 ; GuidWalker++
257 )
258 {
259 if (CompareGuid (*GuidWalker, Guid)) {
260 GuidFound = TRUE;
261 break;
262 }
263 }
264
265 return (GuidFound);
266}
267
280CHAR16 *
282 IN CONST EFI_HANDLE TheHandle,
283 IN CONST CHAR8 *Language,
284 IN CONST CHAR16 *Separator,
285 IN CONST BOOLEAN Verbose,
286 IN CONST BOOLEAN ExtraInfo
287 )
288{
289 EFI_GUID **ProtocolGuidArray;
290 UINTN ArrayCount;
291 UINTN ProtocolIndex;
292 EFI_STATUS Status;
293 CHAR16 *RetVal;
294 UINTN Size;
295 CHAR16 *Temp;
296 CHAR16 GuidStr[40];
297 VOID *Instance;
298 CHAR16 InstanceStr[17];
299
300 ProtocolGuidArray = NULL;
301 RetVal = NULL;
302 Size = 0;
303
304 Status = gBS->ProtocolsPerHandle (
305 TheHandle,
306 &ProtocolGuidArray,
307 &ArrayCount
308 );
309 if (!EFI_ERROR (Status)) {
310 for (ProtocolIndex = 0; ProtocolIndex < ArrayCount; ProtocolIndex++) {
311 Temp = GetStringNameFromGuid (ProtocolGuidArray[ProtocolIndex], Language);
312 ASSERT ((RetVal == NULL && Size == 0) || (RetVal != NULL));
313 if (Size != 0) {
314 StrnCatGrow (&RetVal, &Size, Separator, 0);
315 }
316
317 StrnCatGrow (&RetVal, &Size, L"%H", 0);
318 if (Temp == NULL) {
319 UnicodeSPrint (GuidStr, sizeof (GuidStr), L"%g", ProtocolGuidArray[ProtocolIndex]);
320 StrnCatGrow (&RetVal, &Size, GuidStr, 0);
321 } else {
322 StrnCatGrow (&RetVal, &Size, Temp, 0);
323 FreePool (Temp);
324 }
325
326 StrnCatGrow (&RetVal, &Size, L"%N", 0);
327
328 if (Verbose) {
329 Status = gBS->HandleProtocol (TheHandle, ProtocolGuidArray[ProtocolIndex], &Instance);
330 if (!EFI_ERROR (Status)) {
331 StrnCatGrow (&RetVal, &Size, L"(%H", 0);
332 UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%p", Instance);
333 StrnCatGrow (&RetVal, &Size, InstanceStr, 0);
334 StrnCatGrow (&RetVal, &Size, L"%N)", 0);
335 }
336 }
337
338 if (ExtraInfo) {
339 Temp = GetProtocolInformationDump (TheHandle, ProtocolGuidArray[ProtocolIndex], Verbose);
340 if (Temp != NULL) {
341 ASSERT ((RetVal == NULL && Size == 0) || (RetVal != NULL));
342 if (!Verbose) {
343 StrnCatGrow (&RetVal, &Size, L"(", 0);
344 StrnCatGrow (&RetVal, &Size, Temp, 0);
345 StrnCatGrow (&RetVal, &Size, L")", 0);
346 } else {
347 StrnCatGrow (&RetVal, &Size, Separator, 0);
348 StrnCatGrow (&RetVal, &Size, Temp, 0);
349 }
350
351 FreePool (Temp);
352 }
353 }
354 }
355 }
356
357 SHELL_FREE_NON_NULL (ProtocolGuidArray);
358
359 if (RetVal == NULL) {
360 return (NULL);
361 }
362
363 ASSERT ((RetVal == NULL && Size == 0) || (RetVal != NULL));
364 StrnCatGrow (&RetVal, &Size, Separator, 0);
365 return (RetVal);
366}
367
378 IN EFI_HANDLE TheHandle,
379 OUT CHAR16 **Name
380 )
381{
382 // get loaded image and devicepathtotext on image->Filepath
383 EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
384 EFI_STATUS Status;
385 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
386
387 if ((TheHandle == NULL) || (Name == NULL)) {
388 return (EFI_INVALID_PARAMETER);
389 }
390
391 Status = gBS->OpenProtocol (
392 TheHandle,
393 &gEfiLoadedImageProtocolGuid,
394 (VOID **)&LoadedImage,
396 NULL,
397 EFI_OPEN_PROTOCOL_GET_PROTOCOL
398 );
399 if (EFI_ERROR (Status)) {
400 return (Status);
401 }
402
403 DevicePath = LoadedImage->FilePath;
404 *Name = ConvertDevicePathToText (DevicePath, TRUE, TRUE);
405 return (EFI_SUCCESS);
406}
407
417 IN EFI_HANDLE Handle,
418 IN BOOLEAN BestName,
419 IN CONST CHAR8 *Language OPTIONAL
420 )
421{
422 EFI_STATUS Status;
423 BOOLEAN ConfigurationStatus;
424 BOOLEAN DiagnosticsStatus;
425 UINTN DriverBindingHandleCount;
426 EFI_HANDLE *DriverBindingHandleBuffer;
427 UINTN ParentControllerHandleCount;
428 EFI_HANDLE *ParentControllerHandleBuffer;
429 UINTN ChildControllerHandleCount;
430 EFI_HANDLE *ChildControllerHandleBuffer;
431 CHAR16 *TempStringPointer;
432 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
433 UINTN Index;
434 CHAR16 *DriverName;
435 EFI_DRIVER_BINDING_PROTOCOL *DriverBinding;
436 UINTN NumberOfChildren;
437 UINTN HandleIndex;
438 UINTN ControllerHandleCount;
439 EFI_HANDLE *ControllerHandleBuffer;
440 UINTN ChildIndex;
441 BOOLEAN Image;
442
443 DriverName = NULL;
444
445 //
446 // See if Handle is a device handle and display its details.
447 //
448 DriverBindingHandleBuffer = NULL;
450 Handle,
451 &DriverBindingHandleCount,
452 &DriverBindingHandleBuffer
453 );
454
455 ParentControllerHandleBuffer = NULL;
457 Handle,
458 &ParentControllerHandleCount,
459 &ParentControllerHandleBuffer
460 );
461
462 ChildControllerHandleBuffer = NULL;
464 Handle,
465 &ChildControllerHandleCount,
466 &ChildControllerHandleBuffer
467 );
468
469 DiagnosticsStatus = FALSE;
470 ConfigurationStatus = FALSE;
471
472 if (!EFI_ERROR (gBS->OpenProtocol (Handle, &gEfiDriverConfigurationProtocolGuid, NULL, NULL, gImageHandle, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
473 ConfigurationStatus = TRUE;
474 }
475
476 if (!EFI_ERROR (gBS->OpenProtocol (Handle, &gEfiDriverConfiguration2ProtocolGuid, NULL, NULL, gImageHandle, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
477 ConfigurationStatus = TRUE;
478 }
479
480 if (!EFI_ERROR (gBS->OpenProtocol (Handle, &gEfiDriverDiagnosticsProtocolGuid, NULL, NULL, gImageHandle, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
481 DiagnosticsStatus = TRUE;
482 }
483
484 if (!EFI_ERROR (gBS->OpenProtocol (Handle, &gEfiDriverDiagnostics2ProtocolGuid, NULL, NULL, gImageHandle, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
485 DiagnosticsStatus = TRUE;
486 }
487
488 Status = EFI_SUCCESS;
489
490 if ((DriverBindingHandleCount > 0) || (ParentControllerHandleCount > 0) || (ChildControllerHandleCount > 0)) {
491 DevicePath = NULL;
492 TempStringPointer = NULL;
493 Status = gBS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (VOID **)&DevicePath);
494
495 Status = gEfiShellProtocol->GetDeviceName (Handle, EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8 *)Language, &TempStringPointer);
496 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DRIVER1), gShellDriver1HiiHandle, TempStringPointer != NULL ? TempStringPointer : L"<Unknown>");
497 SHELL_FREE_NON_NULL (TempStringPointer);
498
499 TempStringPointer = ConvertDevicePathToText (DevicePath, TRUE, FALSE);
501 -1,
502 -1,
503 NULL,
504 STRING_TOKEN (STR_DH_OUTPUT_DRIVER2),
505 gShellDriver1HiiHandle,
506 TempStringPointer != NULL ? TempStringPointer : L"<None>",
507 ParentControllerHandleCount == 0 ? L"ROOT" : (ChildControllerHandleCount > 0) ? L"BUS" : L"DEVICE",
508 ConfigurationStatus ? L"YES" : L"NO",
509 DiagnosticsStatus ? L"YES" : L"NO"
510 );
511
512 SHELL_FREE_NON_NULL (TempStringPointer);
513
514 if (DriverBindingHandleCount == 0) {
516 -1,
517 -1,
518 NULL,
519 STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
520 gShellDriver1HiiHandle,
521 L"<None>"
522 );
523 } else {
525 -1,
526 -1,
527 NULL,
528 STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
529 gShellDriver1HiiHandle,
530 L""
531 );
532 for (Index = 0; Index < DriverBindingHandleCount; Index++) {
533 Image = FALSE;
534 Status = GetDriverName (
535 DriverBindingHandleBuffer[Index],
536 Language,
537 &DriverName
538 );
539 if (EFI_ERROR (Status)) {
540 Status = GetDriverImageName (
541 DriverBindingHandleBuffer[Index],
542 &DriverName
543 );
544 if (EFI_ERROR (Status)) {
545 DriverName = NULL;
546 }
547 }
548
549 if (Image) {
551 -1,
552 -1,
553 NULL,
554 STRING_TOKEN (STR_DH_OUTPUT_DRIVER4A),
555 gShellDriver1HiiHandle,
556 ConvertHandleToHandleIndex (DriverBindingHandleBuffer[Index]),
557 DriverName != NULL ? DriverName : L"<Unknown>"
558 );
559 } else {
561 -1,
562 -1,
563 NULL,
564 STRING_TOKEN (STR_DH_OUTPUT_DRIVER4B),
565 gShellDriver1HiiHandle,
566 ConvertHandleToHandleIndex (DriverBindingHandleBuffer[Index]),
567 DriverName != NULL ? DriverName : L"<Unknown>"
568 );
569 }
570
571 SHELL_FREE_NON_NULL (DriverName);
572 }
573 }
574
575 if (ParentControllerHandleCount == 0) {
577 -1,
578 -1,
579 NULL,
580 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
581 gShellDriver1HiiHandle,
582 L"<None>"
583 );
584 } else {
586 -1,
587 -1,
588 NULL,
589 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
590 gShellDriver1HiiHandle,
591 L""
592 );
593 for (Index = 0; Index < ParentControllerHandleCount; Index++) {
594 Status = gEfiShellProtocol->GetDeviceName (ParentControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8 *)Language, &TempStringPointer);
596 -1,
597 -1,
598 NULL,
599 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5B),
600 gShellDriver1HiiHandle,
601 ConvertHandleToHandleIndex (ParentControllerHandleBuffer[Index]),
602 TempStringPointer != NULL ? TempStringPointer : L"<Unknown>"
603 );
604 SHELL_FREE_NON_NULL (TempStringPointer);
605 }
606 }
607
608 if (ChildControllerHandleCount == 0) {
610 -1,
611 -1,
612 NULL,
613 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
614 gShellDriver1HiiHandle,
615 L"<None>"
616 );
617 } else {
619 -1,
620 -1,
621 NULL,
622 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
623 gShellDriver1HiiHandle,
624 L""
625 );
626 for (Index = 0; Index < ChildControllerHandleCount; Index++) {
627 Status = gEfiShellProtocol->GetDeviceName (ChildControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8 *)Language, &TempStringPointer);
629 -1,
630 -1,
631 NULL,
632 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6B),
633 gShellDriver1HiiHandle,
634 ConvertHandleToHandleIndex (ChildControllerHandleBuffer[Index]),
635 TempStringPointer != NULL ? TempStringPointer : L"<Unknown>"
636 );
637 SHELL_FREE_NON_NULL (TempStringPointer);
638 }
639 }
640 }
641
642 SHELL_FREE_NON_NULL (DriverBindingHandleBuffer);
643
644 SHELL_FREE_NON_NULL (ParentControllerHandleBuffer);
645
646 SHELL_FREE_NON_NULL (ChildControllerHandleBuffer);
647
648 if (EFI_ERROR (Status)) {
649 return Status;
650 }
651
652 //
653 // See if Handle is a driver binding handle and display its details.
654 //
655 Status = gBS->OpenProtocol (
656 Handle,
657 &gEfiDriverBindingProtocolGuid,
658 (VOID **)&DriverBinding,
659 NULL,
660 NULL,
661 EFI_OPEN_PROTOCOL_GET_PROTOCOL
662 );
663 if (EFI_ERROR (Status)) {
664 return EFI_SUCCESS;
665 }
666
667 NumberOfChildren = 0;
668 ControllerHandleBuffer = NULL;
670 Handle,
671 &ControllerHandleCount,
672 &ControllerHandleBuffer
673 );
674 if (ControllerHandleCount > 0) {
675 for (HandleIndex = 0; HandleIndex < ControllerHandleCount; HandleIndex++) {
677 Handle,
678 ControllerHandleBuffer[HandleIndex],
679 &ChildControllerHandleCount,
680 NULL
681 );
682 NumberOfChildren += ChildControllerHandleCount;
683 }
684 }
685
686 Status = GetDriverName (Handle, Language, &DriverName);
687 if (EFI_ERROR (Status)) {
688 DriverName = NULL;
689 }
690
692 -1,
693 -1,
694 NULL,
695 STRING_TOKEN (STR_DH_OUTPUT_DRIVER7),
696 gShellDriver1HiiHandle,
698 DriverName != NULL ? DriverName : L"<Unknown>"
699 );
700 SHELL_FREE_NON_NULL (DriverName);
701 Status = GetDriverImageName (
702 Handle,
703 &DriverName
704 );
705 if (EFI_ERROR (Status)) {
706 DriverName = NULL;
707 }
708
710 -1,
711 -1,
712 NULL,
713 STRING_TOKEN (STR_DH_OUTPUT_DRIVER7B),
714 gShellDriver1HiiHandle,
715 DriverName != NULL ? DriverName : L"<Unknown>"
716 );
717 SHELL_FREE_NON_NULL (DriverName);
718
720 -1,
721 -1,
722 NULL,
723 STRING_TOKEN (STR_DH_OUTPUT_DRIVER8),
724 gShellDriver1HiiHandle,
725 DriverBinding->Version,
726 NumberOfChildren > 0 ? L"Bus" : ControllerHandleCount > 0 ? L"Device" : L"<Unknown>",
727 ConfigurationStatus ? L"YES" : L"NO",
728 DiagnosticsStatus ? L"YES" : L"NO"
729 );
730
731 if (ControllerHandleCount == 0) {
733 -1,
734 -1,
735 NULL,
736 STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
737 gShellDriver1HiiHandle,
738 L"None"
739 );
740 } else {
742 -1,
743 -1,
744 NULL,
745 STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
746 gShellDriver1HiiHandle,
747 L""
748 );
749 for (HandleIndex = 0; HandleIndex < ControllerHandleCount; HandleIndex++) {
750 Status = gEfiShellProtocol->GetDeviceName (ControllerHandleBuffer[HandleIndex], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8 *)Language, &TempStringPointer);
751
753 -1,
754 -1,
755 NULL,
756 STRING_TOKEN (STR_DH_OUTPUT_DRIVER9B),
757 gShellDriver1HiiHandle,
758 ConvertHandleToHandleIndex (ControllerHandleBuffer[HandleIndex]),
759 TempStringPointer != NULL ? TempStringPointer : L"<Unknown>"
760 );
761 SHELL_FREE_NON_NULL (TempStringPointer);
762
764 Handle,
765 ControllerHandleBuffer[HandleIndex],
766 &ChildControllerHandleCount,
767 &ChildControllerHandleBuffer
768 );
769 if (!EFI_ERROR (Status)) {
770 for (ChildIndex = 0; ChildIndex < ChildControllerHandleCount; ChildIndex++) {
771 Status = gEfiShellProtocol->GetDeviceName (ChildControllerHandleBuffer[ChildIndex], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8 *)Language, &TempStringPointer);
772
774 -1,
775 -1,
776 NULL,
777 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6C),
778 gShellDriver1HiiHandle,
779 ConvertHandleToHandleIndex (ChildControllerHandleBuffer[ChildIndex]),
780 TempStringPointer != NULL ? TempStringPointer : L"<Unknown>"
781 );
782 SHELL_FREE_NON_NULL (TempStringPointer);
783 }
784
785 SHELL_FREE_NON_NULL (ChildControllerHandleBuffer);
786 }
787 }
788
789 SHELL_FREE_NON_NULL (ControllerHandleBuffer);
790 }
791
792 return EFI_SUCCESS;
793}
794
806VOID
808 IN CONST EFI_HANDLE TheHandle,
809 IN CONST BOOLEAN Verbose,
810 IN CONST BOOLEAN Sfo,
811 IN CONST CHAR8 *Language,
812 IN CONST BOOLEAN DriverInfo,
813 IN CONST BOOLEAN Multiple
814 )
815{
816 CHAR16 *ProtocolInfoString;
817
818 ProtocolInfoString = NULL;
819
820 if (!Sfo) {
821 if (Multiple) {
822 ProtocolInfoString = GetProtocolInfoString (TheHandle, Language, L" ", Verbose, TRUE);
824 -1,
825 -1,
826 NULL,
827 STRING_TOKEN (STR_DH_OUTPUT),
828 gShellDriver1HiiHandle,
829 ConvertHandleToHandleIndex (TheHandle),
830 ProtocolInfoString == NULL ? L"" : ProtocolInfoString
831 );
832 } else {
833 ProtocolInfoString = GetProtocolInfoString (TheHandle, Language, Verbose ? L"\r\n" : L" ", Verbose, TRUE);
834 if (Verbose) {
836 -1,
837 -1,
838 NULL,
839 STRING_TOKEN (STR_DH_OUTPUT_SINGLE),
840 gShellDriver1HiiHandle,
841 ConvertHandleToHandleIndex (TheHandle),
842 TheHandle,
843 ProtocolInfoString == NULL ? L"" : ProtocolInfoString
844 );
845 } else {
847 -1,
848 -1,
849 NULL,
850 STRING_TOKEN (STR_DH_OUTPUT_SINGLE_D),
851 gShellDriver1HiiHandle,
852 ConvertHandleToHandleIndex (TheHandle),
853 ProtocolInfoString == NULL ? L"" : ProtocolInfoString
854 );
855 }
856 }
857
858 if (DriverInfo) {
859 DisplayDriverModelHandle ((EFI_HANDLE)TheHandle, TRUE, Language);
860 }
861 } else {
862 ProtocolInfoString = GetProtocolInfoString (TheHandle, Language, L";", FALSE, FALSE);
864 -1,
865 -1,
866 NULL,
867 STRING_TOKEN (STR_DH_OUTPUT_SFO),
868 gShellDriver1HiiHandle,
869 Multiple ? L"HandlesInfo" : L"HandleInfo",
870 L"DriverName",
871 L"ControllerName",
872 ConvertHandleToHandleIndex (TheHandle),
873 L"DevPath",
874 ProtocolInfoString == NULL ? L"" : ProtocolInfoString
875 );
876 }
877
878 if (ProtocolInfoString != NULL) {
879 FreePool (ProtocolInfoString);
880 }
881}
882
897 IN CONST EFI_HANDLE *HandleList,
898 IN CONST BOOLEAN Verbose,
899 IN CONST BOOLEAN Sfo,
900 IN CONST CHAR8 *Language,
901 IN CONST BOOLEAN DriverInfo
902 )
903{
904 CONST EFI_HANDLE *HandleWalker;
905 SHELL_STATUS ShellStatus;
906
907 ShellStatus = SHELL_SUCCESS;
908 for (HandleWalker = HandleList; HandleWalker != NULL && *HandleWalker != NULL; HandleWalker++) {
909 DoDhByHandle (*HandleWalker, Verbose, Sfo, Language, DriverInfo, TRUE);
911 ShellStatus = SHELL_ABORTED;
912 break;
913 }
914 }
915
916 return (ShellStatus);
917}
918
934 IN CONST GUID *Guid,
935 IN CONST BOOLEAN Verbose,
936 IN CONST BOOLEAN Sfo,
937 IN CONST CHAR8 *Language,
938 IN CONST BOOLEAN DriverInfo
939 )
940{
941 CHAR16 *Name;
942 SHELL_STATUS ShellStatus;
943 EFI_HANDLE *HandleList;
944
945 if (!Sfo) {
946 if (Guid == NULL) {
947 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_ALL_HEADER), gShellDriver1HiiHandle);
948 } else {
949 Name = GetStringNameFromGuid (Guid, NULL);
950 if (Name == NULL) {
951 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_GUID_HEADER), gShellDriver1HiiHandle, Guid);
952 } else {
953 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_NAME_HEADER), gShellDriver1HiiHandle, Name);
954 }
955 }
956 }
957
958 HandleList = GetHandleListByProtocol (Guid);
959 ShellStatus = DoDhForHandleList (HandleList, Verbose, Sfo, Language, DriverInfo);
960 SHELL_FREE_NON_NULL (HandleList);
961
962 return ShellStatus;
963}
964
981 IN CONST CHAR16 *Protocol,
982 IN CONST BOOLEAN Verbose,
983 IN CONST BOOLEAN Sfo,
984 IN CONST CHAR8 *Language,
985 IN CONST BOOLEAN DriverInfo
986 )
987{
988 EFI_GUID Guid;
989 EFI_GUID *GuidPtr;
990 EFI_STATUS Status;
991
992 if (Protocol == NULL) {
993 return DoDhByProtocolGuid (NULL, Verbose, Sfo, Language, DriverInfo);
994 } else {
995 Status = ConvertStrToGuid (Protocol, &Guid);
996 if (!EFI_ERROR (Status)) {
997 GuidPtr = &Guid;
998 } else {
999 //
1000 // Protocol is a Name, convert it to GUID
1001 //
1002 Status = GetGuidFromStringName (Protocol, Language, &GuidPtr);
1003 if (EFI_ERROR (Status)) {
1004 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_NO_NAME_FOUND), gShellDriver1HiiHandle, Protocol);
1005 return (SHELL_NOT_FOUND);
1006 }
1007 }
1008
1009 return DoDhByProtocolGuid (GuidPtr, Verbose, Sfo, Language, DriverInfo);
1010 }
1011}
1012
1027 IN CONST CHAR16 *Protocol,
1028 IN CONST CHAR8 *Language
1029 )
1030{
1031 EFI_STATUS Status;
1032 EFI_GUID *Guids;
1033 EFI_GUID Guid;
1034 UINTN Counts;
1035 UINTN Index;
1036 CHAR16 *Name;
1037
1038 if (Protocol == NULL) {
1039 Counts = 0;
1040 Status = GetAllMappingGuids (NULL, &Counts);
1041 if (Status == EFI_BUFFER_TOO_SMALL) {
1042 Guids = AllocatePool (Counts * sizeof (EFI_GUID));
1043 if (Guids == NULL) {
1045 }
1046
1047 Status = GetAllMappingGuids (Guids, &Counts);
1048 if (Status == EFI_SUCCESS) {
1049 for (Index = 0; Index < Counts; Index++) {
1050 Name = GetStringNameFromGuid (&Guids[Index], Language);
1051 if (Name != NULL) {
1052 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DECODE), gShellDriver1HiiHandle, Name, &Guids[Index]);
1053 } else {
1054 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_NO_GUID_FOUND), gShellDriver1HiiHandle, &Guids[Index]);
1055 }
1056
1057 SHELL_FREE_NON_NULL (Name);
1058 }
1059 }
1060
1061 FreePool (Guids);
1062 }
1063 } else {
1064 if (ConvertStrToGuid (Protocol, &Guid) == EFI_SUCCESS) {
1065 Name = GetStringNameFromGuid (&Guid, Language);
1066 if (Name != NULL) {
1067 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DECODE), gShellDriver1HiiHandle, Name, &Guid);
1068 } else {
1069 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_NO_GUID_FOUND), gShellDriver1HiiHandle, &Guid);
1070 }
1071
1072 SHELL_FREE_NON_NULL (Name);
1073 } else {
1074 Status = GetGuidFromStringName (Protocol, Language, &Guids);
1075 if (Status == EFI_SUCCESS) {
1076 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DECODE), gShellDriver1HiiHandle, Protocol, Guids);
1077 } else {
1078 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DH_NO_NAME_FOUND), gShellDriver1HiiHandle, Protocol);
1079 }
1080 }
1081 }
1082
1083 return SHELL_SUCCESS;
1084}
1085
1093EFIAPI
1095 IN EFI_HANDLE ImageHandle,
1096 IN EFI_SYSTEM_TABLE *SystemTable
1097 )
1098{
1099 EFI_STATUS Status;
1100 LIST_ENTRY *Package;
1101 CHAR16 *ProblemParam;
1102 SHELL_STATUS ShellStatus;
1103 CHAR8 *Language;
1104 CONST CHAR16 *Lang;
1105 CONST CHAR16 *RawValue;
1106 CONST CHAR16 *ProtocolVal;
1107 BOOLEAN SfoFlag;
1108 BOOLEAN DriverFlag;
1109 BOOLEAN VerboseFlag;
1110 UINT64 Intermediate;
1111 EFI_HANDLE Handle;
1112
1113 ShellStatus = SHELL_SUCCESS;
1114 Status = EFI_SUCCESS;
1115 Language = NULL;
1116
1117 //
1118 // initialize the shell lib (we must be in non-auto-init...)
1119 //
1120 Status = ShellInitialize ();
1121 ASSERT_EFI_ERROR (Status);
1122
1123 Status = CommandInit ();
1124 ASSERT_EFI_ERROR (Status);
1125
1126 //
1127 // parse the command line
1128 //
1129 Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
1130 if (EFI_ERROR (Status)) {
1131 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam != NULL)) {
1132 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"dh", ProblemParam);
1133 FreePool (ProblemParam);
1134 ShellStatus = SHELL_INVALID_PARAMETER;
1135 } else {
1136 ASSERT (FALSE);
1137 }
1138 } else {
1139 if (ShellCommandLineGetCount (Package) > 2) {
1140 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"dh");
1142 return (SHELL_INVALID_PARAMETER);
1143 }
1144
1145 if (ShellCommandLineGetFlag (Package, L"-l")) {
1146 Lang = ShellCommandLineGetValue (Package, L"-l");
1147 if (Lang != NULL) {
1148 Language = AllocateZeroPool (StrSize (Lang));
1149 if (Language == NULL) {
1150 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDriver1HiiHandle, L"dh");
1152 return (SHELL_OUT_OF_RESOURCES);
1153 }
1154
1155 AsciiSPrint (Language, StrSize (Lang), "%S", Lang);
1156 } else {
1157 ASSERT (Language == NULL);
1158 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"dh", L"-l");
1160 return (SHELL_INVALID_PARAMETER);
1161 }
1162 } else {
1163 Language = AllocateZeroPool (10);
1164 if (Language == NULL) {
1165 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDriver1HiiHandle, L"dh");
1167 return (SHELL_OUT_OF_RESOURCES);
1168 }
1169
1170 AsciiSPrint (Language, 10, "en-us");
1171 }
1172
1173 SfoFlag = ShellCommandLineGetFlag (Package, L"-sfo");
1174 DriverFlag = ShellCommandLineGetFlag (Package, L"-d");
1175 VerboseFlag = (BOOLEAN)(ShellCommandLineGetFlag (Package, L"-v") || ShellCommandLineGetFlag (Package, L"-verbose"));
1176 RawValue = ShellCommandLineGetRawValue (Package, 1);
1177 ProtocolVal = ShellCommandLineGetValue (Package, L"-p");
1178
1179 if (RawValue == NULL) {
1180 if (ShellCommandLineGetFlag (Package, L"-p") && (ProtocolVal == NULL)) {
1181 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"dh", L"-p");
1182 ShellStatus = SHELL_INVALID_PARAMETER;
1183 } else {
1184 //
1185 // Print information by protocol, The ProtocolVal maybe is name or GUID or NULL.
1186 //
1187 ShellStatus = DoDhByProtocol (ProtocolVal, VerboseFlag, SfoFlag, Language, DriverFlag);
1188 }
1189 } else if ((RawValue != NULL) &&
1190 (gUnicodeCollation->StriColl (gUnicodeCollation, L"decode", (CHAR16 *)RawValue) == 0))
1191 {
1192 if (ShellCommandLineGetFlag (Package, L"-p") && (ProtocolVal == NULL)) {
1193 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"dh", L"-p");
1194 ShellStatus = SHELL_INVALID_PARAMETER;
1195 } else {
1196 //
1197 // Print decode informatino by protocol.
1198 //
1199 ShellStatus = DoDecodeByProtocol (ProtocolVal, Language);
1200 }
1201 } else {
1202 if (ShellCommandLineGetFlag (Package, L"-p")) {
1203 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"dh");
1204 ShellStatus = SHELL_INVALID_PARAMETER;
1205 } else {
1206 Status = ShellConvertStringToUint64 (RawValue, &Intermediate, TRUE, FALSE);
1207 if (EFI_ERROR (Status)) {
1208 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"dh", RawValue);
1209 ShellStatus = SHELL_INVALID_PARAMETER;
1210 } else {
1211 Handle = ConvertHandleIndexToHandle ((UINTN)Intermediate);
1212 if (Handle == NULL) {
1213 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"dh", RawValue);
1214 ShellStatus = SHELL_INVALID_PARAMETER;
1215 } else {
1216 //
1217 // Print information by handle.
1218 //
1219 DoDhByHandle (Handle, VerboseFlag, SfoFlag, Language, DriverFlag, FALSE);
1220 }
1221 }
1222 }
1223 }
1224
1226 SHELL_FREE_NON_NULL (Language);
1227 }
1228
1229 return (ShellStatus);
1230}
UINT64 UINTN
UINT64 EFIAPI StrHexToUint64(IN CONST CHAR16 *String)
Definition: String.c:560
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
Definition: String.c:72
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: LShiftU64.c:28
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
CHAR16 *EFIAPI ConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
SHELL_STATUS DoDhByProtocolGuid(IN CONST GUID *Guid, IN CONST BOOLEAN Verbose, IN CONST BOOLEAN Sfo, IN CONST CHAR8 *Language, IN CONST BOOLEAN DriverInfo)
Definition: Dh.c:933
EFI_STATUS DisplayDriverModelHandle(IN EFI_HANDLE Handle, IN BOOLEAN BestName, IN CONST CHAR8 *Language OPTIONAL)
Definition: Dh.c:416
SHELL_STATUS DoDhForHandleList(IN CONST EFI_HANDLE *HandleList, IN CONST BOOLEAN Verbose, IN CONST BOOLEAN Sfo, IN CONST CHAR8 *Language, IN CONST BOOLEAN DriverInfo)
Definition: Dh.c:896
SHELL_STATUS DoDecodeByProtocol(IN CONST CHAR16 *Protocol, IN CONST CHAR8 *Language)
Definition: Dh.c:1026
SHELL_STATUS EFIAPI ShellCommandRunDh(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: Dh.c:1094
BOOLEAN IsValidGuidString(IN CONST CHAR16 *String)
Definition: Dh.c:51
EFI_STATUS ConvertStrToGuid(IN CONST CHAR16 *String, OUT GUID *Guid)
Definition: Dh.c:128
VOID DoDhByHandle(IN CONST EFI_HANDLE TheHandle, IN CONST BOOLEAN Verbose, IN CONST BOOLEAN Sfo, IN CONST CHAR8 *Language, IN CONST BOOLEAN DriverInfo, IN CONST BOOLEAN Multiple)
Definition: Dh.c:807
BOOLEAN IsDriverProt(IN CONST EFI_GUID *Guid)
Definition: Dh.c:246
EFI_STATUS GetDriverImageName(IN EFI_HANDLE TheHandle, OUT CHAR16 **Name)
Definition: Dh.c:377
CHAR16 * GetProtocolInfoString(IN CONST EFI_HANDLE TheHandle, IN CONST CHAR8 *Language, IN CONST CHAR16 *Separator, IN CONST BOOLEAN Verbose, IN CONST BOOLEAN ExtraInfo)
Definition: Dh.c:281
SHELL_STATUS DoDhByProtocol(IN CONST CHAR16 *Protocol, IN CONST BOOLEAN Verbose, IN CONST BOOLEAN Sfo, IN CONST CHAR8 *Language, IN CONST BOOLEAN DriverInfo)
Definition: Dh.c:980
UINTN HexCharToDecimal(IN CHAR16 Char)
Definition: Dh.c:105
EFI_STATUS GetDriverName(IN EFI_HANDLE TheHandle, IN CONST CHAR8 *Language, IN CHAR16 **NameFound)
Definition: Dh.c:184
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI GetAllMappingGuids(OUT EFI_GUID *Guids, IN OUT UINTN *Count)
CHAR16 *EFIAPI GetProtocolInformationDump(IN CONST EFI_HANDLE TheHandle, IN CONST EFI_GUID *Guid, IN CONST BOOLEAN Verbose)
#define PARSE_HANDLE_DATABASE_MANAGED_CHILDREN(DriverHandle, ControllerHandle, Count, Buffer)
CHAR16 *EFIAPI GetStringNameFromGuid(IN CONST EFI_GUID *Guid, IN CONST CHAR8 *Lang OPTIONAL)
CHAR8 *EFIAPI GetBestLanguageForDriver(IN CONST CHAR8 *SupportedLanguages, IN CONST CHAR8 *InputLanguage, IN BOOLEAN Iso639Language)
EFI_STATUS EFIAPI GetGuidFromStringName(IN CONST CHAR16 *Name, IN CONST CHAR8 *Lang OPTIONAL, OUT EFI_GUID **Guid)
EFI_HANDLE EFIAPI ConvertHandleIndexToHandle(IN CONST UINTN TheIndex)
#define PARSE_HANDLE_DATABASE_DEVICES(DriverHandle, Count, Buffer)
#define PARSE_HANDLE_DATABASE_PARENTS(ControllerHandle, Count, Buffer)
#define PARSE_HANDLE_DATABASE_UEFI_DRIVERS(ControllerHandle, Count, Buffer)
UINTN EFIAPI ConvertHandleToHandleIndex(IN CONST EFI_HANDLE TheHandle)
EFI_STATUS EFIAPI ParseHandleDatabaseForChildControllers(IN CONST EFI_HANDLE ControllerHandle, OUT UINTN *MatchingHandleCount, OUT EFI_HANDLE **MatchingHandleBuffer OPTIONAL)
EFI_HANDLE *EFIAPI GetHandleListByProtocol(IN CONST EFI_GUID *ProtocolGuid OPTIONAL)
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:408
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
Definition: PrintLib.c:813
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
SHELL_STATUS
Definition: Shell.h:21
@ SHELL_OUT_OF_RESOURCES
Definition: Shell.h:73
@ SHELL_ABORTED
Definition: Shell.h:128
@ SHELL_SUCCESS
Definition: Shell.h:25
@ SHELL_NOT_FOUND
Definition: Shell.h:101
@ SHELL_INVALID_PARAMETER
Definition: Shell.h:35
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI CommandInit(VOID)
CONST CHAR16 *EFIAPI ShellCommandLineGetValue(IN CONST LIST_ENTRY *CheckPackage, IN CHAR16 *KeyString)
BOOLEAN EFIAPI ShellGetExecutionBreakFlag(VOID)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
Definition: ShellLib.h:755
EFI_STATUS EFIAPI ShellPrintHiiEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR8 *Language OPTIONAL, IN CONST EFI_STRING_ID HiiFormatStringId, IN CONST EFI_HII_HANDLE HiiFormatHandle,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
Definition: ShellLib.h:700
@ TypeFlag
A flag that is present or not present only (IE "-a").
Definition: ShellLib.h:699
CHAR16 *EFIAPI StrnCatGrow(IN OUT CHAR16 **Destination, IN OUT UINTN *CurrentSize, IN CONST CHAR16 *Source, IN UINTN Count)
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellInitialize(VOID)
Definition: UefiShellLib.c:532
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
UINTN EFIAPI ShellCommandLineGetCount(IN CONST LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellConvertStringToUint64(IN CONST CHAR16 *String, OUT UINT64 *Value, IN CONST BOOLEAN ForceHex, IN CONST BOOLEAN StopAtSpace)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_HANDLE gImageHandle
EFI_BOOT_SERVICES * gBS
#define STRING_TOKEN(t)
EFI_DEVICE_PATH_PROTOCOL * FilePath
Definition: LoadedImage.h:54
Definition: Base.h:213