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