TianoCore EDK2 master
Loading...
Searching...
No Matches
DevicePathToText.c
Go to the documentation of this file.
1
10#include "UefiDevicePathLib.h"
11
26CHAR16 *
27EFIAPI
29 IN OUT POOL_PRINT *Str,
30 IN CHAR16 *Fmt,
31 ...
32 )
33{
34 UINTN Count;
35 VA_LIST Args;
36
37 VA_START (Args, Fmt);
38 Count = SPrintLength (Fmt, Args);
39 VA_END (Args);
40
41 if ((Str->Count + (Count + 1)) * sizeof (CHAR16) > Str->Capacity) {
42 Str->Capacity = (Str->Count + (Count + 1) * 2) * sizeof (CHAR16);
43 Str->Str = ReallocatePool (
44 Str->Count * sizeof (CHAR16),
45 Str->Capacity,
46 Str->Str
47 );
48 ASSERT (Str->Str != NULL);
49 }
50
51 VA_START (Args, Fmt);
52 UnicodeVSPrint (&Str->Str[Str->Count], Str->Capacity - Str->Count * sizeof (CHAR16), Fmt, Args);
53 Str->Count += Count;
54
55 VA_END (Args);
56 return Str->Str;
57}
58
72VOID
74 IN OUT POOL_PRINT *Str,
75 IN VOID *DevPath,
76 IN BOOLEAN DisplayOnly,
77 IN BOOLEAN AllowShortcuts
78 )
79{
80 PCI_DEVICE_PATH *Pci;
81
82 Pci = DevPath;
83 UefiDevicePathLibCatPrint (Str, L"Pci(0x%x,0x%x)", Pci->Device, Pci->Function);
84}
85
99VOID
101 IN OUT POOL_PRINT *Str,
102 IN VOID *DevPath,
103 IN BOOLEAN DisplayOnly,
104 IN BOOLEAN AllowShortcuts
105 )
106{
107 PCCARD_DEVICE_PATH *Pccard;
108
109 Pccard = DevPath;
110 UefiDevicePathLibCatPrint (Str, L"PcCard(0x%x)", Pccard->FunctionNumber);
111}
112
126VOID
128 IN OUT POOL_PRINT *Str,
129 IN VOID *DevPath,
130 IN BOOLEAN DisplayOnly,
131 IN BOOLEAN AllowShortcuts
132 )
133{
134 MEMMAP_DEVICE_PATH *MemMap;
135
136 MemMap = DevPath;
138 Str,
139 L"MemoryMapped(0x%x,0x%lx,0x%lx)",
140 MemMap->MemoryType,
141 MemMap->StartingAddress,
142 MemMap->EndingAddress
143 );
144}
145
159VOID
161 IN OUT POOL_PRINT *Str,
162 IN VOID *DevPath,
163 IN BOOLEAN DisplayOnly,
164 IN BOOLEAN AllowShortcuts
165 )
166{
167 VENDOR_DEVICE_PATH *Vendor;
168 CHAR16 *Type;
169 UINTN Index;
170 UINTN DataLength;
171 UINT32 FlowControlMap;
172 UINT16 Info;
173
174 Vendor = (VENDOR_DEVICE_PATH *)DevPath;
175 switch (DevicePathType (&Vendor->Header)) {
177 Type = L"Hw";
178 break;
179
181 Type = L"Msg";
182 if (AllowShortcuts) {
183 if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) {
184 UefiDevicePathLibCatPrint (Str, L"VenPcAnsi()");
185 return;
186 } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) {
187 UefiDevicePathLibCatPrint (Str, L"VenVt100()");
188 return;
189 } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {
190 UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()");
191 return;
192 } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {
193 UefiDevicePathLibCatPrint (Str, L"VenUtf8()");
194 return;
195 } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {
196 FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *)Vendor)->FlowControlMap);
197 switch (FlowControlMap & 0x00000003) {
198 case 0:
199 UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"None");
200 break;
201
202 case 1:
203 UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"Hardware");
204 break;
205
206 case 2:
207 UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"XonXoff");
208 break;
209
210 default:
211 break;
212 }
213
214 return;
215 } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) {
217 Str,
218 L"SAS(0x%lx,0x%lx,0x%x,",
219 ((SAS_DEVICE_PATH *)Vendor)->SasAddress,
220 ((SAS_DEVICE_PATH *)Vendor)->Lun,
221 ((SAS_DEVICE_PATH *)Vendor)->RelativeTargetPort
222 );
223 Info = (((SAS_DEVICE_PATH *)Vendor)->DeviceTopology);
224 if (((Info & 0x0f) == 0) && ((Info & BIT7) == 0)) {
225 UefiDevicePathLibCatPrint (Str, L"NoTopology,0,0,0,");
226 } else if (((Info & 0x0f) <= 2) && ((Info & BIT7) == 0)) {
228 Str,
229 L"%s,%s,%s,",
230 ((Info & BIT4) != 0) ? L"SATA" : L"SAS",
231 ((Info & BIT5) != 0) ? L"External" : L"Internal",
232 ((Info & BIT6) != 0) ? L"Expanded" : L"Direct"
233 );
234 if ((Info & 0x0f) == 1) {
235 UefiDevicePathLibCatPrint (Str, L"0,");
236 } else {
237 //
238 // Value 0x0 thru 0xFF -> Drive 1 thru Drive 256
239 //
240 UefiDevicePathLibCatPrint (Str, L"0x%x,", ((Info >> 8) & 0xff) + 1);
241 }
242 } else {
243 UefiDevicePathLibCatPrint (Str, L"0x%x,0,0,0,", Info);
244 }
245
246 UefiDevicePathLibCatPrint (Str, L"0x%x)", ((SAS_DEVICE_PATH *)Vendor)->Reserved);
247 return;
248 } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) {
249 UefiDevicePathLibCatPrint (Str, L"DebugPort()");
250 return;
251 }
252 }
253
254 break;
255
256 case MEDIA_DEVICE_PATH:
257 Type = L"Media";
258 break;
259
260 default:
261 Type = L"?";
262 break;
263 }
264
265 DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH);
266 UefiDevicePathLibCatPrint (Str, L"Ven%s(%g", Type, &Vendor->Guid);
267 if (DataLength != 0) {
268 UefiDevicePathLibCatPrint (Str, L",");
269 for (Index = 0; Index < DataLength; Index++) {
270 UefiDevicePathLibCatPrint (Str, L"%02x", ((VENDOR_DEVICE_PATH_WITH_DATA *)Vendor)->VendorDefinedData[Index]);
271 }
272 }
273
274 UefiDevicePathLibCatPrint (Str, L")");
275}
276
290VOID
292 IN OUT POOL_PRINT *Str,
293 IN VOID *DevPath,
294 IN BOOLEAN DisplayOnly,
295 IN BOOLEAN AllowShortcuts
296 )
297{
298 CONTROLLER_DEVICE_PATH *Controller;
299
300 Controller = DevPath;
302 Str,
303 L"Ctrl(0x%x)",
304 Controller->ControllerNumber
305 );
306}
307
321VOID
323 IN OUT POOL_PRINT *Str,
324 IN VOID *DevPath,
325 IN BOOLEAN DisplayOnly,
326 IN BOOLEAN AllowShortcuts
327 )
328{
329 BMC_DEVICE_PATH *Bmc;
330
331 Bmc = DevPath;
333 Str,
334 L"BMC(0x%x,0x%lx)",
335 Bmc->InterfaceType,
336 ReadUnaligned64 ((UINT64 *)(&Bmc->BaseAddress))
337 );
338}
339
353VOID
355 IN OUT POOL_PRINT *Str,
356 IN VOID *DevPath,
357 IN BOOLEAN DisplayOnly,
358 IN BOOLEAN AllowShortcuts
359 )
360{
362
363 Acpi = DevPath;
364 if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
365 switch (EISA_ID_TO_NUM (Acpi->HID)) {
366 case 0x0a03:
367 UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", Acpi->UID);
368 break;
369
370 case 0x0a08:
371 UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", Acpi->UID);
372 break;
373
374 case 0x0604:
375 UefiDevicePathLibCatPrint (Str, L"Floppy(0x%x)", Acpi->UID);
376 break;
377
378 case 0x0301:
379 UefiDevicePathLibCatPrint (Str, L"Keyboard(0x%x)", Acpi->UID);
380 break;
381
382 case 0x0501:
383 UefiDevicePathLibCatPrint (Str, L"Serial(0x%x)", Acpi->UID);
384 break;
385
386 case 0x0401:
387 UefiDevicePathLibCatPrint (Str, L"ParallelPort(0x%x)", Acpi->UID);
388 break;
389
390 default:
391 UefiDevicePathLibCatPrint (Str, L"Acpi(PNP%04x,0x%x)", EISA_ID_TO_NUM (Acpi->HID), Acpi->UID);
392 break;
393 }
394 } else {
395 UefiDevicePathLibCatPrint (Str, L"Acpi(0x%08x,0x%x)", Acpi->HID, Acpi->UID);
396 }
397}
398
412VOID
414 IN OUT POOL_PRINT *Str,
415 IN VOID *DevPath,
416 IN BOOLEAN DisplayOnly,
417 IN BOOLEAN AllowShortcuts
418 )
419{
421 CHAR16 HIDText[11];
422 CHAR16 CIDText[11];
423 UINTN CurrentLength;
424 CHAR8 *CurrentPos;
425 UINTN NextStringOffset;
426 CHAR8 *Strings[3];
427 UINT8 HidStrIndex;
428 UINT8 UidStrIndex;
429 UINT8 CidStrIndex;
430 UINT8 StrIndex;
431
432 HidStrIndex = 0;
433 UidStrIndex = 1;
434 CidStrIndex = 2;
435 AcpiEx = DevPath;
436 Strings[HidStrIndex] = NULL;
437 Strings[UidStrIndex] = NULL;
438 Strings[CidStrIndex] = NULL;
439 CurrentLength = sizeof (ACPI_EXTENDED_HID_DEVICE_PATH);
440 CurrentPos = (CHAR8 *)(((UINT8 *)AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH));
441 StrIndex = 0;
442 while (CurrentLength < AcpiEx->Header.Length[0] && StrIndex < ARRAY_SIZE (Strings)) {
443 Strings[StrIndex] = CurrentPos;
444 NextStringOffset = AsciiStrLen (CurrentPos) + 1;
445 CurrentLength += NextStringOffset;
446 CurrentPos += NextStringOffset;
447 StrIndex++;
448 }
449
450 if (DisplayOnly) {
451 if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) ||
452 ((EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03) && (EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)))
453 {
454 if (Strings[UidStrIndex] != NULL) {
455 UefiDevicePathLibCatPrint (Str, L"PciRoot(%a)", Strings[UidStrIndex]);
456 } else {
457 UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", AcpiEx->UID);
458 }
459
460 return;
461 }
462
463 if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08) || (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08)) {
464 if (Strings[UidStrIndex] != NULL) {
465 UefiDevicePathLibCatPrint (Str, L"PcieRoot(%a)", Strings[UidStrIndex]);
466 } else {
467 UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", AcpiEx->UID);
468 }
469
470 return;
471 }
472 }
473
474 //
475 // Converts EISA identification to string.
476 //
478 HIDText,
479 sizeof (HIDText),
480 L"%c%c%c%04X",
481 ((AcpiEx->HID >> 10) & 0x1f) + 'A' - 1,
482 ((AcpiEx->HID >> 5) & 0x1f) + 'A' - 1,
483 ((AcpiEx->HID >> 0) & 0x1f) + 'A' - 1,
484 (AcpiEx->HID >> 16) & 0xFFFF
485 );
487 CIDText,
488 sizeof (CIDText),
489 L"%c%c%c%04X",
490 ((AcpiEx->CID >> 10) & 0x1f) + 'A' - 1,
491 ((AcpiEx->CID >> 5) & 0x1f) + 'A' - 1,
492 ((AcpiEx->CID >> 0) & 0x1f) + 'A' - 1,
493 (AcpiEx->CID >> 16) & 0xFFFF
494 );
495
496 if (((Strings[HidStrIndex] != NULL) && (*Strings[HidStrIndex] == '\0')) &&
497 ((Strings[CidStrIndex] != NULL) && (*Strings[CidStrIndex] == '\0')) &&
498 ((Strings[UidStrIndex] != NULL) && (*Strings[UidStrIndex] != '\0')))
499 {
500 //
501 // use AcpiExp()
502 //
503 if (AcpiEx->CID == 0) {
505 Str,
506 L"AcpiExp(%s,0,%a)",
507 HIDText,
508 Strings[UidStrIndex]
509 );
510 } else {
512 Str,
513 L"AcpiExp(%s,%s,%a)",
514 HIDText,
515 CIDText,
516 Strings[UidStrIndex]
517 );
518 }
519 } else {
520 if (DisplayOnly) {
521 if (Strings[HidStrIndex] != NULL) {
522 UefiDevicePathLibCatPrint (Str, L"AcpiEx(%a,", Strings[HidStrIndex]);
523 } else {
524 UefiDevicePathLibCatPrint (Str, L"AcpiEx(%s,", HIDText);
525 }
526
527 if (Strings[CidStrIndex] != NULL) {
528 UefiDevicePathLibCatPrint (Str, L"%a,", Strings[CidStrIndex]);
529 } else {
530 UefiDevicePathLibCatPrint (Str, L"%s,", CIDText);
531 }
532
533 if (Strings[UidStrIndex] != NULL) {
534 UefiDevicePathLibCatPrint (Str, L"%a)", Strings[UidStrIndex]);
535 } else {
536 UefiDevicePathLibCatPrint (Str, L"0x%x)", AcpiEx->UID);
537 }
538 } else {
540 Str,
541 L"AcpiEx(%s,%s,0x%x,%a,%a,%a)",
542 HIDText,
543 CIDText,
544 AcpiEx->UID,
545 Strings[HidStrIndex] != NULL ? Strings[HidStrIndex] : '\0',
546 Strings[CidStrIndex] != NULL ? Strings[CidStrIndex] : '\0',
547 Strings[UidStrIndex] != NULL ? Strings[UidStrIndex] : '\0'
548 );
549 }
550 }
551}
552
566VOID
568 IN OUT POOL_PRINT *Str,
569 IN VOID *DevPath,
570 IN BOOLEAN DisplayOnly,
571 IN BOOLEAN AllowShortcuts
572 )
573{
574 ACPI_ADR_DEVICE_PATH *AcpiAdr;
575 UINT16 Index;
576 UINT16 Length;
577 UINT16 AdditionalAdrCount;
578
579 AcpiAdr = DevPath;
580 Length = (UINT16)DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *)AcpiAdr);
581 AdditionalAdrCount = (UINT16)((Length - 8) / 4);
582
583 UefiDevicePathLibCatPrint (Str, L"AcpiAdr(0x%x", AcpiAdr->ADR);
584 for (Index = 0; Index < AdditionalAdrCount; Index++) {
585 UefiDevicePathLibCatPrint (Str, L",0x%x", *(UINT32 *)((UINT8 *)AcpiAdr + 8 + Index * 4));
586 }
587
588 UefiDevicePathLibCatPrint (Str, L")");
589}
590
604VOID
606 IN OUT POOL_PRINT *Str,
607 IN VOID *DevPath,
608 IN BOOLEAN DisplayOnly,
609 IN BOOLEAN AllowShortcuts
610 )
611{
612 ATAPI_DEVICE_PATH *Atapi;
613
614 Atapi = DevPath;
615
616 if (DisplayOnly) {
617 UefiDevicePathLibCatPrint (Str, L"Ata(0x%x)", Atapi->Lun);
618 } else {
620 Str,
621 L"Ata(%s,%s,0x%x)",
622 (Atapi->PrimarySecondary == 1) ? L"Secondary" : L"Primary",
623 (Atapi->SlaveMaster == 1) ? L"Slave" : L"Master",
624 Atapi->Lun
625 );
626 }
627}
628
642VOID
644 IN OUT POOL_PRINT *Str,
645 IN VOID *DevPath,
646 IN BOOLEAN DisplayOnly,
647 IN BOOLEAN AllowShortcuts
648 )
649{
650 SCSI_DEVICE_PATH *Scsi;
651
652 Scsi = DevPath;
653 UefiDevicePathLibCatPrint (Str, L"Scsi(0x%x,0x%x)", Scsi->Pun, Scsi->Lun);
654}
655
669VOID
671 IN OUT POOL_PRINT *Str,
672 IN VOID *DevPath,
673 IN BOOLEAN DisplayOnly,
674 IN BOOLEAN AllowShortcuts
675 )
676{
678
679 Fibre = DevPath;
680 UefiDevicePathLibCatPrint (Str, L"Fibre(0x%lx,0x%lx)", Fibre->WWN, Fibre->Lun);
681}
682
696VOID
698 IN OUT POOL_PRINT *Str,
699 IN VOID *DevPath,
700 IN BOOLEAN DisplayOnly,
701 IN BOOLEAN AllowShortcuts
702 )
703{
705 UINTN Index;
706
707 FibreEx = DevPath;
708 UefiDevicePathLibCatPrint (Str, L"FibreEx(0x");
709 for (Index = 0; Index < sizeof (FibreEx->WWN) / sizeof (FibreEx->WWN[0]); Index++) {
710 UefiDevicePathLibCatPrint (Str, L"%02x", FibreEx->WWN[Index]);
711 }
712
713 UefiDevicePathLibCatPrint (Str, L",0x");
714 for (Index = 0; Index < sizeof (FibreEx->Lun) / sizeof (FibreEx->Lun[0]); Index++) {
715 UefiDevicePathLibCatPrint (Str, L"%02x", FibreEx->Lun[Index]);
716 }
717
718 UefiDevicePathLibCatPrint (Str, L")");
719}
720
734VOID
736 IN OUT POOL_PRINT *Str,
737 IN VOID *DevPath,
738 IN BOOLEAN DisplayOnly,
739 IN BOOLEAN AllowShortcuts
740 )
741{
742 SASEX_DEVICE_PATH *SasEx;
743 UINTN Index;
744
745 SasEx = DevPath;
746 UefiDevicePathLibCatPrint (Str, L"SasEx(0x");
747
748 for (Index = 0; Index < sizeof (SasEx->SasAddress) / sizeof (SasEx->SasAddress[0]); Index++) {
749 UefiDevicePathLibCatPrint (Str, L"%02x", SasEx->SasAddress[Index]);
750 }
751
752 UefiDevicePathLibCatPrint (Str, L",0x");
753 for (Index = 0; Index < sizeof (SasEx->Lun) / sizeof (SasEx->Lun[0]); Index++) {
754 UefiDevicePathLibCatPrint (Str, L"%02x", SasEx->Lun[Index]);
755 }
756
757 UefiDevicePathLibCatPrint (Str, L",0x%x,", SasEx->RelativeTargetPort);
758
759 if (((SasEx->DeviceTopology & 0x0f) == 0) && ((SasEx->DeviceTopology & BIT7) == 0)) {
760 UefiDevicePathLibCatPrint (Str, L"NoTopology,0,0,0");
761 } else if (((SasEx->DeviceTopology & 0x0f) <= 2) && ((SasEx->DeviceTopology & BIT7) == 0)) {
763 Str,
764 L"%s,%s,%s,",
765 ((SasEx->DeviceTopology & BIT4) != 0) ? L"SATA" : L"SAS",
766 ((SasEx->DeviceTopology & BIT5) != 0) ? L"External" : L"Internal",
767 ((SasEx->DeviceTopology & BIT6) != 0) ? L"Expanded" : L"Direct"
768 );
769 if ((SasEx->DeviceTopology & 0x0f) == 1) {
770 UefiDevicePathLibCatPrint (Str, L"0");
771 } else {
772 //
773 // Value 0x0 thru 0xFF -> Drive 1 thru Drive 256
774 //
775 UefiDevicePathLibCatPrint (Str, L"0x%x", ((SasEx->DeviceTopology >> 8) & 0xff) + 1);
776 }
777 } else {
778 UefiDevicePathLibCatPrint (Str, L"0x%x,0,0,0", SasEx->DeviceTopology);
779 }
780
781 UefiDevicePathLibCatPrint (Str, L")");
782 return;
783}
784
798VOID
800 IN OUT POOL_PRINT *Str,
801 IN VOID *DevPath,
802 IN BOOLEAN DisplayOnly,
803 IN BOOLEAN AllowShortcuts
804 )
805{
807 UINT8 *Uuid;
808
809 Nvme = DevPath;
810 Uuid = (UINT8 *)&Nvme->NamespaceUuid;
812 Str,
813 L"NVMe(0x%x,%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x)",
814 Nvme->NamespaceId,
815 Uuid[7],
816 Uuid[6],
817 Uuid[5],
818 Uuid[4],
819 Uuid[3],
820 Uuid[2],
821 Uuid[1],
822 Uuid[0]
823 );
824}
825
839VOID
841 IN OUT POOL_PRINT *Str,
842 IN VOID *DevPath,
843 IN BOOLEAN DisplayOnly,
844 IN BOOLEAN AllowShortcuts
845 )
846{
847 UFS_DEVICE_PATH *Ufs;
848
849 Ufs = DevPath;
850 UefiDevicePathLibCatPrint (Str, L"UFS(0x%x,0x%x)", Ufs->Pun, Ufs->Lun);
851}
852
866VOID
868 IN OUT POOL_PRINT *Str,
869 IN VOID *DevPath,
870 IN BOOLEAN DisplayOnly,
871 IN BOOLEAN AllowShortcuts
872 )
873{
874 SD_DEVICE_PATH *Sd;
875
876 Sd = DevPath;
878 Str,
879 L"SD(0x%x)",
880 Sd->SlotNumber
881 );
882}
883
897VOID
899 IN OUT POOL_PRINT *Str,
900 IN VOID *DevPath,
901 IN BOOLEAN DisplayOnly,
902 IN BOOLEAN AllowShortcuts
903 )
904{
905 EMMC_DEVICE_PATH *Emmc;
906
907 Emmc = DevPath;
909 Str,
910 L"eMMC(0x%x)",
911 Emmc->SlotNumber
912 );
913}
914
928VOID
930 IN OUT POOL_PRINT *Str,
931 IN VOID *DevPath,
932 IN BOOLEAN DisplayOnly,
933 IN BOOLEAN AllowShortcuts
934 )
935{
936 F1394_DEVICE_PATH *F1394DevPath;
937
938 F1394DevPath = DevPath;
939 //
940 // Guid has format of IEEE-EUI64
941 //
942 UefiDevicePathLibCatPrint (Str, L"I1394(%016lx)", F1394DevPath->Guid);
943}
944
958VOID
960 IN OUT POOL_PRINT *Str,
961 IN VOID *DevPath,
962 IN BOOLEAN DisplayOnly,
963 IN BOOLEAN AllowShortcuts
964 )
965{
966 USB_DEVICE_PATH *Usb;
967
968 Usb = DevPath;
969 UefiDevicePathLibCatPrint (Str, L"USB(0x%x,0x%x)", Usb->ParentPortNumber, Usb->InterfaceNumber);
970}
971
985VOID
987 IN OUT POOL_PRINT *Str,
988 IN VOID *DevPath,
989 IN BOOLEAN DisplayOnly,
990 IN BOOLEAN AllowShortcuts
991 )
992{
993 USB_WWID_DEVICE_PATH *UsbWWId;
994 CHAR16 *SerialNumberStr;
995 CHAR16 *NewStr;
996 UINT16 Length;
997
998 UsbWWId = DevPath;
999
1000 SerialNumberStr = (CHAR16 *)((UINT8 *)UsbWWId + sizeof (USB_WWID_DEVICE_PATH));
1001 Length = (UINT16)((DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *)UsbWWId) - sizeof (USB_WWID_DEVICE_PATH)) / sizeof (CHAR16));
1002 if ((Length >= 1) && (SerialNumberStr[Length - 1] != 0)) {
1003 //
1004 // In case no NULL terminator in SerialNumber, create a new one with NULL terminator
1005 //
1006 NewStr = AllocatePool ((Length + 1) * sizeof (CHAR16));
1007 ASSERT (NewStr != NULL);
1008 CopyMem (NewStr, SerialNumberStr, Length * sizeof (CHAR16));
1009 NewStr[Length] = 0;
1010 SerialNumberStr = NewStr;
1011 }
1012
1014 Str,
1015 L"UsbWwid(0x%x,0x%x,0x%x,\"%s\")",
1016 UsbWWId->VendorId,
1017 UsbWWId->ProductId,
1018 UsbWWId->InterfaceNumber,
1019 SerialNumberStr
1020 );
1021}
1022
1036VOID
1038 IN OUT POOL_PRINT *Str,
1039 IN VOID *DevPath,
1040 IN BOOLEAN DisplayOnly,
1041 IN BOOLEAN AllowShortcuts
1042 )
1043{
1045
1046 LogicalUnit = DevPath;
1047 UefiDevicePathLibCatPrint (Str, L"Unit(0x%x)", LogicalUnit->Lun);
1048}
1049
1063VOID
1065 IN OUT POOL_PRINT *Str,
1066 IN VOID *DevPath,
1067 IN BOOLEAN DisplayOnly,
1068 IN BOOLEAN AllowShortcuts
1069 )
1070{
1071 USB_CLASS_DEVICE_PATH *UsbClass;
1072 BOOLEAN IsKnownSubClass;
1073
1074 UsbClass = DevPath;
1075
1076 IsKnownSubClass = TRUE;
1077 switch (UsbClass->DeviceClass) {
1078 case USB_CLASS_AUDIO:
1079 UefiDevicePathLibCatPrint (Str, L"UsbAudio");
1080 break;
1081
1082 case USB_CLASS_CDCCONTROL:
1083 UefiDevicePathLibCatPrint (Str, L"UsbCDCControl");
1084 break;
1085
1086 case USB_CLASS_HID:
1087 UefiDevicePathLibCatPrint (Str, L"UsbHID");
1088 break;
1089
1090 case USB_CLASS_IMAGE:
1091 UefiDevicePathLibCatPrint (Str, L"UsbImage");
1092 break;
1093
1094 case USB_CLASS_PRINTER:
1095 UefiDevicePathLibCatPrint (Str, L"UsbPrinter");
1096 break;
1097
1098 case USB_CLASS_MASS_STORAGE:
1099 UefiDevicePathLibCatPrint (Str, L"UsbMassStorage");
1100 break;
1101
1102 case USB_CLASS_HUB:
1103 UefiDevicePathLibCatPrint (Str, L"UsbHub");
1104 break;
1105
1106 case USB_CLASS_CDCDATA:
1107 UefiDevicePathLibCatPrint (Str, L"UsbCDCData");
1108 break;
1109
1110 case USB_CLASS_SMART_CARD:
1111 UefiDevicePathLibCatPrint (Str, L"UsbSmartCard");
1112 break;
1113
1114 case USB_CLASS_VIDEO:
1115 UefiDevicePathLibCatPrint (Str, L"UsbVideo");
1116 break;
1117
1118 case USB_CLASS_DIAGNOSTIC:
1119 UefiDevicePathLibCatPrint (Str, L"UsbDiagnostic");
1120 break;
1121
1122 case USB_CLASS_WIRELESS:
1123 UefiDevicePathLibCatPrint (Str, L"UsbWireless");
1124 break;
1125
1126 default:
1127 IsKnownSubClass = FALSE;
1128 break;
1129 }
1130
1131 if (IsKnownSubClass) {
1133 Str,
1134 L"(0x%x,0x%x,0x%x,0x%x)",
1135 UsbClass->VendorId,
1136 UsbClass->ProductId,
1137 UsbClass->DeviceSubClass,
1138 UsbClass->DeviceProtocol
1139 );
1140 return;
1141 }
1142
1143 if (UsbClass->DeviceClass == USB_CLASS_RESERVE) {
1144 if (UsbClass->DeviceSubClass == USB_SUBCLASS_FW_UPDATE) {
1146 Str,
1147 L"UsbDeviceFirmwareUpdate(0x%x,0x%x,0x%x)",
1148 UsbClass->VendorId,
1149 UsbClass->ProductId,
1150 UsbClass->DeviceProtocol
1151 );
1152 return;
1153 } else if (UsbClass->DeviceSubClass == USB_SUBCLASS_IRDA_BRIDGE) {
1155 Str,
1156 L"UsbIrdaBridge(0x%x,0x%x,0x%x)",
1157 UsbClass->VendorId,
1158 UsbClass->ProductId,
1159 UsbClass->DeviceProtocol
1160 );
1161 return;
1162 } else if (UsbClass->DeviceSubClass == USB_SUBCLASS_TEST) {
1164 Str,
1165 L"UsbTestAndMeasurement(0x%x,0x%x,0x%x)",
1166 UsbClass->VendorId,
1167 UsbClass->ProductId,
1168 UsbClass->DeviceProtocol
1169 );
1170 return;
1171 }
1172 }
1173
1175 Str,
1176 L"UsbClass(0x%x,0x%x,0x%x,0x%x,0x%x)",
1177 UsbClass->VendorId,
1178 UsbClass->ProductId,
1179 UsbClass->DeviceClass,
1180 UsbClass->DeviceSubClass,
1181 UsbClass->DeviceProtocol
1182 );
1183}
1184
1198VOID
1200 IN OUT POOL_PRINT *Str,
1201 IN VOID *DevPath,
1202 IN BOOLEAN DisplayOnly,
1203 IN BOOLEAN AllowShortcuts
1204 )
1205{
1206 SATA_DEVICE_PATH *Sata;
1207
1208 Sata = DevPath;
1210 Str,
1211 L"Sata(0x%x,0x%x,0x%x)",
1212 Sata->HBAPortNumber,
1214 Sata->Lun
1215 );
1216}
1217
1231VOID
1233 IN OUT POOL_PRINT *Str,
1234 IN VOID *DevPath,
1235 IN BOOLEAN DisplayOnly,
1236 IN BOOLEAN AllowShortcuts
1237 )
1238{
1239 I2O_DEVICE_PATH *I2ODevPath;
1240
1241 I2ODevPath = DevPath;
1242 UefiDevicePathLibCatPrint (Str, L"I2O(0x%x)", I2ODevPath->Tid);
1243}
1244
1258VOID
1260 IN OUT POOL_PRINT *Str,
1261 IN VOID *DevPath,
1262 IN BOOLEAN DisplayOnly,
1263 IN BOOLEAN AllowShortcuts
1264 )
1265{
1266 MAC_ADDR_DEVICE_PATH *MacDevPath;
1267 UINTN HwAddressSize;
1268 UINTN Index;
1269
1270 MacDevPath = DevPath;
1271
1272 HwAddressSize = sizeof (EFI_MAC_ADDRESS);
1273 if ((MacDevPath->IfType == 0x01) || (MacDevPath->IfType == 0x00)) {
1274 HwAddressSize = 6;
1275 }
1276
1277 UefiDevicePathLibCatPrint (Str, L"MAC(");
1278
1279 for (Index = 0; Index < HwAddressSize; Index++) {
1280 UefiDevicePathLibCatPrint (Str, L"%02x", MacDevPath->MacAddress.Addr[Index]);
1281 }
1282
1283 UefiDevicePathLibCatPrint (Str, L",0x%x)", MacDevPath->IfType);
1284}
1285
1293VOID
1295 IN OUT POOL_PRINT *Str,
1296 IN UINT16 Protocol
1297 )
1298{
1299 if (Protocol == RFC_1700_TCP_PROTOCOL) {
1300 UefiDevicePathLibCatPrint (Str, L"TCP");
1301 } else if (Protocol == RFC_1700_UDP_PROTOCOL) {
1302 UefiDevicePathLibCatPrint (Str, L"UDP");
1303 } else {
1304 UefiDevicePathLibCatPrint (Str, L"0x%x", Protocol);
1305 }
1306}
1307
1314VOID
1316 IN OUT POOL_PRINT *Str,
1317 IN EFI_IPv4_ADDRESS *Address
1318 )
1319{
1320 UefiDevicePathLibCatPrint (Str, L"%d.%d.%d.%d", Address->Addr[0], Address->Addr[1], Address->Addr[2], Address->Addr[3]);
1321}
1322
1329VOID
1331 IN OUT POOL_PRINT *Str,
1332 IN EFI_IPv6_ADDRESS *Address
1333 )
1334{
1336 Str,
1337 L"%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
1338 Address->Addr[0],
1339 Address->Addr[1],
1340 Address->Addr[2],
1341 Address->Addr[3],
1342 Address->Addr[4],
1343 Address->Addr[5],
1344 Address->Addr[6],
1345 Address->Addr[7],
1346 Address->Addr[8],
1347 Address->Addr[9],
1348 Address->Addr[10],
1349 Address->Addr[11],
1350 Address->Addr[12],
1351 Address->Addr[13],
1352 Address->Addr[14],
1353 Address->Addr[15]
1354 );
1355}
1356
1370VOID
1372 IN OUT POOL_PRINT *Str,
1373 IN VOID *DevPath,
1374 IN BOOLEAN DisplayOnly,
1375 IN BOOLEAN AllowShortcuts
1376 )
1377{
1378 IPv4_DEVICE_PATH *IPDevPath;
1379
1380 IPDevPath = DevPath;
1381 UefiDevicePathLibCatPrint (Str, L"IPv4(");
1382 CatIPv4Address (Str, &IPDevPath->RemoteIpAddress);
1383
1384 if (DisplayOnly) {
1385 UefiDevicePathLibCatPrint (Str, L")");
1386 return;
1387 }
1388
1389 UefiDevicePathLibCatPrint (Str, L",");
1390 CatNetworkProtocol (Str, IPDevPath->Protocol);
1391
1392 UefiDevicePathLibCatPrint (Str, L",%s,", IPDevPath->StaticIpAddress ? L"Static" : L"DHCP");
1393 CatIPv4Address (Str, &IPDevPath->LocalIpAddress);
1394 if (DevicePathNodeLength (IPDevPath) == sizeof (IPv4_DEVICE_PATH)) {
1395 UefiDevicePathLibCatPrint (Str, L",");
1396 CatIPv4Address (Str, &IPDevPath->GatewayIpAddress);
1397 UefiDevicePathLibCatPrint (Str, L",");
1398 CatIPv4Address (Str, &IPDevPath->SubnetMask);
1399 }
1400
1401 UefiDevicePathLibCatPrint (Str, L")");
1402}
1403
1417VOID
1419 IN OUT POOL_PRINT *Str,
1420 IN VOID *DevPath,
1421 IN BOOLEAN DisplayOnly,
1422 IN BOOLEAN AllowShortcuts
1423 )
1424{
1425 IPv6_DEVICE_PATH *IPDevPath;
1426
1427 IPDevPath = DevPath;
1428 UefiDevicePathLibCatPrint (Str, L"IPv6(");
1429 CatIPv6Address (Str, &IPDevPath->RemoteIpAddress);
1430 if (DisplayOnly) {
1431 UefiDevicePathLibCatPrint (Str, L")");
1432 return;
1433 }
1434
1435 UefiDevicePathLibCatPrint (Str, L",");
1436 CatNetworkProtocol (Str, IPDevPath->Protocol);
1437
1438 switch (IPDevPath->IpAddressOrigin) {
1439 case 0:
1440 UefiDevicePathLibCatPrint (Str, L",Static,");
1441 break;
1442 case 1:
1443 UefiDevicePathLibCatPrint (Str, L",StatelessAutoConfigure,");
1444 break;
1445 default:
1446 UefiDevicePathLibCatPrint (Str, L",StatefulAutoConfigure,");
1447 break;
1448 }
1449
1450 CatIPv6Address (Str, &IPDevPath->LocalIpAddress);
1451
1452 if (DevicePathNodeLength (IPDevPath) == sizeof (IPv6_DEVICE_PATH)) {
1453 UefiDevicePathLibCatPrint (Str, L",0x%x,", IPDevPath->PrefixLength);
1454 CatIPv6Address (Str, &IPDevPath->GatewayIpAddress);
1455 }
1456
1457 UefiDevicePathLibCatPrint (Str, L")");
1458}
1459
1473VOID
1475 IN OUT POOL_PRINT *Str,
1476 IN VOID *DevPath,
1477 IN BOOLEAN DisplayOnly,
1478 IN BOOLEAN AllowShortcuts
1479 )
1480{
1481 INFINIBAND_DEVICE_PATH *InfiniBand;
1482
1483 InfiniBand = DevPath;
1485 Str,
1486 L"Infiniband(0x%x,%g,0x%lx,0x%lx,0x%lx)",
1487 InfiniBand->ResourceFlags,
1488 InfiniBand->PortGid,
1489 InfiniBand->ServiceId,
1490 InfiniBand->TargetPortId,
1491 InfiniBand->DeviceId
1492 );
1493}
1494
1508VOID
1510 IN OUT POOL_PRINT *Str,
1511 IN VOID *DevPath,
1512 IN BOOLEAN DisplayOnly,
1513 IN BOOLEAN AllowShortcuts
1514 )
1515{
1516 UART_DEVICE_PATH *Uart;
1517 CHAR8 Parity;
1518
1519 Uart = DevPath;
1520 switch (Uart->Parity) {
1521 case 0:
1522 Parity = 'D';
1523 break;
1524
1525 case 1:
1526 Parity = 'N';
1527 break;
1528
1529 case 2:
1530 Parity = 'E';
1531 break;
1532
1533 case 3:
1534 Parity = 'O';
1535 break;
1536
1537 case 4:
1538 Parity = 'M';
1539 break;
1540
1541 case 5:
1542 Parity = 'S';
1543 break;
1544
1545 default:
1546 Parity = 'x';
1547 break;
1548 }
1549
1550 if (Uart->BaudRate == 0) {
1551 UefiDevicePathLibCatPrint (Str, L"Uart(DEFAULT,");
1552 } else {
1553 UefiDevicePathLibCatPrint (Str, L"Uart(%ld,", Uart->BaudRate);
1554 }
1555
1556 if (Uart->DataBits == 0) {
1557 UefiDevicePathLibCatPrint (Str, L"DEFAULT,");
1558 } else {
1559 UefiDevicePathLibCatPrint (Str, L"%d,", Uart->DataBits);
1560 }
1561
1562 UefiDevicePathLibCatPrint (Str, L"%c,", Parity);
1563
1564 switch (Uart->StopBits) {
1565 case 0:
1566 UefiDevicePathLibCatPrint (Str, L"D)");
1567 break;
1568
1569 case 1:
1570 UefiDevicePathLibCatPrint (Str, L"1)");
1571 break;
1572
1573 case 2:
1574 UefiDevicePathLibCatPrint (Str, L"1.5)");
1575 break;
1576
1577 case 3:
1578 UefiDevicePathLibCatPrint (Str, L"2)");
1579 break;
1580
1581 default:
1582 UefiDevicePathLibCatPrint (Str, L"x)");
1583 break;
1584 }
1585}
1586
1600VOID
1602 IN OUT POOL_PRINT *Str,
1603 IN VOID *DevPath,
1604 IN BOOLEAN DisplayOnly,
1605 IN BOOLEAN AllowShortcuts
1606 )
1607{
1608 ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath;
1609 UINT16 Options;
1610 UINTN Index;
1611
1612 ISCSIDevPath = DevPath;
1614 Str,
1615 L"iSCSI(%a,0x%x,0x",
1616 ISCSIDevPath->TargetName,
1617 ISCSIDevPath->TargetPortalGroupTag
1618 );
1619 for (Index = 0; Index < sizeof (ISCSIDevPath->Lun) / sizeof (UINT8); Index++) {
1620 UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *)&ISCSIDevPath->Lun)[Index]);
1621 }
1622
1623 Options = ISCSIDevPath->LoginOption;
1624 UefiDevicePathLibCatPrint (Str, L",%s,", (((Options >> 1) & 0x0001) != 0) ? L"CRC32C" : L"None");
1625 UefiDevicePathLibCatPrint (Str, L"%s,", (((Options >> 3) & 0x0001) != 0) ? L"CRC32C" : L"None");
1626 if (((Options >> 11) & 0x0001) != 0) {
1627 UefiDevicePathLibCatPrint (Str, L"%s,", L"None");
1628 } else if (((Options >> 12) & 0x0001) != 0) {
1629 UefiDevicePathLibCatPrint (Str, L"%s,", L"CHAP_UNI");
1630 } else {
1631 UefiDevicePathLibCatPrint (Str, L"%s,", L"CHAP_BI");
1632 }
1633
1634 UefiDevicePathLibCatPrint (Str, L"%s)", (ISCSIDevPath->NetworkProtocol == 0) ? L"TCP" : L"reserved");
1635}
1636
1650VOID
1652 IN OUT POOL_PRINT *Str,
1653 IN VOID *DevPath,
1654 IN BOOLEAN DisplayOnly,
1655 IN BOOLEAN AllowShortcuts
1656 )
1657{
1658 VLAN_DEVICE_PATH *Vlan;
1659
1660 Vlan = DevPath;
1661 UefiDevicePathLibCatPrint (Str, L"Vlan(%d)", Vlan->VlanId);
1662}
1663
1677VOID
1679 IN OUT POOL_PRINT *Str,
1680 IN VOID *DevPath,
1681 IN BOOLEAN DisplayOnly,
1682 IN BOOLEAN AllowShortcuts
1683 )
1684{
1685 BLUETOOTH_DEVICE_PATH *Bluetooth;
1686
1687 Bluetooth = DevPath;
1689 Str,
1690 L"Bluetooth(%02x%02x%02x%02x%02x%02x)",
1691 Bluetooth->BD_ADDR.Address[0],
1692 Bluetooth->BD_ADDR.Address[1],
1693 Bluetooth->BD_ADDR.Address[2],
1694 Bluetooth->BD_ADDR.Address[3],
1695 Bluetooth->BD_ADDR.Address[4],
1696 Bluetooth->BD_ADDR.Address[5]
1697 );
1698}
1699
1713VOID
1715 IN OUT POOL_PRINT *Str,
1716 IN VOID *DevPath,
1717 IN BOOLEAN DisplayOnly,
1718 IN BOOLEAN AllowShortcuts
1719 )
1720{
1721 WIFI_DEVICE_PATH *WiFi;
1722 UINT8 SSId[33];
1723
1724 WiFi = DevPath;
1725
1726 SSId[32] = '\0';
1727 CopyMem (SSId, WiFi->SSId, 32);
1728
1729 UefiDevicePathLibCatPrint (Str, L"Wi-Fi(%a)", SSId);
1730}
1731
1745VOID
1747 IN OUT POOL_PRINT *Str,
1748 IN VOID *DevPath,
1749 IN BOOLEAN DisplayOnly,
1750 IN BOOLEAN AllowShortcuts
1751 )
1752{
1753 BLUETOOTH_LE_DEVICE_PATH *BluetoothLE;
1754
1755 BluetoothLE = DevPath;
1757 Str,
1758 L"BluetoothLE(%02x%02x%02x%02x%02x%02x,0x%02x)",
1759 BluetoothLE->Address.Address[0],
1760 BluetoothLE->Address.Address[1],
1761 BluetoothLE->Address.Address[2],
1762 BluetoothLE->Address.Address[3],
1763 BluetoothLE->Address.Address[4],
1764 BluetoothLE->Address.Address[5],
1765 BluetoothLE->Address.Type
1766 );
1767}
1768
1782VOID
1784 IN OUT POOL_PRINT *Str,
1785 IN VOID *DevPath,
1786 IN BOOLEAN DisplayOnly,
1787 IN BOOLEAN AllowShortcuts
1788 )
1789{
1790 DNS_DEVICE_PATH *DnsDevPath;
1791 UINT32 DnsServerIpCount;
1792 UINT32 DnsServerIpIndex;
1793
1794 DnsDevPath = DevPath;
1795 DnsServerIpCount = (UINT32)(DevicePathNodeLength (DnsDevPath) - sizeof (EFI_DEVICE_PATH_PROTOCOL) - sizeof (DnsDevPath->IsIPv6)) / sizeof (EFI_IP_ADDRESS);
1796
1797 UefiDevicePathLibCatPrint (Str, L"Dns(");
1798
1799 for (DnsServerIpIndex = 0; DnsServerIpIndex < DnsServerIpCount; DnsServerIpIndex++) {
1800 if (DnsDevPath->IsIPv6 == 0x00) {
1801 CatIPv4Address (Str, &(DnsDevPath->DnsServerIp[DnsServerIpIndex].v4));
1802 } else {
1803 CatIPv6Address (Str, &(DnsDevPath->DnsServerIp[DnsServerIpIndex].v6));
1804 }
1805
1806 if (DnsServerIpIndex < DnsServerIpCount - 1) {
1807 UefiDevicePathLibCatPrint (Str, L",");
1808 }
1809 }
1810
1811 UefiDevicePathLibCatPrint (Str, L")");
1812}
1813
1827VOID
1829 IN OUT POOL_PRINT *Str,
1830 IN VOID *DevPath,
1831 IN BOOLEAN DisplayOnly,
1832 IN BOOLEAN AllowShortcuts
1833 )
1834{
1835 URI_DEVICE_PATH *Uri;
1836 UINTN UriLength;
1837 CHAR8 *UriStr;
1838
1839 //
1840 // Uri in the device path may not be null terminated.
1841 //
1842 Uri = DevPath;
1843 UriLength = DevicePathNodeLength (Uri) - sizeof (URI_DEVICE_PATH);
1844 UriStr = AllocatePool (UriLength + 1);
1845
1846 if (UriStr == NULL) {
1847 ASSERT (UriStr != NULL);
1848 return;
1849 }
1850
1851 CopyMem (UriStr, Uri->Uri, UriLength);
1852 UriStr[UriLength] = '\0';
1853 UefiDevicePathLibCatPrint (Str, L"Uri(%a)", UriStr);
1854 FreePool (UriStr);
1855}
1856
1870VOID
1872 IN OUT POOL_PRINT *Str,
1873 IN VOID *DevPath,
1874 IN BOOLEAN DisplayOnly,
1875 IN BOOLEAN AllowShortcuts
1876 )
1877{
1879
1880 Hd = DevPath;
1881 switch (Hd->SignatureType) {
1882 case SIGNATURE_TYPE_MBR:
1884 Str,
1885 L"HD(%d,%s,0x%08x,",
1886 Hd->PartitionNumber,
1887 L"MBR",
1888 *((UINT32 *)(&(Hd->Signature[0])))
1889 );
1890 break;
1891
1892 case SIGNATURE_TYPE_GUID:
1894 Str,
1895 L"HD(%d,%s,%g,",
1896 Hd->PartitionNumber,
1897 L"GPT",
1898 (EFI_GUID *)&(Hd->Signature[0])
1899 );
1900 break;
1901
1902 default:
1904 Str,
1905 L"HD(%d,%d,0,",
1906 Hd->PartitionNumber,
1907 Hd->SignatureType
1908 );
1909 break;
1910 }
1911
1912 UefiDevicePathLibCatPrint (Str, L"0x%lx,0x%lx)", Hd->PartitionStart, Hd->PartitionSize);
1913}
1914
1928VOID
1930 IN OUT POOL_PRINT *Str,
1931 IN VOID *DevPath,
1932 IN BOOLEAN DisplayOnly,
1933 IN BOOLEAN AllowShortcuts
1934 )
1935{
1937
1938 Cd = DevPath;
1939 if (DisplayOnly) {
1940 UefiDevicePathLibCatPrint (Str, L"CDROM(0x%x)", Cd->BootEntry);
1941 return;
1942 }
1943
1944 UefiDevicePathLibCatPrint (Str, L"CDROM(0x%x,0x%lx,0x%lx)", Cd->BootEntry, Cd->PartitionStart, Cd->PartitionSize);
1945}
1946
1960VOID
1962 IN OUT POOL_PRINT *Str,
1963 IN VOID *DevPath,
1964 IN BOOLEAN DisplayOnly,
1965 IN BOOLEAN AllowShortcuts
1966 )
1967{
1969
1970 Fp = DevPath;
1971 UefiDevicePathLibCatPrint (Str, L"%s", Fp->PathName);
1972}
1973
1987VOID
1989 IN OUT POOL_PRINT *Str,
1990 IN VOID *DevPath,
1991 IN BOOLEAN DisplayOnly,
1992 IN BOOLEAN AllowShortcuts
1993 )
1994{
1995 MEDIA_PROTOCOL_DEVICE_PATH *MediaProt;
1996
1997 MediaProt = DevPath;
1998 UefiDevicePathLibCatPrint (Str, L"Media(%g)", &MediaProt->Protocol);
1999}
2000
2014VOID
2016 IN OUT POOL_PRINT *Str,
2017 IN VOID *DevPath,
2018 IN BOOLEAN DisplayOnly,
2019 IN BOOLEAN AllowShortcuts
2020 )
2021{
2023
2024 Fv = DevPath;
2025 UefiDevicePathLibCatPrint (Str, L"Fv(%g)", &Fv->FvName);
2026}
2027
2041VOID
2043 IN OUT POOL_PRINT *Str,
2044 IN VOID *DevPath,
2045 IN BOOLEAN DisplayOnly,
2046 IN BOOLEAN AllowShortcuts
2047 )
2048{
2050
2051 FvFile = DevPath;
2052 UefiDevicePathLibCatPrint (Str, L"FvFile(%g)", &FvFile->FvFileName);
2053}
2054
2068VOID
2070 IN OUT POOL_PRINT *Str,
2071 IN VOID *DevPath,
2072 IN BOOLEAN DisplayOnly,
2073 IN BOOLEAN AllowShortcuts
2074 )
2075{
2077
2078 Offset = DevPath;
2080 Str,
2081 L"Offset(0x%lx,0x%lx)",
2082 Offset->StartingOffset,
2083 Offset->EndingOffset
2084 );
2085}
2086
2100VOID
2102 IN OUT POOL_PRINT *Str,
2103 IN VOID *DevPath,
2104 IN BOOLEAN DisplayOnly,
2105 IN BOOLEAN AllowShortcuts
2106 )
2107{
2109
2110 RamDisk = DevPath;
2111
2112 if (CompareGuid (&RamDisk->TypeGuid, &gEfiVirtualDiskGuid)) {
2114 Str,
2115 L"VirtualDisk(0x%lx,0x%lx,%d)",
2116 LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],
2117 LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],
2118 RamDisk->Instance
2119 );
2120 } else if (CompareGuid (&RamDisk->TypeGuid, &gEfiVirtualCdGuid)) {
2122 Str,
2123 L"VirtualCD(0x%lx,0x%lx,%d)",
2124 LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],
2125 LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],
2126 RamDisk->Instance
2127 );
2128 } else if (CompareGuid (&RamDisk->TypeGuid, &gEfiPersistentVirtualDiskGuid)) {
2130 Str,
2131 L"PersistentVirtualDisk(0x%lx,0x%lx,%d)",
2132 LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],
2133 LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],
2134 RamDisk->Instance
2135 );
2136 } else if (CompareGuid (&RamDisk->TypeGuid, &gEfiPersistentVirtualCdGuid)) {
2138 Str,
2139 L"PersistentVirtualCD(0x%lx,0x%lx,%d)",
2140 LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],
2141 LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],
2142 RamDisk->Instance
2143 );
2144 } else {
2146 Str,
2147 L"RamDisk(0x%lx,0x%lx,%d,%g)",
2148 LShiftU64 ((UINT64)RamDisk->StartingAddr[1], 32) | RamDisk->StartingAddr[0],
2149 LShiftU64 ((UINT64)RamDisk->EndingAddr[1], 32) | RamDisk->EndingAddr[0],
2150 RamDisk->Instance,
2151 &RamDisk->TypeGuid
2152 );
2153 }
2154}
2155
2169VOID
2171 IN OUT POOL_PRINT *Str,
2172 IN VOID *DevPath,
2173 IN BOOLEAN DisplayOnly,
2174 IN BOOLEAN AllowShortcuts
2175 )
2176{
2178 CHAR16 *Type;
2179
2180 Bbs = DevPath;
2181 switch (Bbs->DeviceType) {
2182 case BBS_TYPE_FLOPPY:
2183 Type = L"Floppy";
2184 break;
2185
2186 case BBS_TYPE_HARDDRIVE:
2187 Type = L"HD";
2188 break;
2189
2190 case BBS_TYPE_CDROM:
2191 Type = L"CDROM";
2192 break;
2193
2194 case BBS_TYPE_PCMCIA:
2195 Type = L"PCMCIA";
2196 break;
2197
2198 case BBS_TYPE_USB:
2199 Type = L"USB";
2200 break;
2201
2202 case BBS_TYPE_EMBEDDED_NETWORK:
2203 Type = L"Network";
2204 break;
2205
2206 default:
2207 Type = NULL;
2208 break;
2209 }
2210
2211 if (Type != NULL) {
2212 UefiDevicePathLibCatPrint (Str, L"BBS(%s,%a", Type, Bbs->String);
2213 } else {
2214 UefiDevicePathLibCatPrint (Str, L"BBS(0x%x,%a", Bbs->DeviceType, Bbs->String);
2215 }
2216
2217 if (DisplayOnly) {
2218 UefiDevicePathLibCatPrint (Str, L")");
2219 return;
2220 }
2221
2222 UefiDevicePathLibCatPrint (Str, L",0x%x)", Bbs->StatusFlag);
2223}
2224
2238VOID
2240 IN OUT POOL_PRINT *Str,
2241 IN VOID *DevPath,
2242 IN BOOLEAN DisplayOnly,
2243 IN BOOLEAN AllowShortcuts
2244 )
2245{
2246 UefiDevicePathLibCatPrint (Str, L",");
2247}
2248
2249GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_GENERIC_TABLE mUefiDevicePathLibToTextTableGeneric[] = {
2250 { HARDWARE_DEVICE_PATH, L"HardwarePath" },
2251 { ACPI_DEVICE_PATH, L"AcpiPath" },
2252 { MESSAGING_DEVICE_PATH, L"Msg" },
2253 { MEDIA_DEVICE_PATH, L"MediaPath" },
2254 { BBS_DEVICE_PATH, L"BbsPath" },
2255 { 0, NULL }
2256};
2257
2271VOID
2273 IN OUT POOL_PRINT *Str,
2274 IN VOID *DevPath,
2275 IN BOOLEAN DisplayOnly,
2276 IN BOOLEAN AllowShortcuts
2277 )
2278{
2280 UINTN Index;
2281
2282 Node = DevPath;
2283
2284 for (Index = 0; mUefiDevicePathLibToTextTableGeneric[Index].Text != NULL; Index++) {
2285 if (DevicePathType (Node) == mUefiDevicePathLibToTextTableGeneric[Index].Type) {
2286 break;
2287 }
2288 }
2289
2290 if (mUefiDevicePathLibToTextTableGeneric[Index].Text == NULL) {
2291 //
2292 // It's a node whose type cannot be recognized
2293 //
2294 UefiDevicePathLibCatPrint (Str, L"Path(%d,%d", DevicePathType (Node), DevicePathSubType (Node));
2295 } else {
2296 //
2297 // It's a node whose type can be recognized
2298 //
2299 UefiDevicePathLibCatPrint (Str, L"%s(%d", mUefiDevicePathLibToTextTableGeneric[Index].Text, DevicePathSubType (Node));
2300 }
2301
2302 Index = sizeof (EFI_DEVICE_PATH_PROTOCOL);
2303 if (Index < DevicePathNodeLength (Node)) {
2304 UefiDevicePathLibCatPrint (Str, L",");
2305 for ( ; Index < DevicePathNodeLength (Node); Index++) {
2306 UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *)Node)[Index]);
2307 }
2308 }
2309
2310 UefiDevicePathLibCatPrint (Str, L")");
2311}
2312
2313GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLibToTextTable[] = {
2344 { MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, DevPathToTextVendor },
2352 { MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, DevPathToTextHardDrive },
2353 { MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, DevPathToTextCDROM },
2354 { MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, DevPathToTextVendor },
2355 { MEDIA_DEVICE_PATH, MEDIA_PROTOCOL_DP, DevPathToTextMediaProtocol },
2356 { MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, DevPathToTextFilePath },
2357 { MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_VOL_DP, DevPathToTextFv },
2358 { MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_FILE_DP, DevPathToTextFvFile },
2360 { MEDIA_DEVICE_PATH, MEDIA_RAM_DISK_DP, DevPathToTextRamDisk },
2362 { END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, DevPathToTextEndInstance },
2363 { 0, 0, NULL }
2364};
2365
2381CHAR16 *
2382EFIAPI
2384 IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
2385 IN BOOLEAN DisplayOnly,
2386 IN BOOLEAN AllowShortcuts
2387 )
2388{
2389 POOL_PRINT Str;
2390 UINTN Index;
2391 DEVICE_PATH_TO_TEXT ToText;
2392
2393 if (DeviceNode == NULL) {
2394 return NULL;
2395 }
2396
2397 ZeroMem (&Str, sizeof (Str));
2398
2399 //
2400 // Process the device path node
2401 // If not found, use a generic function
2402 //
2403 ToText = DevPathToTextNodeGeneric;
2404 for (Index = 0; mUefiDevicePathLibToTextTable[Index].Function != NULL; Index++) {
2405 if ((DevicePathType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].Type) &&
2406 (DevicePathSubType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].SubType)
2407 )
2408 {
2409 ToText = mUefiDevicePathLibToTextTable[Index].Function;
2410 break;
2411 }
2412 }
2413
2414 //
2415 // Print this node
2416 //
2417 ToText (&Str, (VOID *)DeviceNode, DisplayOnly, AllowShortcuts);
2418
2419 ASSERT (Str.Str != NULL);
2420 return Str.Str;
2421}
2422
2438CHAR16 *
2439EFIAPI
2441 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
2442 IN BOOLEAN DisplayOnly,
2443 IN BOOLEAN AllowShortcuts
2444 )
2445{
2446 POOL_PRINT Str;
2448 EFI_DEVICE_PATH_PROTOCOL *AlignedNode;
2449 UINTN Index;
2450 DEVICE_PATH_TO_TEXT ToText;
2451
2452 if (DevicePath == NULL) {
2453 return NULL;
2454 }
2455
2456 ZeroMem (&Str, sizeof (Str));
2457
2458 //
2459 // Process each device path node
2460 //
2461 Node = (EFI_DEVICE_PATH_PROTOCOL *)DevicePath;
2462 while (!IsDevicePathEnd (Node)) {
2463 //
2464 // Find the handler to dump this device path node
2465 // If not found, use a generic function
2466 //
2467 ToText = DevPathToTextNodeGeneric;
2468 for (Index = 0; mUefiDevicePathLibToTextTable[Index].Function != NULL; Index += 1) {
2469 if ((DevicePathType (Node) == mUefiDevicePathLibToTextTable[Index].Type) &&
2470 (DevicePathSubType (Node) == mUefiDevicePathLibToTextTable[Index].SubType)
2471 )
2472 {
2473 ToText = mUefiDevicePathLibToTextTable[Index].Function;
2474 break;
2475 }
2476 }
2477
2478 //
2479 // Put a path separator in if needed
2480 //
2481 if ((Str.Count != 0) && (ToText != DevPathToTextEndInstance)) {
2482 if (Str.Str[Str.Count] != L',') {
2483 UefiDevicePathLibCatPrint (&Str, L"/");
2484 }
2485 }
2486
2487 AlignedNode = AllocateCopyPool (DevicePathNodeLength (Node), Node);
2488 //
2489 // Print this node of the device path
2490 //
2491 ToText (&Str, AlignedNode, DisplayOnly, AllowShortcuts);
2492 FreePool (AlignedNode);
2493
2494 //
2495 // Next device path node
2496 //
2497 Node = NextDevicePathNode (Node);
2498 }
2499
2500 if (Str.Str == NULL) {
2501 return AllocateZeroPool (sizeof (CHAR16));
2502 } else {
2503 return Str.Str;
2504 }
2505}
UINT64 UINTN
UINT64 EFIAPI ReadUnaligned64(IN CONST UINT64 *Buffer)
Definition: Unaligned.c:204
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
Definition: String.c:641
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: LShiftU64.c:28
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define BBS_BBS_DP
Definition: DevicePath.h:1238
#define MSG_IPv6_DP
Definition: DevicePath.h:607
#define MSG_IPv4_DP
Definition: DevicePath.h:566
#define MEDIA_FILEPATH_DP
Definition: DevicePath.h:1098
#define HARDWARE_DEVICE_PATH
Definition: DevicePath.h:68
#define MSG_INFINIBAND_DP
Definition: DevicePath.h:651
#define MSG_SCSI_DP
Definition: DevicePath.h:346
#define HW_BMC_DP
Definition: DevicePath.h:170
#define HW_VENDOR_DP
Definition: DevicePath.h:133
#define MEDIA_RAM_DISK_DP
Definition: DevicePath.h:1205
#define MSG_DEVICE_LOGICAL_UNIT_DP
Definition: DevicePath.h:498
#define MSG_NVME_NAMESPACE_DP
Definition: DevicePath.h:833
#define MSG_SD_DP
Definition: DevicePath.h:907
#define MSG_URI_DP
Definition: DevicePath.h:879
#define MSG_SASEX_DP
Definition: DevicePath.h:809
#define MEDIA_CDROM_DP
Definition: DevicePath.h:1069
#define MSG_ATAPI_DP
Definition: DevicePath.h:326
#define HW_PCCARD_DP
Definition: DevicePath.h:93
#define BBS_DEVICE_PATH
Definition: DevicePath.h:1233
#define ACPI_DEVICE_PATH
Definition: DevicePath.h:190
#define MSG_I2O_DP
Definition: DevicePath.h:538
#define MEDIA_PIWG_FW_FILE_DP
Definition: DevicePath.h:1130
#define MSG_UFS_DP
Definition: DevicePath.h:891
#define MEDIA_HARDDRIVE_DP
Definition: DevicePath.h:1014
#define MEDIA_PROTOCOL_DP
Definition: DevicePath.h:1112
#define MSG_DNS_DP
Definition: DevicePath.h:863
#define MSG_BLUETOOTH_DP
Definition: DevicePath.h:976
#define MSG_EMMC_DP
Definition: DevicePath.h:916
#define MSG_USB_WWID_DP
Definition: DevicePath.h:467
#define MSG_USB_DP
Definition: DevicePath.h:418
#define MSG_ISCSI_DP
Definition: DevicePath.h:925
#define MEDIA_PIWG_FW_VOL_DP
Definition: DevicePath.h:1146
#define MSG_MAC_ADDR_DP
Definition: DevicePath.h:550
#define ACPI_DP
Definition: DevicePath.h:195
#define MSG_FIBRECHANNELEX_DP
Definition: DevicePath.h:382
#define ACPI_EXTENDED_DP
Definition: DevicePath.h:217
#define MSG_UART_DP
Definition: DevicePath.h:692
#define MSG_SATA_DP
Definition: DevicePath.h:510
#define MSG_VLAN_DP
Definition: DevicePath.h:964
#define MEDIA_RELATIVE_OFFSET_RANGE_DP
Definition: DevicePath.h:1162
#define MSG_USB_CLASS_DP
Definition: DevicePath.h:434
#define MSG_BLUETOOTH_LE_DP
Definition: DevicePath.h:1000
#define HW_PCI_DP
Definition: DevicePath.h:73
#define MSG_WIFI_DP
Definition: DevicePath.h:988
#define HW_MEMMAP_DP
Definition: DevicePath.h:109
#define MSG_1394_DP
Definition: DevicePath.h:402
#define MESSAGING_DEVICE_PATH
Definition: DevicePath.h:321
#define HW_CONTROLLER_DP
Definition: DevicePath.h:154
#define ACPI_ADR_DP
Definition: DevicePath.h:264
#define MEDIA_VENDOR_DP
Media vendor device path subtype.
Definition: DevicePath.h:1093
#define MSG_FIBRECHANNEL_DP
Definition: DevicePath.h:362
UINT8 EFIAPI DevicePathType(IN CONST VOID *Node)
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
UINT8 EFIAPI DevicePathSubType(IN CONST VOID *Node)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
VOID DevPathToText1394(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextHardDrive(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextSd(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextInfiniBand(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextBluetooth(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextIPv4(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextSata(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextController(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextMediaProtocol(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
CHAR16 *EFIAPI UefiDevicePathLibCatPrint(IN OUT POOL_PRINT *Str, IN CHAR16 *Fmt,...)
VOID DevPathToTextUsbClass(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextUsb(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
CHAR16 *EFIAPI UefiDevicePathLibConvertDeviceNodeToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextUri(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextScsi(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextLogicalUnit(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextFibre(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextBmc(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextI2O(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextFilePath(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextMemMap(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextRamDisk(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
CHAR16 *EFIAPI UefiDevicePathLibConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextDns(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextBluetoothLE(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextBBS(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextAtapi(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextEmmc(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextMacAddr(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID CatIPv4Address(IN OUT POOL_PRINT *Str, IN EFI_IPv4_ADDRESS *Address)
VOID DevPathToTextUart(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextiSCSI(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextVlan(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextWiFi(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextAcpiEx(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextFv(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextFvFile(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathRelativeOffsetRange(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextAcpi(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextNVMe(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextEndInstance(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextUsbWWID(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID CatNetworkProtocol(IN OUT POOL_PRINT *Str, IN UINT16 Protocol)
VOID DevPathToTextUfs(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextFibreEx(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextIPv6(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID CatIPv6Address(IN OUT POOL_PRINT *Str, IN EFI_IPv6_ADDRESS *Address)
VOID DevPathToTextPci(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextNodeGeneric(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextCDROM(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextAcpiAdr(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextSasEx(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextPccard(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID DevPathToTextVendor(IN OUT POOL_PRINT *Str, IN VOID *DevPath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID *EFIAPI ReallocatePool(IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
UINTN EFIAPI UnicodeVSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString, IN VA_LIST Marker)
Definition: PrintLib.c:287
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:408
UINTN EFIAPI SPrintLength(IN CONST CHAR16 *FormatString, IN VA_LIST Marker)
Definition: PrintLib.c:2091
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define VA_START(Marker, Parameter)
Definition: Base.h:661
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define ARRAY_SIZE(Array)
Definition: Base.h:1393
CHAR8 * VA_LIST
Definition: Base.h:643
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define GLOBAL_REMOVE_IF_UNREFERENCED
Definition: Base.h:48
#define VA_END(Marker)
Definition: Base.h:691
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
UINT8 PrimarySecondary
Definition: DevicePath.h:332
UINT8 Address[6]
Definition: Bluetooth.h:22
BLUETOOTH_ADDRESS BD_ADDR
Definition: DevicePath.h:982
UINT8 BaseAddress[8]
Definition: DevicePath.h:184
UINT8 InterfaceType
Definition: DevicePath.h:180
EFI_IP_ADDRESS DnsServerIp[]
Definition: DevicePath.h:873
Definition: Base.h:213
EFI_IPv4_ADDRESS GatewayIpAddress
Definition: DevicePath.h:597
EFI_IPv4_ADDRESS SubnetMask
Definition: DevicePath.h:601
BOOLEAN StaticIpAddress
Definition: DevicePath.h:593
EFI_IPv4_ADDRESS LocalIpAddress
Definition: DevicePath.h:572
EFI_IPv4_ADDRESS RemoteIpAddress
Definition: DevicePath.h:576
EFI_IPv6_ADDRESS LocalIpAddress
Definition: DevicePath.h:613
UINT8 IpAddressOrigin
Definition: DevicePath.h:637
EFI_IPv6_ADDRESS RemoteIpAddress
Definition: DevicePath.h:617
EFI_IPv6_ADDRESS GatewayIpAddress
Definition: DevicePath.h:645
EFI_MAC_ADDRESS MacAddress
Definition: DevicePath.h:556
EFI_PHYSICAL_ADDRESS StartingAddress
Definition: DevicePath.h:123
EFI_PHYSICAL_ADDRESS EndingAddress
Definition: DevicePath.h:127
UINT16 DeviceTopology
Definition: DevicePath.h:823
UINT8 SasAddress[8]
Definition: DevicePath.h:815
UINT16 RelativeTargetPort
Definition: DevicePath.h:827
UINT16 PortMultiplierPortNumber
Definition: DevicePath.h:523
UINT16 HBAPortNumber
Definition: DevicePath.h:517
UINT8 InterfaceNumber
Definition: DevicePath.h:428
UINT8 ParentPortNumber
Definition: DevicePath.h:424
UINT8 SSId[32]
Definition: DevicePath.h:994