1 /** @file
2   The device path protocol as defined in UEFI 2.0.
3 
4   The device path represents a programmatic path to a device,
5   from a software point of view. The path must persist from boot to boot, so
6   it can not contain things like PCI bus numbers that change from boot to boot.
7 
8 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
9 SPDX-License-Identifier: BSD-2-Clause-Patent
10 
11 **/
12 
13 #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
14 #define __EFI_DEVICE_PATH_PROTOCOL_H__
15 
16 #include <Guid/PcAnsi.h>
17 #include <IndustryStandard/Bluetooth.h>
18 #include <IndustryStandard/Acpi60.h>
19 
20 ///
21 /// Device Path protocol.
22 ///
23 #define EFI_DEVICE_PATH_PROTOCOL_GUID \
24   { \
25     0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
26   }
27 
28 ///
29 /// Device Path guid definition for backward-compatible with EFI1.1.
30 ///
31 #define DEVICE_PATH_PROTOCOL  EFI_DEVICE_PATH_PROTOCOL_GUID
32 
33 #pragma pack(1)
34 
35 /**
36   This protocol can be used on any device handle to obtain generic path/location
37   information concerning the physical device or logical device. If the handle does
38   not logically map to a physical device, the handle may not necessarily support
39   the device path protocol. The device path describes the location of the device
40   the handle is for. The size of the Device Path can be determined from the structures
41   that make up the Device Path.
42 **/
43 typedef struct {
44   UINT8 Type;       ///< 0x01 Hardware Device Path.
45                     ///< 0x02 ACPI Device Path.
46                     ///< 0x03 Messaging Device Path.
47                     ///< 0x04 Media Device Path.
48                     ///< 0x05 BIOS Boot Specification Device Path.
49                     ///< 0x7F End of Hardware Device Path.
50 
51   UINT8 SubType;    ///< Varies by Type
52                     ///< 0xFF End Entire Device Path, or
53                     ///< 0x01 End This Instance of a Device Path and start a new
54                     ///< Device Path.
55 
56   UINT8 Length[2];  ///< Specific Device Path data. Type and Sub-Type define
57                     ///< type of data. Size of data is included in Length.
58 } EFI_DEVICE_PATH_PROTOCOL;
59 
60 ///
61 /// Device Path protocol definition for backward-compatible with EFI1.1.
62 ///
63 typedef EFI_DEVICE_PATH_PROTOCOL  EFI_DEVICE_PATH;
64 
65 ///
66 /// Hardware Device Paths.
67 ///
68 #define HARDWARE_DEVICE_PATH      0x01
69 
70 ///
71 /// PCI Device Path SubType.
72 ///
73 #define HW_PCI_DP                 0x01
74 
75 ///
76 /// PCI Device Path.
77 ///
78 typedef struct {
79   EFI_DEVICE_PATH_PROTOCOL        Header;
80   ///
81   /// PCI Function Number.
82   ///
83   UINT8                           Function;
84   ///
85   /// PCI Device Number.
86   ///
87   UINT8                           Device;
88 } PCI_DEVICE_PATH;
89 
90 ///
91 /// PCCARD Device Path SubType.
92 ///
93 #define HW_PCCARD_DP              0x02
94 
95 ///
96 /// PCCARD Device Path.
97 ///
98 typedef struct {
99   EFI_DEVICE_PATH_PROTOCOL        Header;
100   ///
101   /// Function Number (0 = First Function).
102   ///
103   UINT8                           FunctionNumber;
104 } PCCARD_DEVICE_PATH;
105 
106 ///
107 /// Memory Mapped Device Path SubType.
108 ///
109 #define HW_MEMMAP_DP              0x03
110 
111 ///
112 /// Memory Mapped Device Path.
113 ///
114 typedef struct {
115   EFI_DEVICE_PATH_PROTOCOL        Header;
116   ///
117   /// EFI_MEMORY_TYPE
118   ///
119   UINT32                          MemoryType;
120   ///
121   /// Starting Memory Address.
122   ///
123   EFI_PHYSICAL_ADDRESS            StartingAddress;
124   ///
125   /// Ending Memory Address.
126   ///
127   EFI_PHYSICAL_ADDRESS            EndingAddress;
128 } MEMMAP_DEVICE_PATH;
129 
130 ///
131 /// Hardware Vendor Device Path SubType.
132 ///
133 #define HW_VENDOR_DP              0x04
134 
135 ///
136 /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must
137 /// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the
138 /// contents on the n bytes that follow in the Vendor Device Path node.
139 ///
140 typedef struct {
141   EFI_DEVICE_PATH_PROTOCOL        Header;
142   ///
143   /// Vendor-assigned GUID that defines the data that follows.
144   ///
145   EFI_GUID                        Guid;
146   ///
147   /// Vendor-defined variable size data.
148   ///
149 } VENDOR_DEVICE_PATH;
150 
151 ///
152 /// Controller Device Path SubType.
153 ///
154 #define HW_CONTROLLER_DP          0x05
155 
156 ///
157 /// Controller Device Path.
158 ///
159 typedef struct {
160   EFI_DEVICE_PATH_PROTOCOL        Header;
161   ///
162   /// Controller number.
163   ///
164   UINT32                          ControllerNumber;
165 } CONTROLLER_DEVICE_PATH;
166 
167 ///
168 /// BMC Device Path SubType.
169 ///
170 #define HW_BMC_DP                 0x06
171 
172 ///
173 /// BMC Device Path.
174 ///
175 typedef struct {
176   EFI_DEVICE_PATH_PROTOCOL        Header;
177   ///
178   /// Interface Type.
179   ///
180   UINT8                           InterfaceType;
181   ///
182   /// Base Address.
183   ///
184   UINT8                           BaseAddress[8];
185 } BMC_DEVICE_PATH;
186 
187 ///
188 /// ACPI Device Paths.
189 ///
190 #define ACPI_DEVICE_PATH          0x02
191 
192 ///
193 /// ACPI Device Path SubType.
194 ///
195 #define ACPI_DP                   0x01
196 typedef struct {
197   EFI_DEVICE_PATH_PROTOCOL        Header;
198   ///
199   /// Device's PnP hardware ID stored in a numeric 32-bit
200   /// compressed EISA-type ID. This value must match the
201   /// corresponding _HID in the ACPI name space.
202   ///
203   UINT32                          HID;
204   ///
205   /// Unique ID that is required by ACPI if two devices have the
206   /// same _HID. This value must also match the corresponding
207   /// _UID/_HID pair in the ACPI name space. Only the 32-bit
208   /// numeric value type of _UID is supported. Thus, strings must
209   /// not be used for the _UID in the ACPI name space.
210   ///
211   UINT32                          UID;
212 } ACPI_HID_DEVICE_PATH;
213 
214 ///
215 /// Expanded ACPI Device Path SubType.
216 ///
217 #define ACPI_EXTENDED_DP          0x02
218 typedef struct {
219   EFI_DEVICE_PATH_PROTOCOL        Header;
220   ///
221   /// Device's PnP hardware ID stored in a numeric 32-bit
222   /// compressed EISA-type ID. This value must match the
223   /// corresponding _HID in the ACPI name space.
224   ///
225   UINT32                          HID;
226   ///
227   /// Unique ID that is required by ACPI if two devices have the
228   /// same _HID. This value must also match the corresponding
229   /// _UID/_HID pair in the ACPI name space.
230   ///
231   UINT32                          UID;
232   ///
233   /// Device's compatible PnP hardware ID stored in a numeric
234   /// 32-bit compressed EISA-type ID. This value must match at
235   /// least one of the compatible device IDs returned by the
236   /// corresponding _CID in the ACPI name space.
237   ///
238   UINT32                          CID;
239   ///
240   /// Optional variable length _HIDSTR.
241   /// Optional variable length _UIDSTR.
242   /// Optional variable length _CIDSTR.
243   ///
244 } ACPI_EXTENDED_HID_DEVICE_PATH;
245 
246 //
247 //  EISA ID Macro
248 //  EISA ID Definition 32-bits
249 //   bits[15:0] - three character compressed ASCII EISA ID.
250 //   bits[31:16] - binary number
251 //    Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
252 //
253 #define PNP_EISA_ID_CONST         0x41d0
254 #define EISA_ID(_Name, _Num)      ((UINT32)((_Name) | (_Num) << 16))
255 #define EISA_PNP_ID(_PNPId)       (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
256 #define EFI_PNP_ID(_PNPId)        (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
257 
258 #define PNP_EISA_ID_MASK          0xffff
259 #define EISA_ID_TO_NUM(_Id)       ((_Id) >> 16)
260 
261 ///
262 /// ACPI _ADR Device Path SubType.
263 ///
264 #define ACPI_ADR_DP               0x03
265 
266 ///
267 /// The _ADR device path is used to contain video output device attributes to support the Graphics
268 /// Output Protocol. The device path can contain multiple _ADR entries if multiple video output
269 /// devices are displaying the same output.
270 ///
271 typedef struct {
272   EFI_DEVICE_PATH_PROTOCOL        Header;
273   ///
274   /// _ADR value. For video output devices the value of this
275   /// field comes from Table B-2 of the ACPI 3.0 specification. At
276   /// least one _ADR value is required.
277   ///
278   UINT32                          ADR;
279   //
280   // This device path may optionally contain more than one _ADR entry.
281   //
282 } ACPI_ADR_DEVICE_PATH;
283 
284 ///
285 /// ACPI NVDIMM Device Path SubType.
286 ///
287 #define ACPI_NVDIMM_DP               0x04
288 ///
289 ///
290 typedef struct {
291   EFI_DEVICE_PATH_PROTOCOL        Header;
292   ///
293   /// NFIT Device Handle, the _ADR of the NVDIMM device.
294   /// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification.
295   ///
296   UINT32                          NFITDeviceHandle;
297 } ACPI_NVDIMM_DEVICE_PATH;
298 
299 #define ACPI_ADR_DISPLAY_TYPE_OTHER             0
300 #define ACPI_ADR_DISPLAY_TYPE_VGA               1
301 #define ACPI_ADR_DISPLAY_TYPE_TV                2
302 #define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL  3
303 #define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL  4
304 
305 #define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
306           ((UINT32)(  ((UINT32)((_DeviceIdScheme) & 0x1) << 31) |  \
307                       (((_HeadId)                 & 0x7) << 18) |  \
308                       (((_NonVgaOutput)           & 0x1) << 17) |  \
309                       (((_BiosCanDetect)          & 0x1) << 16) |  \
310                       (((_VendorInfo)             & 0xf) << 12) |  \
311                       (((_Type)                   & 0xf) << 8)  |  \
312                       (((_Port)                   & 0xf) << 4)  |  \
313                        ((_Index)                  & 0xf) ))
314 
315 ///
316 /// Messaging Device Paths.
317 /// This Device Path is used to describe the connection of devices outside the resource domain of the
318 /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
319 /// information like networking protocol IP addresses.
320 ///
321 #define MESSAGING_DEVICE_PATH     0x03
322 
323 ///
324 /// ATAPI Device Path SubType
325 ///
326 #define MSG_ATAPI_DP              0x01
327 typedef struct {
328   EFI_DEVICE_PATH_PROTOCOL        Header;
329   ///
330   /// Set to zero for primary, or one for secondary.
331   ///
332   UINT8                           PrimarySecondary;
333   ///
334   /// Set to zero for master, or one for slave mode.
335   ///
336   UINT8                           SlaveMaster;
337   ///
338   /// Logical Unit Number.
339   ///
340   UINT16                          Lun;
341 } ATAPI_DEVICE_PATH;
342 
343 ///
344 /// SCSI Device Path SubType.
345 ///
346 #define MSG_SCSI_DP               0x02
347 typedef struct {
348   EFI_DEVICE_PATH_PROTOCOL        Header;
349   ///
350   /// Target ID on the SCSI bus (PUN).
351   ///
352   UINT16                          Pun;
353   ///
354   /// Logical Unit Number (LUN).
355   ///
356   UINT16                          Lun;
357 } SCSI_DEVICE_PATH;
358 
359 ///
360 /// Fibre Channel SubType.
361 ///
362 #define MSG_FIBRECHANNEL_DP       0x03
363 typedef struct {
364   EFI_DEVICE_PATH_PROTOCOL        Header;
365   ///
366   /// Reserved for the future.
367   ///
368   UINT32                          Reserved;
369   ///
370   /// Fibre Channel World Wide Number.
371   ///
372   UINT64                          WWN;
373   ///
374   /// Fibre Channel Logical Unit Number.
375   ///
376   UINT64                          Lun;
377 } FIBRECHANNEL_DEVICE_PATH;
378 
379 ///
380 /// Fibre Channel Ex SubType.
381 ///
382 #define MSG_FIBRECHANNELEX_DP     0x15
383 typedef struct {
384   EFI_DEVICE_PATH_PROTOCOL        Header;
385   ///
386   /// Reserved for the future.
387   ///
388   UINT32                          Reserved;
389   ///
390   /// 8 byte array containing Fibre Channel End Device Port Name.
391   ///
392   UINT8                           WWN[8];
393   ///
394   /// 8 byte array containing Fibre Channel Logical Unit Number.
395   ///
396   UINT8                           Lun[8];
397 } FIBRECHANNELEX_DEVICE_PATH;
398 
399 ///
400 /// 1394 Device Path SubType
401 ///
402 #define MSG_1394_DP               0x04
403 typedef struct {
404   EFI_DEVICE_PATH_PROTOCOL        Header;
405   ///
406   /// Reserved for the future.
407   ///
408   UINT32                          Reserved;
409   ///
410   /// 1394 Global Unique ID (GUID).
411   ///
412   UINT64                          Guid;
413 } F1394_DEVICE_PATH;
414 
415 ///
416 /// USB Device Path SubType.
417 ///
418 #define MSG_USB_DP                0x05
419 typedef struct {
420   EFI_DEVICE_PATH_PROTOCOL      Header;
421   ///
422   /// USB Parent Port Number.
423   ///
424   UINT8                         ParentPortNumber;
425   ///
426   /// USB Interface Number.
427   ///
428   UINT8                         InterfaceNumber;
429 } USB_DEVICE_PATH;
430 
431 ///
432 /// USB Class Device Path SubType.
433 ///
434 #define MSG_USB_CLASS_DP          0x0f
435 typedef struct {
436   EFI_DEVICE_PATH_PROTOCOL      Header;
437   ///
438   /// Vendor ID assigned by USB-IF. A value of 0xFFFF will
439   /// match any Vendor ID.
440   ///
441   UINT16                        VendorId;
442   ///
443   /// Product ID assigned by USB-IF. A value of 0xFFFF will
444   /// match any Product ID.
445   ///
446   UINT16                        ProductId;
447   ///
448   /// The class code assigned by the USB-IF. A value of 0xFF
449   /// will match any class code.
450   ///
451   UINT8                         DeviceClass;
452   ///
453   /// The subclass code assigned by the USB-IF. A value of
454   /// 0xFF will match any subclass code.
455   ///
456   UINT8                         DeviceSubClass;
457   ///
458   /// The protocol code assigned by the USB-IF. A value of
459   /// 0xFF will match any protocol code.
460   ///
461   UINT8                         DeviceProtocol;
462 } USB_CLASS_DEVICE_PATH;
463 
464 ///
465 /// USB WWID Device Path SubType.
466 ///
467 #define MSG_USB_WWID_DP           0x10
468 
469 ///
470 /// This device path describes a USB device using its serial number.
471 ///
472 typedef struct {
473   EFI_DEVICE_PATH_PROTOCOL      Header;
474   ///
475   /// USB interface number.
476   ///
477   UINT16                        InterfaceNumber;
478   ///
479   /// USB vendor id of the device.
480   ///
481   UINT16                        VendorId;
482   ///
483   /// USB product id of the device.
484   ///
485   UINT16                        ProductId;
486   ///
487   /// Last 64-or-fewer UTF-16 characters of the USB
488   /// serial number. The length of the string is
489   /// determined by the Length field less the offset of the
490   /// Serial Number field (10)
491   ///
492   /// CHAR16                     SerialNumber[...];
493 } USB_WWID_DEVICE_PATH;
494 
495 ///
496 /// Device Logical Unit SubType.
497 ///
498 #define MSG_DEVICE_LOGICAL_UNIT_DP  0x11
499 typedef struct {
500   EFI_DEVICE_PATH_PROTOCOL      Header;
501   ///
502   /// Logical Unit Number for the interface.
503   ///
504   UINT8                         Lun;
505 } DEVICE_LOGICAL_UNIT_DEVICE_PATH;
506 
507 ///
508 /// SATA Device Path SubType.
509 ///
510 #define MSG_SATA_DP               0x12
511 typedef struct {
512   EFI_DEVICE_PATH_PROTOCOL        Header;
513   ///
514   /// The HBA port number that facilitates the connection to the
515   /// device or a port multiplier. The value 0xFFFF is reserved.
516   ///
517   UINT16                          HBAPortNumber;
518   ///
519   /// The Port multiplier port number that facilitates the connection
520   /// to the device. Must be set to 0xFFFF if the device is directly
521   /// connected to the HBA.
522   ///
523   UINT16                          PortMultiplierPortNumber;
524   ///
525   /// Logical Unit Number.
526   ///
527   UINT16                          Lun;
528 } SATA_DEVICE_PATH;
529 
530 ///
531 /// Flag for if the device is directly connected to the HBA.
532 ///
533 #define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
534 
535 ///
536 /// I2O Device Path SubType.
537 ///
538 #define MSG_I2O_DP                0x06
539 typedef struct {
540   EFI_DEVICE_PATH_PROTOCOL        Header;
541   ///
542   /// Target ID (TID) for a device.
543   ///
544   UINT32                          Tid;
545 } I2O_DEVICE_PATH;
546 
547 ///
548 /// MAC Address Device Path SubType.
549 ///
550 #define MSG_MAC_ADDR_DP           0x0b
551 typedef struct {
552   EFI_DEVICE_PATH_PROTOCOL        Header;
553   ///
554   /// The MAC address for a network interface padded with 0s.
555   ///
556   EFI_MAC_ADDRESS                 MacAddress;
557   ///
558   /// Network interface type(i.e. 802.3, FDDI).
559   ///
560   UINT8                           IfType;
561 } MAC_ADDR_DEVICE_PATH;
562 
563 ///
564 /// IPv4 Device Path SubType
565 ///
566 #define MSG_IPv4_DP               0x0c
567 typedef struct {
568   EFI_DEVICE_PATH_PROTOCOL        Header;
569   ///
570   /// The local IPv4 address.
571   ///
572   EFI_IPv4_ADDRESS                LocalIpAddress;
573   ///
574   /// The remote IPv4 address.
575   ///
576   EFI_IPv4_ADDRESS                RemoteIpAddress;
577   ///
578   /// The local port number.
579   ///
580   UINT16                          LocalPort;
581   ///
582   /// The remote port number.
583   ///
584   UINT16                          RemotePort;
585   ///
586   /// The network protocol(i.e. UDP, TCP).
587   ///
588   UINT16                          Protocol;
589   ///
590   /// 0x00 - The Source IP Address was assigned though DHCP.
591   /// 0x01 - The Source IP Address is statically bound.
592   ///
593   BOOLEAN                         StaticIpAddress;
594   ///
595   /// The gateway IP address
596   ///
597   EFI_IPv4_ADDRESS                GatewayIpAddress;
598   ///
599   /// The subnet mask
600   ///
601   EFI_IPv4_ADDRESS                SubnetMask;
602 } IPv4_DEVICE_PATH;
603 
604 ///
605 /// IPv6 Device Path SubType.
606 ///
607 #define MSG_IPv6_DP               0x0d
608 typedef struct {
609   EFI_DEVICE_PATH_PROTOCOL        Header;
610   ///
611   /// The local IPv6 address.
612   ///
613   EFI_IPv6_ADDRESS                LocalIpAddress;
614   ///
615   /// The remote IPv6 address.
616   ///
617   EFI_IPv6_ADDRESS                RemoteIpAddress;
618   ///
619   /// The local port number.
620   ///
621   UINT16                          LocalPort;
622   ///
623   /// The remote port number.
624   ///
625   UINT16                          RemotePort;
626   ///
627   /// The network protocol(i.e. UDP, TCP).
628   ///
629   UINT16                          Protocol;
630   ///
631   /// 0x00 - The Local IP Address was manually configured.
632   /// 0x01 - The Local IP Address is assigned through IPv6
633   /// stateless auto-configuration.
634   /// 0x02 - The Local IP Address is assigned through IPv6
635   /// stateful configuration.
636   ///
637   UINT8                           IpAddressOrigin;
638   ///
639   /// The prefix length
640   ///
641   UINT8                           PrefixLength;
642   ///
643   /// The gateway IP address
644   ///
645   EFI_IPv6_ADDRESS                GatewayIpAddress;
646 } IPv6_DEVICE_PATH;
647 
648 ///
649 /// InfiniBand Device Path SubType.
650 ///
651 #define MSG_INFINIBAND_DP         0x09
652 typedef struct {
653   EFI_DEVICE_PATH_PROTOCOL        Header;
654   ///
655   /// Flags to help identify/manage InfiniBand device path elements:
656   /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).
657   /// Bit 1 - Extend Boot Environment.
658   /// Bit 2 - Console Protocol.
659   /// Bit 3 - Storage Protocol.
660   /// Bit 4 - Network Protocol.
661   /// All other bits are reserved.
662   ///
663   UINT32                          ResourceFlags;
664   ///
665   /// 128-bit Global Identifier for remote fabric port.
666   ///
667   UINT8                           PortGid[16];
668   ///
669   /// 64-bit unique identifier to remote IOC or server process.
670   /// Interpretation of field specified by Resource Flags (bit 0).
671   ///
672   UINT64                          ServiceId;
673   ///
674   /// 64-bit persistent ID of remote IOC port.
675   ///
676   UINT64                          TargetPortId;
677   ///
678   /// 64-bit persistent ID of remote device.
679   ///
680   UINT64                          DeviceId;
681 } INFINIBAND_DEVICE_PATH;
682 
683 #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE                0x01
684 #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT  0x02
685 #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL           0x04
686 #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL           0x08
687 #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL           0x10
688 
689 ///
690 /// UART Device Path SubType.
691 ///
692 #define MSG_UART_DP               0x0e
693 typedef struct {
694   EFI_DEVICE_PATH_PROTOCOL        Header;
695   ///
696   /// Reserved.
697   ///
698   UINT32                          Reserved;
699   ///
700   /// The baud rate setting for the UART style device. A value of 0
701   /// means that the device's default baud rate will be used.
702   ///
703   UINT64                          BaudRate;
704   ///
705   /// The number of data bits for the UART style device. A value
706   /// of 0 means that the device's default number of data bits will be used.
707   ///
708   UINT8                           DataBits;
709   ///
710   /// The parity setting for the UART style device.
711   /// Parity 0x00 - Default Parity.
712   /// Parity 0x01 - No Parity.
713   /// Parity 0x02 - Even Parity.
714   /// Parity 0x03 - Odd Parity.
715   /// Parity 0x04 - Mark Parity.
716   /// Parity 0x05 - Space Parity.
717   ///
718   UINT8                           Parity;
719   ///
720   /// The number of stop bits for the UART style device.
721   /// Stop Bits 0x00 - Default Stop Bits.
722   /// Stop Bits 0x01 - 1 Stop Bit.
723   /// Stop Bits 0x02 - 1.5 Stop Bits.
724   /// Stop Bits 0x03 - 2 Stop Bits.
725   ///
726   UINT8                           StopBits;
727 } UART_DEVICE_PATH;
728 
729 ///
730 /// NVDIMM Namespace Device Path SubType.
731 ///
732 #define NVDIMM_NAMESPACE_DP               0x20
733 typedef struct {
734   EFI_DEVICE_PATH_PROTOCOL        Header;
735   ///
736   /// Namespace unique label identifier UUID.
737   ///
738   EFI_GUID Uuid;
739 } NVDIMM_NAMESPACE_DEVICE_PATH;
740 
741 //
742 // Use VENDOR_DEVICE_PATH struct
743 //
744 #define MSG_VENDOR_DP             0x0a
745 typedef VENDOR_DEVICE_PATH        VENDOR_DEFINED_DEVICE_PATH;
746 
747 #define DEVICE_PATH_MESSAGING_PC_ANSI     EFI_PC_ANSI_GUID
748 #define DEVICE_PATH_MESSAGING_VT_100      EFI_VT_100_GUID
749 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
750 #define DEVICE_PATH_MESSAGING_VT_UTF8     EFI_VT_UTF8_GUID
751 
752 ///
753 /// A new device path node is defined to declare flow control characteristics.
754 /// UART Flow Control Messaging Device Path
755 ///
756 typedef struct {
757   EFI_DEVICE_PATH_PROTOCOL        Header;
758   ///
759   /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
760   ///
761   EFI_GUID                        Guid;
762   ///
763   /// Bitmap of supported flow control types.
764   /// Bit 0 set indicates hardware flow control.
765   /// Bit 1 set indicates Xon/Xoff flow control.
766   /// All other bits are reserved and are clear.
767   ///
768   UINT32                          FlowControlMap;
769 } UART_FLOW_CONTROL_DEVICE_PATH;
770 
771 #define UART_FLOW_CONTROL_HARDWARE         0x00000001
772 #define UART_FLOW_CONTROL_XON_XOFF         0x00000010
773 
774 #define DEVICE_PATH_MESSAGING_SAS          EFI_SAS_DEVICE_PATH_GUID
775 ///
776 /// Serial Attached SCSI (SAS) Device Path.
777 ///
778 typedef struct {
779   EFI_DEVICE_PATH_PROTOCOL        Header;
780   ///
781   /// DEVICE_PATH_MESSAGING_SAS GUID.
782   ///
783   EFI_GUID                        Guid;
784   ///
785   /// Reserved for future use.
786   ///
787   UINT32                          Reserved;
788   ///
789   /// SAS Address for Serial Attached SCSI Target.
790   ///
791   UINT64                          SasAddress;
792   ///
793   /// SAS Logical Unit Number.
794   ///
795   UINT64                          Lun;
796   ///
797   /// More Information about the device and its interconnect.
798   ///
799   UINT16                          DeviceTopology;
800   ///
801   /// Relative Target Port (RTP).
802   ///
803   UINT16                          RelativeTargetPort;
804 } SAS_DEVICE_PATH;
805 
806 ///
807 /// Serial Attached SCSI (SAS) Ex Device Path SubType
808 ///
809 #define MSG_SASEX_DP              0x16
810 typedef struct {
811   EFI_DEVICE_PATH_PROTOCOL        Header;
812   ///
813   /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
814   ///
815   UINT8                           SasAddress[8];
816   ///
817   /// 8-byte array of the SAS Logical Unit Number.
818   ///
819   UINT8                           Lun[8];
820   ///
821   /// More Information about the device and its interconnect.
822   ///
823   UINT16                          DeviceTopology;
824   ///
825   /// Relative Target Port (RTP).
826   ///
827   UINT16                          RelativeTargetPort;
828 } SASEX_DEVICE_PATH;
829 
830 ///
831 /// NvmExpress Namespace Device Path SubType.
832 ///
833 #define MSG_NVME_NAMESPACE_DP     0x17
834 typedef struct {
835   EFI_DEVICE_PATH_PROTOCOL        Header;
836   UINT32                          NamespaceId;
837   UINT64                          NamespaceUuid;
838 } NVME_NAMESPACE_DEVICE_PATH;
839 
840 ///
841 /// DNS Device Path SubType
842 ///
843 #define MSG_DNS_DP                0x1F
844 typedef struct {
845   EFI_DEVICE_PATH_PROTOCOL        Header;
846   ///
847   /// Indicates the DNS server address is IPv4 or IPv6 address.
848   ///
849   UINT8                           IsIPv6;
850   ///
851   /// Instance of the DNS server address.
852   ///
853   EFI_IP_ADDRESS                  DnsServerIp[];
854 } DNS_DEVICE_PATH;
855 
856 ///
857 /// Uniform Resource Identifiers (URI) Device Path SubType
858 ///
859 #define MSG_URI_DP                0x18
860 typedef struct {
861   EFI_DEVICE_PATH_PROTOCOL        Header;
862   ///
863   /// Instance of the URI pursuant to RFC 3986.
864   ///
865   CHAR8                           Uri[];
866 } URI_DEVICE_PATH;
867 
868 ///
869 /// Universal Flash Storage (UFS) Device Path SubType.
870 ///
871 #define MSG_UFS_DP                0x19
872 typedef struct {
873   EFI_DEVICE_PATH_PROTOCOL        Header;
874   ///
875   /// Target ID on the UFS bus (PUN).
876   ///
877   UINT8                           Pun;
878   ///
879   /// Logical Unit Number (LUN).
880   ///
881   UINT8                           Lun;
882 } UFS_DEVICE_PATH;
883 
884 ///
885 /// SD (Secure Digital) Device Path SubType.
886 ///
887 #define MSG_SD_DP                 0x1A
888 typedef struct {
889   EFI_DEVICE_PATH_PROTOCOL        Header;
890   UINT8                           SlotNumber;
891 } SD_DEVICE_PATH;
892 
893 ///
894 /// EMMC (Embedded MMC) Device Path SubType.
895 ///
896 #define MSG_EMMC_DP                 0x1D
897 typedef struct {
898   EFI_DEVICE_PATH_PROTOCOL        Header;
899   UINT8                           SlotNumber;
900 } EMMC_DEVICE_PATH;
901 
902 ///
903 /// iSCSI Device Path SubType
904 ///
905 #define MSG_ISCSI_DP              0x13
906 typedef struct {
907   EFI_DEVICE_PATH_PROTOCOL        Header;
908   ///
909   /// Network Protocol (0 = TCP, 1+ = reserved).
910   ///
911   UINT16                          NetworkProtocol;
912   ///
913   /// iSCSI Login Options.
914   ///
915   UINT16                          LoginOption;
916   ///
917   /// iSCSI Logical Unit Number.
918   ///
919   UINT64                          Lun;
920   ///
921   /// iSCSI Target Portal group tag the initiator intends
922   /// to establish a session with.
923   ///
924   UINT16                          TargetPortalGroupTag;
925   ///
926   /// iSCSI NodeTarget Name. The length of the name
927   /// is determined by subtracting the offset of this field from Length.
928   ///
929   /// CHAR8                        iSCSI Target Name.
930 } ISCSI_DEVICE_PATH;
931 
932 #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST             0x0000
933 #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C   0x0002
934 #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST               0x0000
935 #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C     0x0008
936 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP              0x0000
937 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON               0x1000
938 #define ISCSI_LOGIN_OPTION_CHAP_BI                      0x0000
939 #define ISCSI_LOGIN_OPTION_CHAP_UNI                     0x2000
940 
941 ///
942 /// VLAN Device Path SubType.
943 ///
944 #define MSG_VLAN_DP               0x14
945 typedef struct {
946   EFI_DEVICE_PATH_PROTOCOL        Header;
947   ///
948   /// VLAN identifier (0-4094).
949   ///
950   UINT16                          VlanId;
951 } VLAN_DEVICE_PATH;
952 
953 ///
954 /// Bluetooth Device Path SubType.
955 ///
956 #define MSG_BLUETOOTH_DP     0x1b
957 typedef struct {
958   EFI_DEVICE_PATH_PROTOCOL        Header;
959   ///
960   /// 48bit Bluetooth device address.
961   ///
962   BLUETOOTH_ADDRESS               BD_ADDR;
963 } BLUETOOTH_DEVICE_PATH;
964 
965 ///
966 /// Wi-Fi Device Path SubType.
967 ///
968 #define MSG_WIFI_DP               0x1C
969 typedef struct {
970   EFI_DEVICE_PATH_PROTOCOL        Header;
971   ///
972   /// Service set identifier. A 32-byte octets string.
973   ///
974   UINT8                           SSId[32];
975 } WIFI_DEVICE_PATH;
976 
977 ///
978 /// Bluetooth LE Device Path SubType.
979 ///
980 #define MSG_BLUETOOTH_LE_DP       0x1E
981 typedef struct {
982   EFI_DEVICE_PATH_PROTOCOL        Header;
983   BLUETOOTH_LE_ADDRESS            Address;
984 } BLUETOOTH_LE_DEVICE_PATH;
985 
986 //
987 // Media Device Path
988 //
989 #define MEDIA_DEVICE_PATH         0x04
990 
991 ///
992 /// Hard Drive Media Device Path SubType.
993 ///
994 #define MEDIA_HARDDRIVE_DP        0x01
995 
996 ///
997 /// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
998 ///
999 typedef struct {
1000   EFI_DEVICE_PATH_PROTOCOL        Header;
1001   ///
1002   /// Describes the entry in a partition table, starting with entry 1.
1003   /// Partition number zero represents the entire device. Valid
1004   /// partition numbers for a MBR partition are [1, 4]. Valid
1005   /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].
1006   ///
1007   UINT32                          PartitionNumber;
1008   ///
1009   /// Starting LBA of the partition on the hard drive.
1010   ///
1011   UINT64                          PartitionStart;
1012   ///
1013   /// Size of the partition in units of Logical Blocks.
1014   ///
1015   UINT64                          PartitionSize;
1016   ///
1017   /// Signature unique to this partition:
1018   /// If SignatureType is 0, this field has to be initialized with 16 zeros.
1019   /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.
1020   /// The other 12 bytes are initialized with zeros.
1021   /// If SignatureType is 2, this field contains a 16 byte signature.
1022   ///
1023   UINT8                           Signature[16];
1024   ///
1025   /// Partition Format: (Unused values reserved).
1026   /// 0x01 - PC-AT compatible legacy MBR.
1027   /// 0x02 - GUID Partition Table.
1028   ///
1029   UINT8                           MBRType;
1030   ///
1031   /// Type of Disk Signature: (Unused values reserved).
1032   /// 0x00 - No Disk Signature.
1033   /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.
1034   /// 0x02 - GUID signature.
1035   ///
1036   UINT8                           SignatureType;
1037 } HARDDRIVE_DEVICE_PATH;
1038 
1039 #define MBR_TYPE_PCAT             0x01
1040 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
1041 
1042 #define NO_DISK_SIGNATURE         0x00
1043 #define SIGNATURE_TYPE_MBR        0x01
1044 #define SIGNATURE_TYPE_GUID       0x02
1045 
1046 ///
1047 /// CD-ROM Media Device Path SubType.
1048 ///
1049 #define MEDIA_CDROM_DP            0x02
1050 
1051 ///
1052 /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
1053 ///
1054 typedef struct {
1055   EFI_DEVICE_PATH_PROTOCOL        Header;
1056   ///
1057   /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
1058   ///
1059   UINT32                          BootEntry;
1060   ///
1061   /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
1062   ///
1063   UINT64                          PartitionStart;
1064   ///
1065   /// Size of the partition in units of Blocks, also called Sectors.
1066   ///
1067   UINT64                          PartitionSize;
1068 } CDROM_DEVICE_PATH;
1069 
1070 //
1071 // Use VENDOR_DEVICE_PATH struct
1072 //
1073 #define MEDIA_VENDOR_DP           0x03  ///< Media vendor device path subtype.
1074 
1075 ///
1076 /// File Path Media Device Path SubType
1077 ///
1078 #define MEDIA_FILEPATH_DP         0x04
1079 typedef struct {
1080   EFI_DEVICE_PATH_PROTOCOL        Header;
1081   ///
1082   /// A NULL-terminated Path string including directory and file names.
1083   ///
1084   CHAR16                          PathName[1];
1085 } FILEPATH_DEVICE_PATH;
1086 
1087 #define SIZE_OF_FILEPATH_DEVICE_PATH  OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
1088 
1089 ///
1090 /// Media Protocol Device Path SubType.
1091 ///
1092 #define MEDIA_PROTOCOL_DP         0x05
1093 
1094 ///
1095 /// The Media Protocol Device Path is used to denote the protocol that is being
1096 /// used in a device path at the location of the path specified.
1097 /// Many protocols are inherent to the style of device path.
1098 ///
1099 typedef struct {
1100   EFI_DEVICE_PATH_PROTOCOL        Header;
1101   ///
1102   /// The ID of the protocol.
1103   ///
1104   EFI_GUID                        Protocol;
1105 } MEDIA_PROTOCOL_DEVICE_PATH;
1106 
1107 ///
1108 /// PIWG Firmware File SubType.
1109 ///
1110 #define MEDIA_PIWG_FW_FILE_DP     0x06
1111 
1112 ///
1113 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
1114 ///
1115 typedef struct {
1116   EFI_DEVICE_PATH_PROTOCOL        Header;
1117   ///
1118   /// Firmware file name
1119   ///
1120   EFI_GUID                        FvFileName;
1121 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
1122 
1123 ///
1124 /// PIWG Firmware Volume Device Path SubType.
1125 ///
1126 #define MEDIA_PIWG_FW_VOL_DP      0x07
1127 
1128 ///
1129 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
1130 ///
1131 typedef struct {
1132   EFI_DEVICE_PATH_PROTOCOL        Header;
1133   ///
1134   /// Firmware volume name.
1135   ///
1136   EFI_GUID                        FvName;
1137 } MEDIA_FW_VOL_DEVICE_PATH;
1138 
1139 ///
1140 /// Media relative offset range device path.
1141 ///
1142 #define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
1143 
1144 ///
1145 /// Used to describe the offset range of media relative.
1146 ///
1147 typedef struct {
1148   EFI_DEVICE_PATH_PROTOCOL  Header;
1149   UINT32                    Reserved;
1150   UINT64                    StartingOffset;
1151   UINT64                    EndingOffset;
1152 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;
1153 
1154 ///
1155 /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
1156 ///
1157 #define EFI_VIRTUAL_DISK_GUID               EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
1158 
1159 extern  EFI_GUID                            gEfiVirtualDiskGuid;
1160 
1161 ///
1162 /// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
1163 ///
1164 #define EFI_VIRTUAL_CD_GUID                 EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
1165 
1166 extern  EFI_GUID                            gEfiVirtualCdGuid;
1167 
1168 ///
1169 /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
1170 ///
1171 #define EFI_PERSISTENT_VIRTUAL_DISK_GUID    EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
1172 
1173 extern  EFI_GUID                            gEfiPersistentVirtualDiskGuid;
1174 
1175 ///
1176 /// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
1177 ///
1178 #define EFI_PERSISTENT_VIRTUAL_CD_GUID      EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
1179 
1180 extern  EFI_GUID                            gEfiPersistentVirtualCdGuid;
1181 
1182 ///
1183 /// Media ram disk device path.
1184 ///
1185 #define MEDIA_RAM_DISK_DP         0x09
1186 
1187 ///
1188 /// Used to describe the ram disk device path.
1189 ///
1190 typedef struct {
1191   EFI_DEVICE_PATH_PROTOCOL        Header;
1192   ///
1193   /// Starting Memory Address.
1194   ///
1195   UINT32                          StartingAddr[2];
1196   ///
1197   /// Ending Memory Address.
1198   ///
1199   UINT32                          EndingAddr[2];
1200   ///
1201   /// GUID that defines the type of the RAM Disk.
1202   ///
1203   EFI_GUID                        TypeGuid;
1204   ///
1205   /// RAM Diskinstance number, if supported. The default value is zero.
1206   ///
1207   UINT16                          Instance;
1208 } MEDIA_RAM_DISK_DEVICE_PATH;
1209 
1210 ///
1211 /// BIOS Boot Specification Device Path.
1212 ///
1213 #define BBS_DEVICE_PATH           0x05
1214 
1215 ///
1216 /// BIOS Boot Specification Device Path SubType.
1217 ///
1218 #define BBS_BBS_DP                0x01
1219 
1220 ///
1221 /// This Device Path is used to describe the booting of non-EFI-aware operating systems.
1222 ///
1223 typedef struct {
1224   EFI_DEVICE_PATH_PROTOCOL        Header;
1225   ///
1226   /// Device Type as defined by the BIOS Boot Specification.
1227   ///
1228   UINT16                          DeviceType;
1229   ///
1230   /// Status Flags as defined by the BIOS Boot Specification.
1231   ///
1232   UINT16                          StatusFlag;
1233   ///
1234   /// Null-terminated ASCII string that describes the boot device to a user.
1235   ///
1236   CHAR8                           String[1];
1237 } BBS_BBS_DEVICE_PATH;
1238 
1239 //
1240 // DeviceType definitions - from BBS specification
1241 //
1242 #define BBS_TYPE_FLOPPY           0x01
1243 #define BBS_TYPE_HARDDRIVE        0x02
1244 #define BBS_TYPE_CDROM            0x03
1245 #define BBS_TYPE_PCMCIA           0x04
1246 #define BBS_TYPE_USB              0x05
1247 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
1248 #define BBS_TYPE_BEV              0x80
1249 #define BBS_TYPE_UNKNOWN          0xFF
1250 
1251 ///
1252 /// Union of all possible Device Paths and pointers to Device Paths.
1253 ///
1254 typedef union {
1255   EFI_DEVICE_PATH_PROTOCOL                   DevPath;
1256   PCI_DEVICE_PATH                            Pci;
1257   PCCARD_DEVICE_PATH                         PcCard;
1258   MEMMAP_DEVICE_PATH                         MemMap;
1259   VENDOR_DEVICE_PATH                         Vendor;
1260 
1261   CONTROLLER_DEVICE_PATH                     Controller;
1262   BMC_DEVICE_PATH                            Bmc;
1263   ACPI_HID_DEVICE_PATH                       Acpi;
1264   ACPI_EXTENDED_HID_DEVICE_PATH              ExtendedAcpi;
1265   ACPI_ADR_DEVICE_PATH                       AcpiAdr;
1266 
1267   ATAPI_DEVICE_PATH                          Atapi;
1268   SCSI_DEVICE_PATH                           Scsi;
1269   ISCSI_DEVICE_PATH                          Iscsi;
1270   FIBRECHANNEL_DEVICE_PATH                   FibreChannel;
1271   FIBRECHANNELEX_DEVICE_PATH                 FibreChannelEx;
1272 
1273   F1394_DEVICE_PATH                          F1394;
1274   USB_DEVICE_PATH                            Usb;
1275   SATA_DEVICE_PATH                           Sata;
1276   USB_CLASS_DEVICE_PATH                      UsbClass;
1277   USB_WWID_DEVICE_PATH                       UsbWwid;
1278   DEVICE_LOGICAL_UNIT_DEVICE_PATH            LogicUnit;
1279   I2O_DEVICE_PATH                            I2O;
1280   MAC_ADDR_DEVICE_PATH                       MacAddr;
1281   IPv4_DEVICE_PATH                           Ipv4;
1282   IPv6_DEVICE_PATH                           Ipv6;
1283   VLAN_DEVICE_PATH                           Vlan;
1284   INFINIBAND_DEVICE_PATH                     InfiniBand;
1285   UART_DEVICE_PATH                           Uart;
1286   UART_FLOW_CONTROL_DEVICE_PATH              UartFlowControl;
1287   SAS_DEVICE_PATH                            Sas;
1288   SASEX_DEVICE_PATH                          SasEx;
1289   NVME_NAMESPACE_DEVICE_PATH                 NvmeNamespace;
1290   DNS_DEVICE_PATH                            Dns;
1291   URI_DEVICE_PATH                            Uri;
1292   BLUETOOTH_DEVICE_PATH                      Bluetooth;
1293   WIFI_DEVICE_PATH                           WiFi;
1294   UFS_DEVICE_PATH                            Ufs;
1295   SD_DEVICE_PATH                             Sd;
1296   EMMC_DEVICE_PATH                           Emmc;
1297   HARDDRIVE_DEVICE_PATH                      HardDrive;
1298   CDROM_DEVICE_PATH                          CD;
1299 
1300   FILEPATH_DEVICE_PATH                       FilePath;
1301   MEDIA_PROTOCOL_DEVICE_PATH                 MediaProtocol;
1302 
1303   MEDIA_FW_VOL_DEVICE_PATH                   FirmwareVolume;
1304   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          FirmwareFile;
1305   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    Offset;
1306   MEDIA_RAM_DISK_DEVICE_PATH                 RamDisk;
1307   BBS_BBS_DEVICE_PATH                        Bbs;
1308 } EFI_DEV_PATH;
1309 
1310 typedef union {
1311   EFI_DEVICE_PATH_PROTOCOL                   *DevPath;
1312   PCI_DEVICE_PATH                            *Pci;
1313   PCCARD_DEVICE_PATH                         *PcCard;
1314   MEMMAP_DEVICE_PATH                         *MemMap;
1315   VENDOR_DEVICE_PATH                         *Vendor;
1316 
1317   CONTROLLER_DEVICE_PATH                     *Controller;
1318   BMC_DEVICE_PATH                            *Bmc;
1319   ACPI_HID_DEVICE_PATH                       *Acpi;
1320   ACPI_EXTENDED_HID_DEVICE_PATH              *ExtendedAcpi;
1321   ACPI_ADR_DEVICE_PATH                       *AcpiAdr;
1322 
1323   ATAPI_DEVICE_PATH                          *Atapi;
1324   SCSI_DEVICE_PATH                           *Scsi;
1325   ISCSI_DEVICE_PATH                          *Iscsi;
1326   FIBRECHANNEL_DEVICE_PATH                   *FibreChannel;
1327   FIBRECHANNELEX_DEVICE_PATH                 *FibreChannelEx;
1328 
1329   F1394_DEVICE_PATH                          *F1394;
1330   USB_DEVICE_PATH                            *Usb;
1331   SATA_DEVICE_PATH                           *Sata;
1332   USB_CLASS_DEVICE_PATH                      *UsbClass;
1333   USB_WWID_DEVICE_PATH                       *UsbWwid;
1334   DEVICE_LOGICAL_UNIT_DEVICE_PATH            *LogicUnit;
1335   I2O_DEVICE_PATH                            *I2O;
1336   MAC_ADDR_DEVICE_PATH                       *MacAddr;
1337   IPv4_DEVICE_PATH                           *Ipv4;
1338   IPv6_DEVICE_PATH                           *Ipv6;
1339   VLAN_DEVICE_PATH                           *Vlan;
1340   INFINIBAND_DEVICE_PATH                     *InfiniBand;
1341   UART_DEVICE_PATH                           *Uart;
1342   UART_FLOW_CONTROL_DEVICE_PATH              *UartFlowControl;
1343   SAS_DEVICE_PATH                            *Sas;
1344   SASEX_DEVICE_PATH                          *SasEx;
1345   NVME_NAMESPACE_DEVICE_PATH                 *NvmeNamespace;
1346   DNS_DEVICE_PATH                            *Dns;
1347   URI_DEVICE_PATH                            *Uri;
1348   BLUETOOTH_DEVICE_PATH                      *Bluetooth;
1349   WIFI_DEVICE_PATH                           *WiFi;
1350   UFS_DEVICE_PATH                            *Ufs;
1351   SD_DEVICE_PATH                             *Sd;
1352   EMMC_DEVICE_PATH                           *Emmc;
1353   HARDDRIVE_DEVICE_PATH                      *HardDrive;
1354   CDROM_DEVICE_PATH                          *CD;
1355 
1356   FILEPATH_DEVICE_PATH                       *FilePath;
1357   MEDIA_PROTOCOL_DEVICE_PATH                 *MediaProtocol;
1358 
1359   MEDIA_FW_VOL_DEVICE_PATH                   *FirmwareVolume;
1360   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          *FirmwareFile;
1361   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    *Offset;
1362   MEDIA_RAM_DISK_DEVICE_PATH                 *RamDisk;
1363   BBS_BBS_DEVICE_PATH                        *Bbs;
1364   UINT8                                      *Raw;
1365 } EFI_DEV_PATH_PTR;
1366 
1367 #pragma pack()
1368 
1369 #define END_DEVICE_PATH_TYPE                 0x7f
1370 #define END_ENTIRE_DEVICE_PATH_SUBTYPE       0xFF
1371 #define END_INSTANCE_DEVICE_PATH_SUBTYPE     0x01
1372 
1373 extern EFI_GUID gEfiDevicePathProtocolGuid;
1374 
1375 #endif
1376