xref: /DragonStub/inc/efidevp.h (revision 9485c65f6d28b71ff697849c1c8d47fd077ccd07)
1 #ifndef _DEVPATH_H
2 #define _DEVPATH_H
3 
4 /*++
5 
6 Copyright (c) 1998  Intel Corporation
7 
8 Module Name:
9 
10     devpath.h
11 
12 Abstract:
13 
14     Defines for parsing the EFI Device Path structures
15 
16 
17 
18 Revision History
19 
20 --*/
21 
22 //
23 // Device Path structures - Section C
24 //
25 
26 typedef struct _EFI_DEVICE_PATH_PROTOCOL {
27         UINT8                           Type;
28         UINT8                           SubType;
29         UINT8                           Length[2];
30 } EFI_DEVICE_PATH_PROTOCOL;
31 
32 typedef struct _EFI_DEVICE_PATH_PROTOCOL _EFI_DEVICE_PATH;
33 typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;
34 
35 #define EFI_DP_TYPE_MASK                    0x7F
36 #define EFI_DP_TYPE_UNPACKED                0x80
37 
38 //#define END_DEVICE_PATH_TYPE                0xff
39 #define END_DEVICE_PATH_TYPE                0x7f
40 //#define END_DEVICE_PATH_TYPE_UNPACKED       0x7f
41 
42 #define END_ENTIRE_DEVICE_PATH_SUBTYPE      0xff
43 #define END_INSTANCE_DEVICE_PATH_SUBTYPE    0x01
44 #define END_DEVICE_PATH_LENGTH              (sizeof(EFI_DEVICE_PATH_PROTOCOL))
45 
46 
47 #define DP_IS_END_TYPE(a)
48 #define DP_IS_END_SUBTYPE(a)        ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
49 
50 #define DevicePathType(a)           ( ((a)->Type) & EFI_DP_TYPE_MASK )
51 #define DevicePathSubType(a)        ( (a)->SubType )
52 #define DevicePathNodeLength(a)     ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
53 #define NextDevicePathNode(a)       ( (EFI_DEVICE_PATH_PROTOCOL *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
54 //#define IsDevicePathEndType(a)      ( DevicePathType(a) == END_DEVICE_PATH_TYPE_UNPACKED )
55 #define IsDevicePathEndType(a)      ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
56 #define IsDevicePathEndSubType(a)   ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
57 #define IsDevicePathEnd(a)          ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
58 #define IsDevicePathUnpacked(a)     ( (a)->Type & EFI_DP_TYPE_UNPACKED )
59 
60 
61 #define SetDevicePathNodeLength(a,l) {                  \
62             (a)->Length[0] = (UINT8) (l);               \
63             (a)->Length[1] = (UINT8) ((l) >> 8);        \
64             }
65 
66 #define SetDevicePathEndNode(a)  {                      \
67             (a)->Type = END_DEVICE_PATH_TYPE;           \
68             (a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;     \
69             (a)->Length[0] = sizeof(EFI_DEVICE_PATH_PROTOCOL); \
70             (a)->Length[1] = 0;                         \
71             }
72 
73 
74 /*
75  * Hardware Device Path (UEFI 2.4 specification, version 2.4 § 9.3.2.)
76  */
77 
78 #define HARDWARE_DEVICE_PATH            0x01
79 
80 #define HW_PCI_DP                       0x01
81 typedef struct _PCI_DEVICE_PATH {
82         EFI_DEVICE_PATH_PROTOCOL        Header;
83         UINT8                           Function;
84         UINT8                           Device;
85 } PCI_DEVICE_PATH;
86 
87 #define HW_PCCARD_DP                    0x02
88 typedef struct _PCCARD_DEVICE_PATH {
89         EFI_DEVICE_PATH_PROTOCOL        Header;
90         UINT8                           FunctionNumber ;
91 } PCCARD_DEVICE_PATH;
92 
93 #define HW_MEMMAP_DP                    0x03
94 typedef struct _MEMMAP_DEVICE_PATH {
95         EFI_DEVICE_PATH_PROTOCOL        Header;
96         UINT32                          MemoryType;
97         EFI_PHYSICAL_ADDRESS            StartingAddress;
98         EFI_PHYSICAL_ADDRESS            EndingAddress;
99 } MEMMAP_DEVICE_PATH;
100 
101 #define HW_VENDOR_DP                    0x04
102 typedef struct _VENDOR_DEVICE_PATH {
103         EFI_DEVICE_PATH_PROTOCOL        Header;
104         EFI_GUID                        Guid;
105 } VENDOR_DEVICE_PATH;
106 
107 #define UNKNOWN_DEVICE_GUID \
108     { 0xcf31fac5, 0xc24e, 0x11d2,  {0x85, 0xf3, 0x0, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b}  }
109 
110 typedef struct _UKNOWN_DEVICE_VENDOR_DP {
111     VENDOR_DEVICE_PATH      DevicePath;
112     UINT8                   LegacyDriveLetter;
113 } UNKNOWN_DEVICE_VENDOR_DEVICE_PATH;
114 
115 #define HW_CONTROLLER_DP            0x05
116 typedef struct _CONTROLLER_DEVICE_PATH {
117         EFI_DEVICE_PATH_PROTOCOL  Header;
118         UINT32                    Controller;
119 } CONTROLLER_DEVICE_PATH;
120 
121 
122 /*
123  * ACPI Device Path (UEFI 2.4 specification, version 2.4 § 9.3.3 and 9.3.4.)
124  */
125 #define ACPI_DEVICE_PATH                 0x02
126 
127 #define ACPI_DP                         0x01
128 typedef struct _ACPI_HID_DEVICE_PATH {
129         EFI_DEVICE_PATH_PROTOCOL        Header;
130         UINT32                          HID;
131         UINT32                          UID;
132 } ACPI_HID_DEVICE_PATH;
133 
134 #define EXPANDED_ACPI_DP		0x02
135 typedef struct _EXPANDED_ACPI_HID_DEVICE_PATH {
136 	EFI_DEVICE_PATH_PROTOCOL	Header;
137 	UINT32				HID;
138 	UINT32				UID;
139 	UINT32				CID;
140 	UINT8				HidStr[1];
141 } EXPANDED_ACPI_HID_DEVICE_PATH;
142 
143 #define ACPI_ADR_DP 3
144 typedef struct _ACPI_ADR_DEVICE_PATH {
145     EFI_DEVICE_PATH_PROTOCOL Header ;
146     UINT32 ADR ;
147 } ACPI_ADR_DEVICE_PATH ;
148 
149 //
150 // EISA ID Macro
151 // EISA ID Definition 32-bits
152 //  bits[15:0] - three character compressed ASCII EISA ID.
153 //  bits[31:16] - binary number
154 //   Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
155 //
156 #define PNP_EISA_ID_CONST       0x41d0
157 #define EISA_ID(_Name, _Num)    ((UINT32) ((_Name) | (_Num) << 16))
158 #define EISA_PNP_ID(_PNPId)     (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
159 
160 #define PNP_EISA_ID_MASK        0xffff
161 #define EISA_ID_TO_NUM(_Id)     ((_Id) >> 16)
162 
163 
164 /*
165  * Messaging Device Path (UEFI 2.4 specification, version 2.4 § 9.3.5.)
166  */
167 #define MESSAGING_DEVICE_PATH           0x03
168 
169 #define MSG_ATAPI_DP                    0x01
170 typedef struct _ATAPI_DEVICE_PATH {
171         EFI_DEVICE_PATH_PROTOCOL        Header;
172         UINT8                           PrimarySecondary;
173         UINT8                           SlaveMaster;
174         UINT16                          Lun;
175 } ATAPI_DEVICE_PATH;
176 
177 #define MSG_SCSI_DP                     0x02
178 typedef struct _SCSI_DEVICE_PATH {
179         EFI_DEVICE_PATH_PROTOCOL        Header;
180         UINT16                          Pun;
181         UINT16                          Lun;
182 } SCSI_DEVICE_PATH;
183 
184 #define MSG_FIBRECHANNEL_DP             0x03
185 typedef struct _FIBRECHANNEL_DEVICE_PATH {
186         EFI_DEVICE_PATH_PROTOCOL        Header;
187         UINT32                          Reserved;
188         UINT64                          WWN;
189         UINT64                          Lun;
190 } FIBRECHANNEL_DEVICE_PATH;
191 
192 /**
193  * Fibre Channel Ex SubType.
194  * UEFI 2.0 specification version 2.4 § 9.3.5.6.
195  */
196 #define MSG_FIBRECHANNELEX_DP 21
197 typedef struct _FIBRECHANNELEX_DEVICE_PATH {
198     EFI_DEVICE_PATH_PROTOCOL Header ;
199     UINT32 Reserved ;
200     UINT8 WWN[ 8 ] ; /* World Wide Name */
201     UINT8 Lun[ 8 ] ; /* Logical unit, T-10 SCSI Architecture Model 4 specification */
202 } FIBRECHANNELEX_DEVICE_PATH ;
203 
204 #define MSG_1394_DP                     0x04
205 typedef struct _F1394_DEVICE_PATH {
206         EFI_DEVICE_PATH_PROTOCOL        Header;
207         UINT32                          Reserved;
208         UINT64                          Guid;
209 } F1394_DEVICE_PATH;
210 
211 #define MSG_USB_DP                      0x05
212 typedef struct _USB_DEVICE_PATH {
213         EFI_DEVICE_PATH_PROTOCOL        Header;
214         UINT8                           Port;
215         UINT8                           Endpoint;
216 } USB_DEVICE_PATH;
217 
218 /**
219  * SATA Device Path SubType.
220  * UEFI 2.0 specification version 2.4 § 9.3.5.6.
221  */
222 #define MSG_SATA_DP 18
223 typedef struct _SATA_DEVICE_PATH {
224     EFI_DEVICE_PATH_PROTOCOL Header ;
225     UINT16 HBAPortNumber ;
226     UINT16 PortMultiplierPortNumber ;
227     UINT16 Lun ; /* Logical Unit Number */
228 } SATA_DEVICE_PATH ;
229 
230 /**
231  * USB WWID Device Path SubType.
232  * UEFI 2.0 specification version 2.4 § 9.3.5.7.
233  */
234 #define MSG_USB_WWID_DP 16
235 typedef struct _USB_WWID_DEVICE_PATH {
236     EFI_DEVICE_PATH_PROTOCOL Header ;
237     UINT16 InterfaceNumber ;
238     UINT16 VendorId ;
239     UINT16 ProductId ;
240     CHAR16 SerialNumber[ 1 ] ; /* UTF-16 characters of the USB serial number */
241 } USB_WWID_DEVICE_PATH ;
242 
243 /**
244  * Device Logical Unit SubType.
245  * UEFI 2.0 specification version 2.4 § 9.3.5.8.
246  */
247 #define MSG_DEVICE_LOGICAL_UNIT_DP 17
248 typedef struct _DEVICE_LOGICAL_UNIT_DEVICE_PATH {
249     EFI_DEVICE_PATH_PROTOCOL Header ;
250     UINT8 Lun ; /* Logical Unit Number */
251 } DEVICE_LOGICAL_UNIT_DEVICE_PATH ;
252 
253 #define MSG_USB_CLASS_DP                0x0F
254 typedef struct _USB_CLASS_DEVICE_PATH {
255         EFI_DEVICE_PATH_PROTOCOL        Header;
256         UINT16                          VendorId;
257         UINT16                          ProductId;
258         UINT8                           DeviceClass;
259         UINT8                           DeviceSubclass;
260         UINT8                           DeviceProtocol;
261 } USB_CLASS_DEVICE_PATH;
262 
263 #define MSG_I2O_DP                      0x06
264 typedef struct _I2O_DEVICE_PATH {
265         EFI_DEVICE_PATH_PROTOCOL        Header;
266         UINT32                          Tid;
267 } I2O_DEVICE_PATH;
268 
269 #define MSG_MAC_ADDR_DP                 0x0b
270 typedef struct _MAC_ADDR_DEVICE_PATH {
271         EFI_DEVICE_PATH_PROTOCOL        Header;
272         EFI_MAC_ADDRESS                 MacAddress;
273         UINT8                           IfType;
274 } MAC_ADDR_DEVICE_PATH;
275 
276 #define MSG_IPv4_DP                     0x0c
277 typedef struct _IPv4_DEVICE_PATH {
278         EFI_DEVICE_PATH_PROTOCOL        Header;
279         EFI_IPv4_ADDRESS                LocalIpAddress;
280         EFI_IPv4_ADDRESS                RemoteIpAddress;
281         UINT16                          LocalPort;
282         UINT16                          RemotePort;
283         UINT16                          Protocol;
284         BOOLEAN                         StaticIpAddress;
285         /* new from UEFI version 2, code must check Length field in Header */
286         EFI_IPv4_ADDRESS                GatewayIpAddress ;
287         EFI_IPv4_ADDRESS                SubnetMask ;
288 } IPv4_DEVICE_PATH;
289 
290 #define MSG_IPv6_DP                     0x0d
291 typedef struct _IPv6_DEVICE_PATH {
292         EFI_DEVICE_PATH_PROTOCOL        Header;
293         EFI_IPv6_ADDRESS                LocalIpAddress;
294         EFI_IPv6_ADDRESS                RemoteIpAddress;
295         UINT16                          LocalPort;
296         UINT16                          RemotePort;
297         UINT16                          Protocol;
298         BOOLEAN                         IPAddressOrigin ;
299         /* new from UEFI version 2, code must check Length field in Header */
300         UINT8                           PrefixLength ;
301         EFI_IPv6_ADDRESS                GatewayIpAddress ;
302 } IPv6_DEVICE_PATH;
303 
304 
305 /**
306  * Uniform Resource Identifiers SubType.
307  * UEFI 2.0 specification version 2.4C § 9.3.5.23.
308  */
309 #define MSG_URI_DP                      24
310 typedef struct _URI_DEVICE_PATH {
311         EFI_DEVICE_PATH_PROTOCOL        Header;
312         CHAR8                           Uri[1];
313 } URI_DEVICE_PATH;
314 
315 /**
316  * Device Logical Unit SubType.
317  * UEFI 2.0 specification version 2.4 § 9.3.5.8.
318  */
319 #define MSG_VLAN_DP 20
320 typedef struct _VLAN_DEVICE_PATH {
321     EFI_DEVICE_PATH_PROTOCOL Header ;
322     UINT16 VlanId ;
323 } VLAN_DEVICE_PATH;
324 
325 #define MSG_INFINIBAND_DP               0x09
326 typedef struct _INFINIBAND_DEVICE_PATH {
327         EFI_DEVICE_PATH_PROTOCOL        Header;
328         UINT32                          ResourceFlags ;
329         UINT64                          PortGid ;
330         UINT64                          ServiceId ;
331         UINT64                          TargetPortId ;
332         UINT64                          DeviceId ;
333 } INFINIBAND_DEVICE_PATH;
334 
335 #define MSG_UART_DP                     0x0e
336 typedef struct _UART_DEVICE_PATH {
337         EFI_DEVICE_PATH_PROTOCOL        Header;
338         UINT32                          Reserved;
339         UINT64                          BaudRate;
340         UINT8                           DataBits;
341         UINT8                           Parity;
342         UINT8                           StopBits;
343 } UART_DEVICE_PATH;
344 
345 #define MSG_VENDOR_DP                   0x0A
346 /* Use VENDOR_DEVICE_PATH struct */
347 
348 #define EFI_PC_ANSI_GUID \
349     { 0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
350 #define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
351 
352 #define EFI_VT_100_GUID \
353     { 0xdfa66065, 0xb419, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
354 #define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
355 
356 #define EFI_VT_100_PLUS_GUID \
357     { 0x7baec70b, 0x57e0, 0x4c76, {0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43} }
358 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
359 
360 #define EFI_VT_UTF8_GUID \
361     { 0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88} }
362 #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
363 
364 
365 /*
366  * Media Device Path (UEFI 2.4 specification, version 2.4 § 9.3.6.)
367  */
368 #define MEDIA_DEVICE_PATH               0x04
369 
370 #define MEDIA_HARDDRIVE_DP              0x01
371 typedef struct _HARDDRIVE_DEVICE_PATH {
372         EFI_DEVICE_PATH_PROTOCOL        Header;
373         UINT32                          PartitionNumber;
374         UINT64                          PartitionStart;
375         UINT64                          PartitionSize;
376         UINT8                           Signature[16];
377         UINT8                           MBRType;
378         UINT8                           SignatureType;
379 } HARDDRIVE_DEVICE_PATH;
380 
381 #define MBR_TYPE_PCAT                       0x01
382 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
383 
384 #define SIGNATURE_TYPE_MBR                  0x01
385 #define SIGNATURE_TYPE_GUID                 0x02
386 
387 #define MEDIA_CDROM_DP                  0x02
388 typedef struct _CDROM_DEVICE_PATH {
389         EFI_DEVICE_PATH_PROTOCOL        Header;
390         UINT32                          BootEntry;
391         UINT64                          PartitionStart;
392         UINT64                          PartitionSize;
393 } CDROM_DEVICE_PATH;
394 
395 #define MEDIA_VENDOR_DP                 0x03
396 /* Use VENDOR_DEVICE_PATH struct */
397 
398 #define MEDIA_FILEPATH_DP               0x04
399 typedef struct _FILEPATH_DEVICE_PATH {
400         EFI_DEVICE_PATH_PROTOCOL        Header;
401         CHAR16                          PathName[1];
402 } FILEPATH_DEVICE_PATH;
403 
404 #define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
405 
406 #define MEDIA_PROTOCOL_DP               0x05
407 typedef struct _MEDIA_PROTOCOL_DEVICE_PATH {
408         EFI_DEVICE_PATH_PROTOCOL        Header;
409         EFI_GUID                        Protocol;
410 } MEDIA_PROTOCOL_DEVICE_PATH;
411 
412 /**
413  * PIWG Firmware File SubType.
414  * UEFI 2.0 specification version 2.4 § 9.3.6.6.
415  */
416 #define MEDIA_PIWG_FW_FILE_DP 6
417 typedef struct _MEDIA_FW_VOL_FILEPATH_DEVICE_PATH {
418     EFI_DEVICE_PATH_PROTOCOL Header ;
419     EFI_GUID FvFileName ;
420 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH ;
421 
422 /**
423  * PIWG Firmware Volume Device Path SubType.
424  * UEFI 2.0 specification version 2.4 § 9.3.6.7.
425  */
426 #define MEDIA_PIWG_FW_VOL_DP 7
427 typedef struct _MEDIA_FW_VOL_DEVICE_PATH {
428     EFI_DEVICE_PATH_PROTOCOL Header ;
429     EFI_GUID FvName ;
430 } MEDIA_FW_VOL_DEVICE_PATH ;
431 
432 /**
433  * Media relative offset range device path.
434  * UEFI 2.0 specification version 2.4 § 9.3.6.8.
435  */
436 #define MEDIA_RELATIVE_OFFSET_RANGE_DP 8
437 typedef struct _MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH {
438     EFI_DEVICE_PATH_PROTOCOL Header ;
439     UINT32 Reserved ;
440     UINT64 StartingOffset ;
441     UINT64 EndingOffset ;
442 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH ;
443 
444 
445 /*
446  * BIOS Boot Specification Device Path (UEFI 2.4 specification, version 2.4 § 9.3.7.)
447  */
448 #define BBS_DEVICE_PATH                 0x05
449 
450 #define BBS_BBS_DP                      0x01
451 typedef struct _BBS_BBS_DEVICE_PATH {
452         EFI_DEVICE_PATH_PROTOCOL        Header;
453         UINT16                          DeviceType;
454         UINT16                          StatusFlag;
455         CHAR8                           String[1];
456 } BBS_BBS_DEVICE_PATH;
457 
458 /* DeviceType definitions - from BBS specification */
459 #define BBS_TYPE_FLOPPY                 0x01
460 #define BBS_TYPE_HARDDRIVE              0x02
461 #define BBS_TYPE_CDROM                  0x03
462 #define BBS_TYPE_PCMCIA                 0x04
463 #define BBS_TYPE_USB                    0x05
464 #define BBS_TYPE_EMBEDDED_NETWORK       0x06
465 #define BBS_TYPE_DEV                    0x80
466 #define BBS_TYPE_UNKNOWN                0xFF
467 
468 typedef union {
469     EFI_DEVICE_PATH_PROTOCOL             DevPath;
470     PCI_DEVICE_PATH                      Pci;
471     PCCARD_DEVICE_PATH                   PcCard;
472     MEMMAP_DEVICE_PATH                   MemMap;
473     VENDOR_DEVICE_PATH                   Vendor;
474     UNKNOWN_DEVICE_VENDOR_DEVICE_PATH    UnknownVendor;
475     CONTROLLER_DEVICE_PATH               Controller;
476     ACPI_HID_DEVICE_PATH                 Acpi;
477 
478     ATAPI_DEVICE_PATH                    Atapi;
479     SCSI_DEVICE_PATH                     Scsi;
480     FIBRECHANNEL_DEVICE_PATH             FibreChannel;
481 
482     F1394_DEVICE_PATH                    F1394;
483     USB_DEVICE_PATH                      Usb;
484     USB_CLASS_DEVICE_PATH                UsbClass;
485     I2O_DEVICE_PATH                      I2O;
486     MAC_ADDR_DEVICE_PATH                 MacAddr;
487     IPv4_DEVICE_PATH                     Ipv4;
488     IPv6_DEVICE_PATH                     Ipv6;
489     URI_DEVICE_PATH                      Uri;
490     INFINIBAND_DEVICE_PATH               InfiniBand;
491     UART_DEVICE_PATH                     Uart;
492 
493     HARDDRIVE_DEVICE_PATH                HardDrive;
494     CDROM_DEVICE_PATH                    CD;
495 
496     FILEPATH_DEVICE_PATH                 FilePath;
497     MEDIA_PROTOCOL_DEVICE_PATH           MediaProtocol;
498 
499     BBS_BBS_DEVICE_PATH                  Bbs;
500 
501 } EFI_DEV_PATH;
502 
503 typedef union {
504     EFI_DEVICE_PATH_PROTOCOL             *DevPath;
505     PCI_DEVICE_PATH                      *Pci;
506     PCCARD_DEVICE_PATH                   *PcCard;
507     MEMMAP_DEVICE_PATH                   *MemMap;
508     VENDOR_DEVICE_PATH                   *Vendor;
509     UNKNOWN_DEVICE_VENDOR_DEVICE_PATH    *UnknownVendor;
510     CONTROLLER_DEVICE_PATH               *Controller;
511     ACPI_HID_DEVICE_PATH                 *Acpi;
512 
513     ATAPI_DEVICE_PATH                    *Atapi;
514     SCSI_DEVICE_PATH                     *Scsi;
515     FIBRECHANNEL_DEVICE_PATH             *FibreChannel;
516 
517     F1394_DEVICE_PATH                    *F1394;
518     USB_DEVICE_PATH                      *Usb;
519     USB_CLASS_DEVICE_PATH                *UsbClass;
520     I2O_DEVICE_PATH                      *I2O;
521     MAC_ADDR_DEVICE_PATH                 *MacAddr;
522     IPv4_DEVICE_PATH                     *Ipv4;
523     IPv6_DEVICE_PATH                     *Ipv6;
524     URI_DEVICE_PATH                      *Uri;
525     INFINIBAND_DEVICE_PATH               *InfiniBand;
526     UART_DEVICE_PATH                     *Uart;
527 
528     HARDDRIVE_DEVICE_PATH                *HardDrive;
529 
530     FILEPATH_DEVICE_PATH                 *FilePath;
531     MEDIA_PROTOCOL_DEVICE_PATH           *MediaProtocol;
532 
533     CDROM_DEVICE_PATH                    *CD;
534     BBS_BBS_DEVICE_PATH                  *Bbs;
535 
536 } EFI_DEV_PATH_PTR;
537 
538 #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
539   { 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c} }
540 
541 typedef
542 CHAR16*
543 (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
544     IN CONST EFI_DEVICE_PATH_PROTOCOL    *DeviceNode,
545     IN BOOLEAN                           DisplayOnly,
546     IN BOOLEAN                           AllowShortcuts
547     );
548 
549 typedef
550 CHAR16*
551 (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
552     IN CONST EFI_DEVICE_PATH_PROTOCOL    *DevicePath,
553     IN BOOLEAN                           DisplayOnly,
554     IN BOOLEAN                           AllowShortcuts
555     );
556 
557 typedef struct _EFI_DEVICE_PATH_TO_TEXT_PROTOCOL {
558 	EFI_DEVICE_PATH_TO_TEXT_NODE         ConvertDeviceNodeToText;
559 	EFI_DEVICE_PATH_TO_TEXT_PATH         ConvertDevicePathToText;
560 } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
561 
562 #define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
563   { 0x5c99a21, 0xc70f, 0x4ad2, {0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e} }
564 
565 typedef
566 EFI_DEVICE_PATH_PROTOCOL*
567 (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
568     IN CONST CHAR16                      *TextDeviceNode
569     );
570 
571 typedef
572 EFI_DEVICE_PATH_PROTOCOL*
573 (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
574     IN CONST CHAR16                      *TextDevicePath
575     );
576 
577 typedef struct {
578     EFI_DEVICE_PATH_FROM_TEXT_NODE       ConvertTextToDeviceNode;
579     EFI_DEVICE_PATH_FROM_TEXT_PATH       ConvertTextToDevicePath;
580 } EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
581 
582 #endif
583